#include #include #include #include #include #include #include #include #include #include using namespace std; #define __int64 long long #define long __int64 #define REP(i,a,b) for(int i=a;i= 2){ use[i] = 0; use[i+1] ++; }else{ break; } } } int main(){ const int fe[7] = {1,3,5,17,257,65537,1}; int a; int ans = 0; long check1 = 0; long check2; int use[7]; bool flg; vector data; cin >> a; for(int iy=0; check1 <= a; iy++){ check1 = pow(2,iy) + 0.001; for(int i=0; i<7; i++){ use[i] = 0; } while(use[6] == 0){ check2 = check1; for(int i=0; i<6; i++){ if(use[i] == 1){ check2 *= fe[i]; } } if(check2 <= a){ flg = true; for(int ii=0; ii