http://acm.hust.edu.cn/vjudge/contest/view.action?cid=30506#problem/W
#include<map>
#include<set>
#include<list>
#include<cmath>
#include<ctime>
#include<deque>
#include<stack>
#include<bitset>
#include<cstdio>
#include<vector>
#include<cstdlib>
#include<cstring>
#include<iomanip>
#include<numeric>
#include<sstream>
#include<utility>
#include<iostream>
#include<algorithm>
#include<functional>
using namespace std ;
const int MAXN = 250010;;
int prime[25010];
bool isprime[MAXN];
long double fib[MAXN];
int main(){
int i, j;
for(i=0; i <= MAXN ; ++i )
isprime[i] = true;
for(i=2; i<=500; i++){
for(j=i*i; j<=MAXN; j+=i)
isprime[j] = false;
}
int idx = 1;
for(i=2; i<=MAXN; i++){
if(isprime[i])
prime[idx++] = i;
}
prime[1] = 3;
prime[2] = 4;
fib[0] = fib[1] = 1;
bool flag = false;
for(i=2; i<=MAXN; i++){
if(flag){
fib[i] = fib[i-1] + fib[i-2]/10;
flag = 0;
}
else {
fib[i] = fib[i-1] + fib[i-2];
}
if(fib[i]>1e9){
fib[i]/=10;
flag = true;
}
}
int n;
while(scanf("%d", &n)!=EOF)
printf("%d\n", (int)fib[prime[n]-1]);
}