Takahashi loves numbers divisible by 2.
You are given a positive integer N. Among the integers between 1 and N (inclusive), find the one that can be divisible by 2 for the most number of times. The solution is always unique.
Here, the number of times an integer can be divisible by 2, is how many times the integer can be divided by 2 without remainder.
For example,
 - 6 can be divided by 2 once: 6 -> 3.
 - 8 can be divided by 2 three times: 8 -> 4 -> 2 -> 1.
 - 3 can be divided by 2 zero times.

-----Constraints-----
 - 1 ≤ N ≤ 100

-----Input-----
Input is given from Standard Input in the following format:
N

-----Output-----
Print the answer.

-----Sample Input-----
7

-----Sample Output-----
4

4 can be divided by 2 twice, which is the most number of times among 1, 2, ..., 7.
[{"code": "#!/usr/bin/env python3\nimport sys\n\n\ndef solve(N: int):\n    if N >= 64:\n        print((64))\n    elif N >= 32:\n        print((32))\n    elif N >= 16:\n        print((16))\n    elif N >= 8:\n        print((8))\n    elif N >= 4:\n        print((4))\n    elif N >= 2:\n        print((2))\n    else:\n        print((1))\n    return\n\n\n# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n    def iterate_tokens():\n        for line in sys.stdin:\n            for word in line.split():\n                yield word\n    tokens = iterate_tokens()\n    N = int(next(tokens))  # type: int\n    solve(N)\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.15, "memory": 14332.0, "status": "done"}, {"code": "n = int(input())\nif n >= 64:\n    print((64))\nelif n >= 32:\n    print((32))\nelif n >= 16:\n    print((16))\nelif n >= 8:\n    print((8))\nelif n >= 4:\n    print((4))\nelif n >= 2:\n    print((2))\nelse:\n    print((1))\n", "passed": true, "time": 0.24, "memory": 14240.0, "status": "done"}, {"code": "n = int(input())\nx = 0\nfor i in range(1, n+1):\n    if i%64 == 0 and 64 > x:\n        ans = i\n        x = 64\n    elif i%32 == 0 and 32 > x:\n        ans = i\n        x = 32\n    elif i%16 == 0 and 16 > x:\n        ans = i\n        x = 16\n    elif i%8 == 0 and 8 > x:\n        ans = i\n        x = 8\n    elif i%4 == 0 and 4 > x:\n        ans = i\n        x = 4\n    elif i%2 == 0 and 2 > x:\n        ans = i\n        x = 2\n    elif i == 1:\n        ans = 1\n        x = 1\nprint(ans)", "passed": true, "time": 0.15, "memory": 14108.0, "status": "done"}, {"code": "n = int(input())\nres = 1\nwhile True:\n    if res > n:\n        break\n    res *= 2\nprint((res // 2))\n", "passed": true, "time": 0.22, "memory": 14072.0, "status": "done"}, {"code": "N = int(input())\n\ndef black_magic(n):\n    d = {\n        1: 1431655765,\n        2: 858993459,\n        4: 252645135,\n        8: 16711935,\n        16: 65535\n    }\n    n=(n&d[1])+((n>>1)&d[1])\n    n=(n&d[2])+((n>>2)&d[2])\n    n=(n&d[4])+((n>>4)&d[4])\n    n=(n&d[8])+((n>>8)&d[8])\n    n=(n&d[16])+((n>>16)&d[16])\n    return n\n\nwhile black_magic(N) - 1:\n    N &= N-1\nprint(N)", "passed": true, "time": 0.14, "memory": 14332.0, "status": "done"}, {"code": "s = int(input())\nt = 1\nfor i in range(1,8,1):\n  if(s >= (2 ** i)):t = 2 ** i\nprint(t)", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "print((2**(len(bin(int(input()))[2:])-1)))\n", "passed": true, "time": 0.15, "memory": 14316.0, "status": "done"}, {"code": "N = int(input())\n\ncnt_list = []\nfor i in range(1, N + 1):\n    cnt = 0\n    while i >= 1:\n        if i % 2 == 0:\n            cnt += 1\n            i = i / 2\n        else:\n            break\n    cnt_list.append(cnt)\nM = cnt_list.index(max(cnt_list))\nprint(M + 1)", "passed": true, "time": 0.14, "memory": 14188.0, "status": "done"}, {"code": "n = int(input())\nif n == 1:\n    print(1)\nelif 2 <= n < 4:\n    print(2)\nelif 4 <= n < 8:\n    print(4)\nelif 8 <= n < 16:\n    print(8)\nelif 16 <= n < 32:\n    print(16)\nelif 32 <= n < 64:\n    print(32)\nelse:\n    print(64)", "passed": true, "time": 0.2, "memory": 14164.0, "status": "done"}, {"code": "N = int(input())\nnum = 1\nwhile num <= N:\n  num *= 2\nprint(num // 2)", "passed": true, "time": 0.14, "memory": 14092.0, "status": "done"}, {"code": "n = int(input())\ni = 0\n\nwhile 2 ** (i +1) <= n:\n    i += 1\nprint(2 ** i)", "passed": true, "time": 0.15, "memory": 14100.0, "status": "done"}, {"code": "n = int(input())\nans = 0\nanswer = 1\nfor i in range(1, n+1):\n    cnt = 0\n    num = i\n    while num % 2 == 0:\n        num //= 2\n        cnt += 1\n    if cnt > ans :\n        answer = i\n        ans = cnt \nprint(answer)", "passed": true, "time": 0.15, "memory": 14084.0, "status": "done"}, {"code": "N = int(input())\nfor i in range(100):\n    x = 2 ** (100 - i)\n    if x <= 64 and x <= N:\n        ans = x\n        break\n    else:\n        ans = N\nprint(ans)", "passed": true, "time": 0.23, "memory": 14272.0, "status": "done"}, {"code": "import bisect\nn = int(input())\nt = [1, 2, 4, 8, 16, 32, 64]\n\nprint(t[bisect.bisect_right(t, n)-1])", "passed": true, "time": 0.15, "memory": 14260.0, "status": "done"}, {"code": "n = int(input())\n\ni = 1\nwhile i < n:\n    i = i * 2\n\nif i > n:\n    print((int(i / 2)))\nelse:\n    print(i)\n", "passed": true, "time": 0.15, "memory": 14304.0, "status": "done"}, {"code": "N = int(input())\nans = [1, 2, 4, 8, 16, 32, 64]\nprint(max(filter(lambda x : x<=N,ans)))", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "# -*- coding:utf-8 -*-\nN = int(input())\n\nif N == 1:\n    print(N)\nelse:\n    for i in range(1,8):\n        if 2**(i+1) > N:\n            print(2**i)\n            break\n        else:\n            i+=1", "passed": true, "time": 0.16, "memory": 14236.0, "status": "done"}, {"code": "n = int(input())\nans = 0\nfor i in range(n):\n    if 2**i <= n:\n        ans = max(ans, 2**i)\nprint(ans)", "passed": true, "time": 0.15, "memory": 14124.0, "status": "done"}, {"code": "N=int(input())\ntwo=[2**i for i in range(7)]\nans=max([x for i,x in enumerate(two) if x<=N])\nprint(ans)", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "N = int(input())\ni = 1\nwhile i*2 <= N:\n    i *= 2\nprint(i)", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "n = int(input())\ncount = [0] * n\nfor i in range(1, n + 1):\n    num = i\n    while num % 2 == 0:\n        num //= 2\n        count[i - 1] += 1\nprint(count.index(max(count)) + 1)", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "def cnt_div_two(n):\n    res = 0\n    while n % 2 == 0:\n        n //= 2\n        res += 1\n    return res\n\n\nans = 0\nmax_cnt = -1\nfor i in range(1, int(input()) + 1):\n    cdt = cnt_div_two(i)\n    if cdt > max_cnt:\n        ans = i\n        max_cnt = cdt\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "N = int(input())\ncount = 0\nwhile N > 1:\n    N //= 2\n    count += 1\nprint(2**count) ", "passed": true, "time": 0.16, "memory": 14120.0, "status": "done"}, {"code": "def resolve():\n    print(2 ** (len(bin(int(input()))) - 3))\n\n\ndef __starting_point():\n    resolve()\n__starting_point()", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "n=int(input())\nans=1\n\nwhile(ans<=n):\n    ans*=2\n\nprint(int(ans/2))", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "N = int(input())\ncount = 0\nnum = 1\n\nwhile N >= num:\n    count += 1\n    num *= 2\n\nprint(num // 2)", "passed": true, "time": 0.15, "memory": 14296.0, "status": "done"}, {"code": "print(1<<int(input()).bit_length()-1)", "passed": true, "time": 0.14, "memory": 14080.0, "status": "done"}, {"code": "num = int(input())\nans = 1\nwhile ans <= num:\n    ans = ans * 2\nprint((int(ans/2)))\n", "passed": true, "time": 0.19, "memory": 14196.0, "status": "done"}, {"code": "n = int(input())\n\na = 1\nwhile a <= n:\n  a *= 2\nprint(a//2)", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "n = int(input())\nmaxCnt = 0\nans = 1\n\nfor i in range(1,n+1,1):\n    tmpCnt = 0\n    j = i\n    while j%2 == 0:\n        j = j/2\n        tmpCnt += 1\n    if maxCnt < tmpCnt:\n        maxCnt = tmpCnt\n        ans = i\n\nprint(ans)", "passed": true, "time": 0.24, "memory": 14248.0, "status": "done"}, {"code": "n = int(input())\nans, cnt = 1, 0\nfor i in range(1, n+1):\n    j = i\n    t_cnt = 0\n    if i%2 == 0:\n        # print(i)\n        while i%2 == 0:\n            i = i//2\n            t_cnt += 1\n            # print(i, t_cnt)\n        if t_cnt >= cnt:\n            ans = j\n            cnt = t_cnt\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "n=int(input())\nfor i in range(1,n+1):\n    if 2**i>n:\n        print((2**(i-1)))\n        return\n        \n", "passed": true, "time": 0.15, "memory": 14292.0, "status": "done"}, {"code": "N=int(input())\n\nX=[]\n\n\nfor i in range(1,N+1):\n    count=0\n    while i%2==0:\n        i//=2\n        count+=1\n    X.append(count)\n\nprint((X.index(max(X))+1))\n", "passed": true, "time": 0.24, "memory": 14244.0, "status": "done"}, {"code": "n = int(input())\nans = 1\nfor i in range(7):\n    if 2 ** i <= n:\n        ans = 2 ** i\nprint(ans)\n", "passed": true, "time": 0.17, "memory": 14080.0, "status": "done"}, {"code": "n=int(input())\nm = 0\ni = 0\nwhile 2**i <= n:\n  m = max(m, 2**i)\n  i += 1\nprint(m)", "passed": true, "time": 0.2, "memory": 14084.0, "status": "done"}, {"code": "N=int(input())\na=1\nwhile(N>1):\n  N//=2\n  a*=2\nprint(a)", "passed": true, "time": 0.23, "memory": 14280.0, "status": "done"}, {"code": "N = int(input())\nfor i in range(7):\n  if 2 ** i <= N < 2 ** (i + 1):\n    print(2 ** i)\n    return", "passed": true, "time": 0.15, "memory": 14296.0, "status": "done"}, {"code": "#from statistics import median\n#import collections\n#aa = collections.Counter(a) # list to list || .most_common(2)\u3067\u6700\u5927\u306e2\u500b\u3068\u308a\u3060\u305b\u308b\u304a a[0][0]\nfrom math import gcd\nfrom itertools import combinations,permutations,accumulate, product # (string,3) 3\u56de\n#from collections import deque\nfrom collections import deque,defaultdict,Counter\nimport decimal\nimport re\nimport math\nimport bisect\nimport heapq\n#\n#\n#\n# python\u3067\u7121\u7406\u306a\u3068\u304d\u306f\u3001pypy\u3067\u3084\u308b\u3068\u6b63\u89e3\u3059\u308b\u304b\u3082\uff01\uff01\n#\n#\n# my_round_int = lambda x:np.round((x*2 + 1)//2)\n# \u56db\u6368\u4e94\u5165g\n#\n# \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u7cfb\n# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);\n# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);\n#\n#\nimport sys\nsys.setrecursionlimit(10000000)\nmod = 10**9 + 7\n#mod = 9982443453\n#mod = 998244353\nINF = float('inf')\nfrom sys import stdin\nreadline = stdin.readline\ndef readInts():\n  return list(map(int,readline().split()))\ndef readTuples():\n    return tuple(map(int,readline().split()))\ndef I():\n    return int(readline())\nn = I()\nlis = [2**i for i in range(10)]\nidx = bisect.bisect_right(lis, n)\nprint((lis[idx-1]))\n", "passed": true, "time": 0.15, "memory": 14372.0, "status": "done"}, {"code": "N=int(input())\nlis=[0]*(N+1)\nMcnt=0\nMi=1\n\nfor i in range(1,N+1):\n  lis[i]=i\n  cnt=0\n  while lis[i]%2==0:\n    lis[i]//=2\n    cnt+=1\n    \n  if Mcnt<cnt:\n    Mcnt=cnt\n    Mi=i\n    \nprint(Mi)", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "import math\n\nN = int(input())\n\ni = 1\nwhile i < N:\n  i = i*2\n\nif i <= N:\n  print(i)\nelse:\n  print(math.floor(i/2))", "passed": true, "time": 0.15, "memory": 14272.0, "status": "done"}, {"code": "n = int(input())\nans = 1\n\nfor i in range(1, 7):\n  if 2**i <= n:\n    ans = 2**i\n\nprint(ans)", "passed": true, "time": 0.18, "memory": 14096.0, "status": "done"}, {"code": "import math\n\nn = int(input())\nans, i = 0, 1\nwhile ans <= n:\n    ans = 2**i\n    i += 1\n\nprint(ans//2)", "passed": true, "time": 0.14, "memory": 14312.0, "status": "done"}, {"code": "N = int(input())\n\nif N == 1:\n    print((1))\nelif 1 < N < 2**2:\n    print((2))\nelif 2**2 <= N < 2**3:\n    print((4))\nelif 2**3 <= N < 2**4:\n    print((8))\nelif 2**4 <= N < 2**5:\n    print((16))\nelif 2**5 <= N < 2**6:\n    print((32))\nelif 2**6 <= N:\n    print((64))\n", "passed": true, "time": 0.22, "memory": 14040.0, "status": "done"}, {"code": "\nN = int(input())\nN2 = N\na = []\n\nfor i in range(N):\n    count = 0\n    if i != 0:\n        tmp = N\n        while tmp % 2 == 0:\n            tmp = tmp / 2\n            count += 1\n\n        N = N - 1\n    a.append(count)\n\nmax_value = max(a)\n\nind = a.index(max_value)\n\nif N2 == 1:\n    print((1))\nelse:\n    print((N2-ind+1))\n", "passed": true, "time": 0.15, "memory": 14204.0, "status": "done"}, {"code": "n = int(input())\nans = 2\nwhile n > ans:\n    ans *= 2\nif n < ans: ans //= 2\nprint(ans)", "passed": true, "time": 0.15, "memory": 14328.0, "status": "done"}, {"code": "N=int(input())\ni=0\nwhile pow(2, i+1)<=N:\n  i+=1\nprint(pow(2, i))", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "n = int(input())\nnum = [i for i in range(1,n+1)]\njou = [2**j for j in range(0,7)]\nfor l in jou:\n    if l in num:\n        ans = l\n    else:\n        break\nprint(ans)", "passed": true, "time": 0.15, "memory": 14188.0, "status": "done"}, {"code": "from math import log2\n\nN = int(input())\n\nm = 0\na = 0\n\nfor i in range(1, N + 1):\n  l = log2(i)\n  if l % 1 == 0:\n    m = i\n\n\nprint(m)\n", "passed": true, "time": 0.14, "memory": 14024.0, "status": "done"}, {"code": "#!/usr/bin/env python3\n\ndef main():\n    n = int(input())\n    i = 0\n    while 2 ** i <= n:\n        i += 1\n    print((2 ** (i - 1)))\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "n = int(input())\nif n == 1:\n  print(1)\nelse:\n  for i in range(1,7):\n    if 2**(7-i) <= n:\n      print(2**(7-i))\n      return", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "n = int(input())\nif n == 1:\n    print((1))\nelif 2 <= n < 4:\n    print((2))\nelif 4 <= n < 8:\n    print((4))\nelif 8 <= n < 16:\n    print((8))\nelif 16 <= n < 32:\n    print((16))\nelif 32 <= n < 64:\n    print((32))\nelse:\n    print((64))\n", "passed": true, "time": 0.14, "memory": 14168.0, "status": "done"}, {"code": "n = int(input())\ns = [i for i in range(1,n+1)]\ncounter = 0\nwhile(True):\n    if len(s)==1:\n        print((1))\n        break\n    if len([i for i in s if i % 2 == 0])==1:\n        s = [i for i in s if i % 2 == 0]\n        print((int(s[0]) * (2 ** counter)))\n        break\n    else:\n        s = [i/2 for i in s]\n        counter += 1\n", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "n = int(input())\nans = 1\nx = 0\nfor i in range(1, n+1):\n    counter = 0\n    r = 0+i\n    while r%2 == 0:\n        r //= 2\n        counter += 1\n    if x < counter:\n        ans = i\n        x = counter\nprint(ans)", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "n = int(input())\nfor i in range(1,10):\n  if 2 ** i > n:\n    print((2 ** (i - 1)))\n    break\n", "passed": true, "time": 0.14, "memory": 14128.0, "status": "done"}, {"code": "N = int(input())\n\nans = 0\nres = 1\nfor i in range(2,N+1):\n  j = i\n  if j % 2 == 1:\n    continue\n  cnt = 0\n  while j % 2 == 0:\n    j //= 2\n    cnt += 1\n  if ans < cnt:\n    res = i\n    ans = cnt\n  \nprint(res)", "passed": true, "time": 0.14, "memory": 14372.0, "status": "done"}, {"code": "N = int(input())\ncounter = 0\nwhile N >= 2:\n  N //= 2\n  counter +=1\nans = 2**counter\nprint(ans)", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "import math\nn=int(input())\nprint(2**int(math.log(n,2)))", "passed": true, "time": 0.14, "memory": 14160.0, "status": "done"}, {"code": "n = int(input())\n\ncnt = 0\nwhile n > 0:\n  n = n // 2\n  if n != 0:\n    cnt += 1\nprint(2 ** cnt)", "passed": true, "time": 0.14, "memory": 14040.0, "status": "done"}, {"code": "n = int(input())\nans = 1\nwhile ans*2 <= n:\n    ans *= 2\nprint(ans)", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "N = int(input())\nans_max = 0\nans = 1\nfor i in range(1, N + 1):\n    cnt = 0\n    moto_i = i\n    while i % 2 == 0:\n        cnt += 1\n        if cnt > ans_max:\n            ans = moto_i\n        ans_max = max(ans_max, cnt)\n        i //= 2\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "N=int(input())\nresult=64\nwhile N>=1:\n  if N >= result:\n    print(result)\n    break\n  result=int(result/2)\nelse:\n  print(result)", "passed": true, "time": 0.23, "memory": 14148.0, "status": "done"}, {"code": "print(1<<len(f'{int(input()):b}')-1)", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "n = int(input())\nli = [2,4,8,16,32,64]\nimport bisect\nindex = bisect.bisect(li,n)-1\nimport sys\nif index == -1:\n    print(n)\n    return\nprint(li[index])", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "n=int(input())\nans=0\nfor i in range(7):\n    if (n>>i)&1:\n        ans=(n>>i)<<i\nprint(ans)", "passed": true, "time": 0.15, "memory": 14084.0, "status": "done"}, {"code": "n = int(input())\nmax_count, answer = 0, 0\nfor i in range(1, n + 1):\n    num = i\n    count = 0\n    while num % 2 == 0:\n        num = num // 2\n        count += 1\n    if count > max_count:\n        max_count, answer = count, i\n\nprint((max(1, answer)))\n", "passed": true, "time": 0.16, "memory": 14268.0, "status": "done"}, {"code": "n = int(input())\nc = 0\nfor i in range(1,8):\n    if 2**i > n:\n        print(2**(i-1))\n        break", "passed": true, "time": 0.15, "memory": 14080.0, "status": "done"}, {"code": "import math\n\n\ndef answer(n: int) -> int:\n    return 2 ** int(math.log(n, 2))\n\n\ndef main():\n    n = int(input())\n    print(answer(n))\n\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.15, "memory": 14116.0, "status": "done"}, {"code": "N = int(input())\n\nans = 1\nwhile ans <= N:\n  ans *= 2\n\nprint(ans//2)", "passed": true, "time": 0.22, "memory": 14296.0, "status": "done"}, {"code": "n = int(input())\nans = 0\nfor i in range(n):\n    if 2**i <=n:\n        ans = 2**i\n    else:\n        break\nprint(ans)", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "N = int(input())\nans = []\nfor i in range(N):\n    q = i+1\n    count = 0\n    if q == 1:\n        continue\n    while True:\n        if q%2 != 0:\n            break\n        q = q//2\n        count += 1\n    ans.append(count)\n\nif len(ans) > 0:\n    max_count = max(ans)\n    print(ans.index(max_count)+2)\nelse:\n    print(1)", "passed": true, "time": 0.15, "memory": 14356.0, "status": "done"}, {"code": "def solve(n):\n  res = 0\n  while(n != 1):\n    if n%2 == 0:\n      res += 1\n      n /= 2\n    else:\n      break\n  return res\n\nn = int(input())\n\nans = 1\nans_max = 0\nfor i in range(1, n+1):\n  cnt = solve(i)\n  if cnt > ans_max:\n    ans_max = cnt\n    ans = i\nprint(ans)", "passed": true, "time": 0.14, "memory": 14252.0, "status": "done"}, {"code": "N = int(input())\nL = [64, 32, 16, 8, 4, 2]\nfor i in L:\n  if i <= N:\n    print(i)\n    break\nelse:\n  print(N)", "passed": true, "time": 0.23, "memory": 14156.0, "status": "done"}, {"code": "#!/usr/local/bin/python3\n# https://atcoder.jp/contests/abc068/tasks/abc068_b\nimport math\n\ndef fact(N):\n    ans = {}\n    for i in range(2, math.ceil(math.sqrt(N))+1):\n        if N % i != 0:\n            continue\n        ex = 0\n\n        while N % i == 0:\n            ex += 1\n            N /= i\n        ans[i] = ex\n\n    if N != 1:\n        ans[int(N)] = 1\n    return ans\n\nN = int(input())\nmax_x = 0\nmax_n = 0\n\nif N == 1:\n    print((1))\n    return\n\nfor i in range(N+1):\n    num = fact(i)\n    num = num.get(2, 0)\n    if num > max_n:\n        max_x = i\n        max_n = num\n\nprint(max_x)\n", "passed": true, "time": 0.14, "memory": 14160.0, "status": "done"}, {"code": "# B - Break Number\ndef main():\n    n = int(input())\n\n    if 64 <= n <= 100:\n        print(64)\n    elif 32 <= n <= 63:\n        print(32)\n    elif 16 <= n <= 31:\n        print(16)\n    elif 8 <= n <= 15:\n        print(8)\n    elif 4 <= n <=7:\n        print(4)\n    elif 2 <= n <= 3:\n        print(2)\n    else:\n        print(1)\n\nif __name__ ==  \"__main__\":\n    main()", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "N = int(input())\nresult = 0\nfor i in range(7):\n  if N >= 2**i:\n    result = 2**i\n  else:\n    None\nprint(result)\n", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "N=int(input())\nans=1\nwhile 2*ans<=N:\n    ans*=2\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "N = int(input())\nans = 1\nwhile ans <= N:\n    ans *= 2\n\nprint(ans//2)", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "n = int(input())\na = n\nm = 0\nfor i in range(n+1):\n    j = 1\n    for h in range(i+1):\n        if i%(2**j) != 0:\n            if m < j-1:\n                m = j-1\n                a = i\n            break\n        j += 1\nprint(a)", "passed": true, "time": 0.14, "memory": 14148.0, "status": "done"}, {"code": "N = int(input())\n\ncount_max = -1\nOK = True\n\nfor i in range(N):\n    count = 0\n    a = N - i\n    while a % 2 == 0:\n        a = a // 2\n        count += 1\n        if count_max < count:\n            count_max = count\n    else:\n        continue\nif 2 ** count_max == 0.5:\n    print(1)\nelse:\n    print(2 ** count_max)", "passed": true, "time": 0.25, "memory": 14092.0, "status": "done"}, {"code": "n = int(input())\n \nk = 0\nwhile 1:\n    if 2 ** k > n:\n        break\n \n    ans = 2 ** k\n    k += 1\n \nprint(ans)", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "import sys\nsys.setrecursionlimit(250000)\n\ndef main():\n    n = int(input())\n\n    if n >= 64 :\n        print((64))\n    elif n >= 32:\n        print((32))\n    elif n >= 16:\n        print((16))\n    elif n >=8 :\n        print((8))\n    elif n >=4 :\n        print((4))\n    elif n>=2:\n        print((2))\n    else:\n        print(n)\nmain()\n\n\n\n#\n# while True:\n#     pair_str = input().split()\n#     pair_int = [int(s) for s in pair_str]\n#     if pair_int[0] == 0 and pair_int[1] == 0 :\n#         break\n#     else:\n#         input_list.append(pair_int)\n\n\n# if b > c * 2 :\n    #     b_price = c\n    #\n    # input_array_list = []\n    #\n    # while True:\n    #     input_array = input().split()\n    #     if input_array[0] == \"0\" and input_array[1] == \"0\":\n    #         break\n    #     else:\n    #         input_array_list.append(input_array)\n    #\n    # for item in input_array_list:\n    #     n = int(item[0])\n    #     k_sum = int(item[1])\n    #\n    #     count = 0\n    #     for i in range(1,n + 1- 2):\n    #         for j in range(i+1, n + 1 - 1):\n    #             for k in range (j+1, n+ 1):\n    #                 if i + j + k == k_sum :\n    #                     count = count + 1\n    #     print(count)\n\n    #\n    # for item in input_array_list:\n    #     if item[1] == \"+\":\n    #         print(str(int(item[0])+int(item[2])))\n    #     elif item[1] ==\"-\":\n    #         print(str(int(item[0])-int(item[2])))\n    #     elif item[1] == \"/\":\n    #         print(str(int(item[0])//int(item[2])))\n    #     elif item[1] == \"*\":\n    #         print(str(int(item[0])*int(item[2])))\n    #\n\n# import sympy as sp\n\n# input_list = []\n# a,b,c = map(int, input().split())\n# divisors = sp.divisors(c)\n#\n# count = 0\n#\n# for divisor in divisors:\n#     if a <= divisor and divisor <= b:\n#         count = count + 1\n# print(count)\n#\n# while True:\n#     pair_str = input().split()\n#     pair_int = [int(s) for s in pair_str]\n#     if pair_int[0] == 0 and pair_int[1] == 0 :\n#         break\n#     else:\n#         input_list.append(pair_int)\n#\n# for pair_int in input_list:\n#     if pair_int[0] <= pair_int[1]:\n#         print(\"{} {}\".format(pair_int[0], pair_int[1]))\n#     else:\n#         print(\"{} {}\".format(pair_int[1], pair_int[0]))\n\n#for i in range(10000):\n#    print(\"Hello World\")\n#a = input().split()\n#a_int = [int(s) for s in a]\n#a_sorted = sorted(a_int)\n#print(' '.join(map(str, a_sorted)))\n", "passed": true, "time": 0.25, "memory": 14092.0, "status": "done"}, {"code": "N = int(input())\ni = 0\nwhile True:\n    if 2**i > N:\n        print(2**(i-1))\n        return\n    i += 1", "passed": true, "time": 0.14, "memory": 14232.0, "status": "done"}, {"code": "import math as mt\nn=int(input())\nprint(2**int(mt.log2(n)))", "passed": true, "time": 0.22, "memory": 14156.0, "status": "done"}, {"code": "from itertools import count\nn = int(input())\nfor i in count(0):\n    if n < 2**(i+1):\n        print(2**i)\n        break", "passed": true, "time": 0.23, "memory": 14272.0, "status": "done"}, {"code": "import math\nn = int(input())\nans = pow(2,int(math.log(n)/math.log(2)))\nprint(ans)", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "N = int(input())\n\ncnt = 0\n\nwhile 2 ** cnt <= N:\n    cnt+=1\n\ncnt-=1\n\nprint(2**cnt)", "passed": true, "time": 0.14, "memory": 14072.0, "status": "done"}, {"code": "n = int(input())\n\n\nclass Solution:\n    def __init__(self, n):\n        self.n = n\n\n    @staticmethod\n    def answer():\n        ans = 1\n        current_zero_count = 0\n        for i in range(1, n + 1):\n            target_zero_count = list(map(int, bin(i)[2:])).count(0)\n            if n == 1:\n                break\n            else:\n                if target_zero_count > current_zero_count:\n                    current_zero_count = target_zero_count\n                    ans = i\n        print(ans)\n\n\nconditions = Solution(n)\nconditions.answer()", "passed": true, "time": 0.14, "memory": 14032.0, "status": "done"}, {"code": "n = int(input())\nans = 1\ncurrent_zero_count = 0\nfor i in range(1, n + 1):\n    target_zero_count = list(map(int, bin(i)[2:])).count(0)\n    if n == 1:\n        break\n    else:\n        if target_zero_count > current_zero_count:\n            current_zero_count = target_zero_count\n            ans = i\nprint(ans)", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "n = int(input())\n\nif n < 2:\n    print(1)\nelif n < 4:\n    print(2)\nelif n < 8:\n    print(4)\nelif n < 16:\n    print(8)\nelif n < 32:\n    print(16)\nelif n < 64:\n    print(32)\nelse:\n    print(64)", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "n = int(input())\nans = 1\nwhile ans <= n:\n    ans *= 2\nprint((ans // 2))\n", "passed": true, "time": 0.14, "memory": 14232.0, "status": "done"}, {"code": "N = int(input())\n\nif 64 <= N:\n   print(64)\nelif 32 <= N:\n   print(32)\nelif 16 <= N:\n   print(16)\nelif 8 <= N:\n   print(8)\nelif 4 <= N:\n   print(4)\nelif 2 <= N:\n   print(2)\nelse:\n   print(1)", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "n = int(input())\nfor i in range(8):\n    if 2**(i) > n:\n        print(2**(i-1))\n        break", "passed": true, "time": 0.14, "memory": 14252.0, "status": "done"}, {"code": "N = int(input())\nresult = 0\nnum = 1\nfor i in range(7):\n  if N >= num:\n    result = num\n  else:\n    None\n  num *= 2\nprint(result)", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "n = int(input())\nmax_count = 0\nans = 1\nfor i in range(1, n + 1):\n  num = i\n  count = 0\n  while num % 2 == 0:\n    num //= 2\n    count += 1\n  if count > max_count:\n    ans = i\n    max_count = count\nprint(ans)", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "N = int(input())\nprint((max(2 ** i if 2 ** i <= N else 0 for i in range(10))))\n", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "\ndef dev2(a):\n    ans = 0 \n    while a%2==0:\n        ans+=1\n        a/=2\n        if a == 0 : break\n    return ans\n\nn = int(input())\nans = 0 \nans_num = 0\nfor i in range(1,n+1):\n    if ans < dev2(i):\n        ans_num = i\n        ans = dev2(i)    \nprint((1 if n==1 else ans_num))\n", "passed": true, "time": 0.14, "memory": 14228.0, "status": "done"}, {"code": "N = int(input())\n\nans = 1\nprev = 0\nfor i in range(1, N + 1):\n    count = 0\n    tmp = i\n    while i % 2 == 0 and 1 < i:\n        count += 1\n        i /= 2\n    if prev < count:\n        prev = count\n        ans = tmp\n\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14312.0, "status": "done"}, {"code": "print(2 ** (len(bin(int(input()))) - 3))", "passed": true, "time": 0.14, "memory": 14072.0, "status": "done"}, {"code": "N=int(input())\ndef rec(n):\n    if n%2==0: return rec(n/2)+1\n    else: return 0\nm,c=0,1\nfor i in range(1,N+1):\n    if m < rec(i):\n        m=rec(i)\n        c=i\nprint(c)", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "def LI(): return list(map(int, input().split()))\ndef I(): return map(int, input().split())\nmod = 10**9 + 7\n\ndef main():\n  n = int(input())\n  cnt = 1\n  while n >= cnt:\n    ans = cnt\n    cnt *= 2\n  print(ans)\ndef __starting_point():\n  main()\n__starting_point()", "passed": true, "time": 0.14, "memory": 14264.0, "status": "done"}]