#include using namespace std; #define int long long signed main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; map dp; dp[0] = 1; function< int(int) > rec = [&](int i){ if(dp.find(i) != dp.end()) return dp[i]; return dp[i] = rec(i/3) + rec(i/5); }; cout << rec(n) << endl; return 0; }