#include using namespace std; int main() { int n, k, m; bool through[10000], mem[10000]; cin >> n; k=1; through[0]=1; for( int i=1; i1; j>>=1)m+=j&1; if(n