#include<bits/stdc++.h>
using namespace std;
long long dp[20];
bool computed_arr[20];
long long f(int pos){
if(pos ==16) return 1;
if(pos >16) return 0;
if(computed_arr[pos]) return dp[pos];
computed_arr[pos]=true;
dp[pos]=f(pos+1)+f(pos+3)+f(pos+6);
return dp[pos];
}
int main(){
memset(computed_arr, 0, sizeof(computed_arr));
cout<<f(0);
}
#include <iostream>
#include <map>
using namespace std;
int main() {
map<int, int> t;
t[1] = 1;
for (int i = 2; i <= 17; ++i) { t[i] = t[i - 1] + t[i - 3] + t[i - 6]; }
cout << t[17];
}