import java.util.*;
public class Solution {
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
*
* @param number int整型
* @return int整型
*/
public int jumpFloor (int number) {
// write code here
int[] fib = new int[number+1];
fib[0] = 1;
fib[1] = 1;
for (int i = 2; i <= number; i++) {
fib[i] = fib[i - 1] + fib[i - 2];
}
return fib[number];
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(new Solution().jumpFloor(n));
}
}

京公网安备 11010502036488号