#pragma region mytemplates #include using namespace std; #ifdef _DEBUG template void DOUT(T&& t){ cout << t << endl; } template void DOUT(T&& t,Ts&&... ts){ cout << t << ", "; DOUT(ts...); } #define debug(...) cout << __LINE__ << " [ " << #__VA_ARGS__ << " ]: ", DOUT(__VA_ARGS__) #else #define debug(...) template void DOUT([[maybe_unused]] Ts&&... ts){} #endif typedef long long LL; typedef pair PII; typedef pair PLL; typedef vector VI; typedef vector VVI; typedef vector VLL; typedef vector VVLL; typedef vector VB; typedef vector VVB; typedef vector VD; typedef vector VVD; typedef vector VS; typedef vector VVS; typedef vector VC; typedef vector VVC; typedef vector VPII; typedef vector VPLL; template using prque = priority_queue>; template using prquer = priority_queue,greater>; #define umap unordered_map #define uset unordered_set #define umset unordered_multiset #define LB lower_bound #define UB upper_bound #define FI first #define SE second #define EF emplace_front #define EB emplace_back #define PF push_front #define PB push_back #define POF pop_front #define POB pop_back #define MP make_pair #define MT make_tuple #define ALL(a) (a).begin(),(a).end() #define RALL(a) (a).rbegin(),(a).rend() #define SZ(a) (int)((a).size()) #define EXIST(s,e) (find((s).begin(),(s).end(),(e))!=(s).end()) #define SORT(c) sort((c).begin(),(c).end()) #define SORTR(c) sort((c).rbegin(), (c).rend()) #define REVERSE(c) reverse((c).begin(),(c).end()) #define NEXP(a) next_permutation((a).begin(),(a).end()) #define AAI(a,b,c) (a).begin(),(a).end(), (b).begin(),(b).end(), inserter(c,(c).end()) #define FOR(i,a,b) for(auto i = decltype(b){a}, i##_r=(b); i=i##_l; i--) #define REPR(i,n) FORR(i,0,n) #define CFOR(i,a,b) for(auto i = decltype(b){a}, i##_r=(b); i<=i##_r; i++) #define CREP(i,n) CFOR(i,0,n) #define SREP(i,n) CFOR(i,1,n) #define CFORR(i,a,b) for(auto i=decltype(b){b}, i##_l=(a); i>=i##_l; i--) #define CREPR(i,n) CFORR(i,0,n) #define SREPR(i,n) CFORR(i,1,n) #define BFOR(bit,a,b) for(LL bit=(a); bit<(1ll<<(b)); bit++) #define BREP(bit,n) BFOR(bit,0,n) #define EACH(ptr,c) for(auto ptr=(c).begin(); ptr!=(c).end(); ) #define EACHR(ptr,c) for(auto ptr=(c).rbegin(); ptr!=(c).rend(); ) #define PERM(c) for(bool c##per=1; c##per; c##per=NEXP(c)) constexpr double EPS = 1e-10; constexpr double PI = 3.141592653589793238462643383279; constexpr int INF = numeric_limits::max()/2; constexpr LL LINF = numeric_limits::max()/3; constexpr int RINF = numeric_limits::min()/2; constexpr LL RLINF = numeric_limits::min()/3; constexpr LL MOD = 1e9+7; constexpr LL MODD = 998244353; constexpr int MAX = 510000; template inline T sqr(T x) { return x*x; } inline bool Eq(double a, double b) { return fabs(b - a) < EPS; } template inline T CEIL(T x, T y) { return (x+y-1)/y; } inline int Pcnt(uint64_t x) { return __builtin_popcountll(x); } template T mypow(T a, LL n, T m = 0, T e = 1){ T res = e; while(n > 0){ if(n&1){ res *= a; if(m) res %= m; } a *= a; n >>= 1; if(m) a %= m; } return res; } templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b T Vsum(vector &v){ return reduce(v.begin(), v.end()); } template T Vgcd(vector &v){ return reduce(v.begin(), v.end(), T(0), [](auto&&a, auto&&b){ return gcd(a,b); }); } template T Vlcm(vector &v){ return reduce(v.begin(), v.end(), T(1), [](auto&&a, auto&&b){ return lcm(a,b); }); } template T Vmax(vector &v){return *max_element(v.begin(), v.end()); } template T Vmin(vector &v){return *min_element(v.begin(), v.end()); } template void Vadd(vector &v, T a){for(auto&& x : v) x += a; } template vector make_v(size_t a,T b){return vector(a,b);} template auto make_v(size_t a,Ts... ts){return vector(a,make_v(ts...)); } const vector dx = {1,0,-1,0,1,1,-1,-1}; const vector dy = {0,1,0,-1,1,-1,1,-1}; bool cYN(bool fl=true,bool fl2=false){cout << (fl?"Yes":"No") << endl; if(fl2){ exit(0); } return fl; } bool CYN(bool fl=true,bool fl2=false){cout << (fl?"YES":"NO") << endl; if(fl2){ exit(0); } return fl; } template void error(T t=-1,bool fl=true){cout << t << endl; if(fl){ exit(0); } } template void COUT(T&& t){ cout << t << endl; } template void COUT(T&& t,Ts&&... ts){ cout << t << " "; COUT(ts...); } void CIN() {} template void CIN(T&& t,Ts&&... ts){ cin >> t; CIN(ts...); } template< typename T1, typename T2 > istream &operator>>(istream &is, pair< T1, T2 > &p) { is >> p.first >> p.second; return is; } template< typename T1, typename T2 > ostream &operator<<(ostream &os, const pair< T1, T2 >& p) { os << p.first << " " << p.second; return os; } template< typename T > istream &operator>>(istream &is, vector< T > &v) { for(auto&&in : v) is >> in; return is; } template< typename T > ostream &operator<<(ostream &os, const vector< T > &v) { for(int i = 0; i < SZ(v); i++) os << v[i] << (i + 1 != SZ(v) ? " " : ""); return os; } void Vcin([[maybe_unused]] int i) {} template void Vcin(int i, vector &v, Ts&&... vs){ cin >> v[i]; Vcin(i, vs...); } template void Vcin(vector &v,Ts&&... vs){ for(int i = 0; i < SZ(v); i++) Vcin(i, v, vs...); } template< typename T > void Vcout(const vector &v, string sep = " ", string en = "\n"){ for(int i = 0; i < SZ(v); i++) cout << v[i] << (i + 1 != SZ(v) ? sep : en); } #pragma endregion int main() { // cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(12); LL N; CIN(N); int k = 63 - __builtin_clzll(N); COUT(1ll << k); return 0; } /* 制約は見ましたか? 実行時間制限は見ましたか? サンプルは試しましたか? cat in.txt | .\a.exe > out.txt C++になっていますか? //*/