
시간복잡도: O(N), 공간복잡도: O(1)
import java.util.*;
import java.io.*;
class Main {
public static void main (String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int Acount = 0;
int Bcount = 1;
int k = Integer.parseInt(br.readLine());
if(k==1){
System.out.println(0+" "+1);
return;
}
for(int i=1;i<k;i++){
int temp = Bcount;
Bcount = Acount + Bcount;
Acount = temp;
}
System.out.println(Acount+ " " +Bcount);
}
}
