#include <iostream>
using namespace std;
int main() {
int n;
while(cin>>n,n!=-1){
int x=0,y=1;
for(int i=0;i<n;i++){
int t=x;
x+=y;
y=t+1;
}
cout<<x<<" "<<(long long)x+y<<"\n";