#include using namespace std; typedef long long ll; typedef unsigned long long ull; #define rep(i, a, n) for (int i = (a); i < (n); i++) bitset<50000> isprime; unordered_set erat_sieve(int lim) { isprime.set(); isprime[0] = isprime[1] = 0; for (int i = 4; i < lim; i +=2) isprime[i] = 0; for (int i = 3; i*i < lim; i += 2) if (isprime[i]) for(int j = i * i; j < lim; j += i * 2) isprime[j] = 0; unordered_set pr; rep(i, 2, lim) if (isprime[i]) pr.insert(i); return pr; } int main(void) { ios_base::sync_with_stdio(false); auto primes = erat_sieve(300); int time[300]; int target; cin >> target; time[target] = 1; for(int i = target-1; i >= 2; i--) { if (!primes.count(i)) { time[i]=0; continue; } time[i] = 0; for(int jump = 1; jump <= 14; jump++) { if (i+jump > target) break; time[i] += time[i+jump]; } } cout << time[2] << endl; return 0; }