Problems
10112 - Guess !!!
SUBMIT PROBLEM

Guess !!!

Time Limit: 1 sec

 

The Problem

This year (2017) I have bought a cow for breeding. Seller told me that, this cow gives a child every year after first fourth year of her life and all her children do the same. So I am trying to guess how many cows I will have after certain period! Assume in 2017 age of the parent(root) cow is 1.

 

The Input

There will be at most 100 test cases, each containing a single line with an integer Y (2017 ≤ y ≤ 2117). The input terminates with Y = 0, which should not be processed.

 

The Output

For each line of input, print the number of cows I will have in this year (Y) in a separate line.

 

Sample Input

2017

2018

2019

2020

2021

0

 

Sample Output

1

1

1

2

3 

 

 

 

[School & College Level]

Inter School & College Programming Contest (ISCPC) 2017

Problem Setter: Md. Helal Uddin