import java.util.Scanner; class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); long [] t = new long [] {2,1}; for(int i = 3 ; i <= num ; i++) t[i%2] = t[0] + t[1]; System.out.println(t[num % 2]); } }