import java.util.; import java.io.; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str = null; while((str = in.readLine()) != null){ int sum = 1; int pre = 1; int next = 1; int num = Integer.parseInt(str); if(num >= 3){ for(int i = 3;i <= num;i ++){ sum = pre + next; pre = next; next = sum; } } System.out.println(sum); } } }