import java.util.*; import java.math.*; import java.io.*; class Main{ public static void main(String[] args){ Scanner s=new Scanner(System.in); int a=s.nextInt(); if(a==2){ System.out.println("3\nINF"); System.exit(0); } PrintWriter out = new PrintWriter(System.out); out.println(a); BigInteger mat[][]=new BigInteger[2][2]; BigInteger val[][]=new BigInteger[2][2]; mat[0][0]=mat[0][1]=mat[1][0]=BigInteger.ONE; mat[1][1]=BigInteger.ZERO; val[0][0]=val[1][1]=BigInteger.ONE; val[0][1]=val[1][0]=BigInteger.ZERO; int b=a; BigInteger t00,t01,t10,t11; if(a%2==0)b=a/2-1; while(b>0){ if(b%2==1){ t00=val[0][0].multiply(mat[0][0]).add(val[0][1].multiply(mat[1][0])); t01=val[0][0].multiply(mat[0][1]).add(val[0][1].multiply(mat[1][1])); t10=val[1][0].multiply(mat[0][0]).add(val[1][1].multiply(mat[1][0])); t11=val[1][0].multiply(mat[0][1]).add(val[1][1].multiply(mat[1][1])); val[0][0]=t00; val[0][1]=t01; val[1][0]=t10; val[1][1]=t11; } b/=2; t00=mat[0][0].multiply(mat[0][0]).add(mat[0][1].multiply(mat[1][0])); t01=mat[0][0].multiply(mat[0][1]).add(mat[0][1].multiply(mat[1][1])); t10=mat[1][0].multiply(mat[0][0]).add(mat[1][1].multiply(mat[1][0])); t11=mat[1][0].multiply(mat[0][1]).add(mat[1][1].multiply(mat[1][1])); mat[0][0]=t00; mat[0][1]=t01; mat[1][0]=t10; mat[1][1]=t11; } BigInteger ret; if(a%2==0){ ret=val[1][0].multiply(val[0][0].shiftLeft(1)); }else{ ret=val[1][0]; } out.println(ret); out.flush(); } }