#t311. 上台阶

上台阶

Climbing the Stairs

Problem Background

Special for beginners, ^_^

Problem Description

A staircase has nn steps (71>n>071>n>0). You may climb 11, 22, or 33 steps in a single move. Write a program to compute how many different ways there are to climb to the top.

Input Format

Each line of the input is one test case, giving the number of steps nn. The last line is 00, marking the end of the input.

Output Format

For each input line, output the corresponding number of ways on its own line.

Sample Input 1

1
2
3
4
0

Sample Output 1

1
2
4
7

Constraints

1s, 1024KiB for each test case.