#include using namespace std; int main() { int n; cin>>n; vector> dp(n+1, vector(n+1)); map bits; for(int i=1; i<=n; i++){ bitset<32> bs(i); bits[i] = bs.count(); } dp[0][1]=1; for(int i=0; i