import java.util.Scanner;
public class A {
public static void main(String[] args) {
//ArrayRecurtion(); 这是第一种方法,数组实现的
System.out.print("请输入您要输入的数组大小:"); //这是第二种方法,函数实现的
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
int sum = Fun(num);
System.out.println(sum);
}
private static int Fun(int num) {
if(num==1||num==2){
return 1;
}else{
return Fun(num-2)+Fun(num - 1);
}
}
private static void ArrayRecurtion() {
System.out.print("请输入您要输入的数组大小:");
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
int []arr = new int[num];
arr[0] = 1;
arr[1] = 1;
for (int i = 2; i < arr.length; i++) {
arr[i] = arr[i-2]+arr[i-1];
if(i == arr.length-1){
System.out.println(arr[i]);
}
}
}
}