https://www.acmicpc.net/problem/9461
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int arr[]=new int[n];
int max=0;
for(int i=0;i<n;i++){
arr[i]=s.nextInt();
if(arr[i]>=max) max=arr[i];
}
if(max<3) max=3;
long num[]=new long[max];
num[0]=1;
num[1]=1;
num[2]=1;
for(int i=3;i<max;i++){
num[i]=num[i-2]+num[i-3];
}
for(int i=0;i<n;i++){
System.out.println(num[arr[i]-1]);
}
}
}