#include<iostream>
using namespace std;
int gj[1001] = { 1 }, last[1001] = { 2 }, len = 1;
int main( ) {
int n; cin >> n;
if ( n == 1 ) {
cout << 1;
return 0;
} if ( n == 2 ) {
cout << 2;
return 0;
}
for ( int i = 3; i <= n; i++ ) {
for ( int j = 0; j < len; j++ )
gj[j] += last[j], gj[j+1] += gj[j] / 10, gj[j] %= 10;
if ( gj[len] )
len++;
swap( gj, last );
}
for ( int i = len - 1; i >= 0; i-- )
cout << last[i];
return 0;
}