https://www.acmicpc.net/problem/11726
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int num[]=new int[1002];
num[1]=1;
num[2]=2;
for(int i=3;i<=n;i++){
num[i]=(num[i-1]+num[i-2])%10007;
}
System.out.format("%d",num[n]);
}
}