import java.math.BigInteger; import java.util.Scanner; public class Main { public static BigInteger[] f=new BigInteger[2005]; public static BigInteger gcd(BigInteger a, BigInteger b) { while (!b.equals(BigInteger.ZERO)) { BigInteger tmp=a.mod(b); a=b; b=tmp; } return a; } public static void println(Object x) { System.out.println(x); } public static void main(String arg[]) { f[0]=new BigInteger("1"); f[1]=new BigInteger("1"); for (int i=2;i<2005;++i) { f[i]=new BigInteger("0"); f[i]=f[i].add(f[i-1]).add(f[i-2]); } Scanner cin=new Scanner(System.in); String str; try { while ((str = cin.nextLine()) != null) { if (str.equals("") || str.equals("EOF")) break; int T = Integer.valueOf(str); println(f[T]); } }catch (Exception e) { } } }