Square1001 has seen an electric bulletin board displaying the integer 1.
He can perform the following operations A and B to change this value:
 - Operation A: The displayed value is doubled.
 - Operation B: The displayed value increases by K.
Square1001 needs to perform these operations N times in total.
Find the minimum possible value displayed in the board after N operations.

-----Constraints-----
 - 1 \leq N, K \leq 10
 - All input values are integers.

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

-----Output-----
Print the minimum possible value displayed in the board after N operations.

-----Sample Input-----
4
3

-----Sample Output-----
10

The value will be minimized when the operations are performed in the following order: A, A, B, B.

In this case, the value will change as follows: 1 → 2 → 4 → 7 → 10.
[{"code": "#!/usr/bin/env python3\nimport sys\nsys.setrecursionlimit(10**6)\n\nn = int(input())\nk = int(input())\n\nans = 1\nfor i in range(n):\n    if ans*2 <= (ans+k):\n        ans *= 2\n    else:\n        ans += k\n    # print(ans)\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14156.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\nvalue = 1\n\nfor i in range(N):\n  if(value * 2 <= value + K):\n    value = value * 2\n  else:\n    value = value + K\n\nprint(value)", "passed": true, "time": 0.18, "memory": 14184.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\ncnt = 1\nfor _ in range(n):\n    cnt = min(cnt*2, cnt+k)\nprint(cnt)", "passed": true, "time": 0.15, "memory": 14064.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\nans = 1\nfor _ in range(N):\n    if ans * 2 <= ans + K:\n        ans *= 2\n    else:\n        ans += K\nprint(ans)\n", "passed": true, "time": 0.18, "memory": 14284.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\nans=1\nfor _ in range(n):\n    if(ans*2 < ans+k):\n        ans=ans*2\n    else:\n        ans=ans+k\n        \nprint(ans)", "passed": true, "time": 0.43, "memory": 13872.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\nstart = 1\n\nfor n in range(N):\n    start = min(start*2, start+K)\n\nprint(start)\n", "passed": true, "time": 0.48, "memory": 14156.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\nans = 1\nfor _ in range(N):\n    ans = min(ans * 2, ans + K)\nprint(ans)", "passed": true, "time": 0.43, "memory": 13800.0, "status": "done"}, {"code": "a=int(input())\nb=int(input())\nc=1\nfor i in range(a):\n  if 2*c<=c+b:\n    c=2*c\n  else:\n    c=c+b\nprint(c)", "passed": true, "time": 0.22, "memory": 14180.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\nans = 1\nfor _ in range(N):\n  ans = min(ans*2,ans+K)\nprint(ans)", "passed": true, "time": 0.32, "memory": 14052.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nref = 1\n\nfor i in range(n):\n  if ref * 2 < ref + k:\n    ref *= 2\n  else:\n    ref += k\n\nprint(ref)", "passed": true, "time": 0.22, "memory": 14176.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\ndis = 1\nfor i in range(n):\n    if dis*2 <= dis+k:\n        dis *= 2\n    else:\n        dis += k\nprint(dis)", "passed": true, "time": 0.3, "memory": 14152.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\ntmp = 1\nfor i in range(n):\n    tmp = min(tmp * 2, tmp + k)\nprint(tmp)\n", "passed": true, "time": 0.32, "memory": 14264.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\na = 1\nfor i in range(n):\n    if a <= k:\n        a *= 2\n    else:\n        a += k\nprint(a)", "passed": true, "time": 0.24, "memory": 14056.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\na = 1\nfor i in range(n):\n  a = min(2*a,a+k)\nprint(a)", "passed": true, "time": 0.15, "memory": 14200.0, "status": "done"}, {"code": "N=int(input())\nK=int(input())\n\nans=1\nfor i in range(N):\n    if ans<=K:\n        ans*=2\n    else:\n        ans+=K\n\nprint(ans)", "passed": true, "time": 0.23, "memory": 14212.0, "status": "done"}, {"code": "N=int(input())\nK=int(input())\nstart=1\nfor i in range(N):\n    start_a=start*2\n    start_b=start+K\n    if start_a<=start_b:\n        start=start_a\n    else:\n        start=start_b\n\nprint(start)", "passed": true, "time": 0.15, "memory": 14276.0, "status": "done"}, {"code": "# -*- coding: utf-8 -*-\nn = int(input())\nk = int(input())\nans = 1\nfor i in range(n):\n    ans = min(ans*2, ans+k)\n\nprint(ans)\n", "passed": true, "time": 0.21, "memory": 14184.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nc = 1\nfor i in range(n):\n  if c > k:\n    c += k\n  else:\n    c *= 2\nprint(c)", "passed": true, "time": 0.15, "memory": 14152.0, "status": "done"}, {"code": "N,K = [int(input()) for _ in range(2)]\n\nans = 1\n\nfor _ in range(N):ans = min(ans+K,ans*2)\n\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\nans = 1\nfor i in range(N):\n    ans = min(ans*2, ans+K)\nprint(ans)\n", "passed": true, "time": 0.15, "memory": 14056.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nnum = 1\n\nfor i in range(n):\n    num = min(num + k, num * 2)\n    \nprint(num)", "passed": true, "time": 0.18, "memory": 14048.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\nans = 1\n\ndef A(n):\n   return 2 * n\n\ndef B(n):\n   return n + K\n\nfor i in range(N):\n   if A(ans) <= B(ans):\n      ans = A(ans)\n   else:\n      ans = B(ans)\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\na=1\nfor _ in range(n):\n  if a<k:\n    a*=2\n  else:\n    a+=k\nprint(a)", "passed": true, "time": 0.15, "memory": 14048.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\nx = 1\nfor i in range(n):\n    x = min(x * 2, x + k)\nprint(x)\n", "passed": true, "time": 0.15, "memory": 14296.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\nans = 1\nfor i in range(n):\n    if ans >= k:\n        ans += k\n    else:\n        ans *= 2\nprint(ans)", "passed": true, "time": 0.14, "memory": 14048.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\nans=1\nfor _ in range(n):\n  if ans<k:ans*=2\n  else:ans+=k\nprint(ans)", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "n,k=int(input()),int(input());a=1\nwhile a<=k:\n  if n==0:\n    print(a)\n    return\n  a*=2\n  n-=1\nwhile n>0:\n  a+=k\n  n-=1\nprint(a)", "passed": true, "time": 0.13, "memory": 14252.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\ngiven_integer=1\n#Option A:-To Increase The Value By double\n#Option B:-To Increase Value By K\n\nfor i in range(0,n):\n\tgiven_integer=min(given_integer*2,given_integer+k)\n\nprint((int(given_integer)))\n", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "n,k = int(input()),int(input())\n# Greedy\nans = 1\nfor i in range(n):\n    ans = min(ans+k, ans*2)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14188.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nans = 1\nfor _ in range(n):\n    if ans < k:\n        ans *= 2\n    else:\n        ans += k\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\ncnt = 1\ntmp = 0\nfor i in range(n):\n    cnt = min(cnt*2, cnt + k)\nprint(cnt)", "passed": true, "time": 0.14, "memory": 14024.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nans = 1\nfor i in range(n):\n  ans = min(ans*2,ans+k)\nprint(ans)", "passed": true, "time": 0.16, "memory": 14152.0, "status": "done"}, {"code": "n, k = [int(input()) for _ in range(2)]\n\nresult = 10 ** 9\n\nfor bit in range(2 ** n):\n  \n  tmp = 1\n  for i in range(n):\n    if bit & (1 << i):\n      tmp *= 2\n    else:\n      tmp += k\n  \n  result = min(result, tmp)\n  \nprint(result)", "passed": true, "time": 0.24, "memory": 14100.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\na=1\nfor i in range(n):\n  if a<=k:\n    a*=2\n  else:\n    a+=k\n\nprint(a)", "passed": true, "time": 0.16, "memory": 14136.0, "status": "done"}, {"code": "n, k = (int(input()) for i in range(0, 2))\nans = 1\nfor i in range(0, n):\n    if ans * 2 <= ans + k: ans *= 2\n    else: ans += k\nprint(ans)", "passed": true, "time": 0.15, "memory": 14176.0, "status": "done"}, {"code": "n,k = [int(input()) for i in range(2)]\n\nnumber=1\n\nfor i in range(n):\n    number = min(2*number, number+k)\nprint(number)", "passed": true, "time": 0.16, "memory": 14168.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nans = 1\nfor _ in range(n):\n    if ans * 2 > ans + k:\n        ans += k\n    else:\n        ans *= 2\nprint(ans)", "passed": true, "time": 0.27, "memory": 14020.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\nres = 1\nfor i in range(N):\n    if(K >= res):\n        res *= 2\n    else:\n        res += K\nprint(res)\n", "passed": true, "time": 0.16, "memory": 14264.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nnum = 1\nfor i in range(n):\n    if num*2 <= num+k:\n        num *= 2\n    else:\n        num += k\n\nprint(num)", "passed": true, "time": 0.16, "memory": 14144.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\na = 1\nfor i in range(n):\n    if a <= k:\n        a *= 2\n    else:\n        a += k\nprint(a)", "passed": true, "time": 0.24, "memory": 14148.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\nX = 1\nfor i in range(N):\n    if X<K:\n        X += X\n    else:\n        X += K\n\nprint(X)\n", "passed": true, "time": 0.15, "memory": 14040.0, "status": "done"}, {"code": "# coding: utf-8\nimport math\n\nans = 1\ncount = 0\nnum1 = int(input())\nnum2 = int(input())\nfor i in range(num1):\n    if ans < num2:\n        ans *= 2\n    else:\n        ans += num2\nprint(ans)", "passed": true, "time": 0.14, "memory": 14168.0, "status": "done"}, {"code": "ans=float('inf')\nn,k=int(input()),int(input())\nfor i in range(2**n):\n    ans=min(ans,eval('('*n+'1'+\"\".join('*2)'if (i>>j)%2 else '+'+str(k)+')' for j in range(n))))\nprint(ans)", "passed": true, "time": 0.16, "memory": 14172.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\na = 1\nfor i in range(n):\n    if a<k:\n        a = a*2\n    else:\n        a+=k\nprint(a)", "passed": true, "time": 0.22, "memory": 14280.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nx = 1\nfor i in range(n):\n  if x + k <= 2*x:\n    x += k\n  else:\n    x *= 2\nprint(x)", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\nstart = 1\nfor i in range(N):\n  start = min(start * 2, start + K)\n\nprint(str(start))", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\nj = 1\ndef func(x, y):\n    r = (x * 2) if (x * 2) < (x + y) else  (x + y)\n    return r\n\nfor i in range(N):\n    j = func(j, K)\nprint(j)", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\nans = 1\n\nfor i in range (0 , n):\n    ans = min(2 * ans, ans + k)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nnumb = 1\nfor i in range(n):\n    if 2*numb < numb+k:\n        numb *= 2\n    else:\n        numb += k\nprint(numb)", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "N=int(input())\nK=int(input())\nx=1\nfor _ in range(N):\n    x=min(2*x,x+K)\nprint(x)\n", "passed": true, "time": 0.14, "memory": 14048.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\nout =  1\nflg = 0\nfor i in range(N):#A\u306e\u56de\u6570\u3092\u6570\u3048\u308b\u305f\u3081\u306e\u30eb\u30fc\u30d7\n    if not flg:#\u30d5\u30e9\u30b0\u304c\u7acb\u3063\u3066\u306a\u304b\u3063\u305f\u3089\u64cd\u4f5cA\n        out *= 2\n        if out > K:\n            flg = 1\n    else:#\u30d5\u30e9\u30b0\u304c\u7acb\u3063\u305f\u3089\u64cd\u4f5cB\n        out += K\n\nprint(out)", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "def main():\n    n = int(input())\n    k = int(input())\n\n    ans = 1\n    for i in range(n):\n        ans = min(2*ans, ans+k)\n    print(ans)\n\n\nmain()", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\ns=1\nfor i in range(n):\n  s=min(s*2,s+k)\nprint(s)", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "N=int(input())\nK=int(input())\nans=1000\nfor i in range(N+1):\n    num=1\n    for s in range(i):\n        num = num*2\n    \n    for t in range(N-i):\n        num += K\n    \n    if num < ans:\n        ans = num\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "#76B\nn=int(input())\nk=int(input())\nf=1\nfor i in range(0,n):\n    if f*2<f+k:\n        f=f*2\n    else:\n        f=f+k\nprint(f)", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "n,k=int(input()),int(input())\nans=1\ni=0\nwhile i!=n:\n    if ans>=k:\n        ans+=k\n    else:\n        ans*=2\n    i+=1\nprint(ans)", "passed": true, "time": 0.26, "memory": 14300.0, "status": "done"}, {"code": "#!/usr/bin/env python3\n\nN = int(input())\nK = int(input())\n\nans = 1\nfor i in range(N):\n    a = ans * 2\n    b = ans + K\n    ans = min(a, b)\nprint(ans)\n", "passed": true, "time": 0.23, "memory": 14248.0, "status": "done"}, {"code": "N=int(input())\nK=int(input())\na=1\nfor i in range(N):\n  if a < K:\n    a *= 2\n  else:\n    a += K\nprint(a)", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\nx = 1\nfor _ in range(N):\n  x += min(x, K)\n\nprint(x)", "passed": true, "time": 0.32, "memory": 14260.0, "status": "done"}, {"code": "n, k = [int(input()) for i in range(2)]\na = 1\nfor i in range(n):\n  if a * 2 > a + k:\n    a += k\n  else:\n    a *= 2\nprint(a)", "passed": true, "time": 0.37, "memory": 14252.0, "status": "done"}, {"code": "n,k = int(input()),int(input())\nans = 1\nfor i in range(n):\n    ans = min(ans+k,ans*2)\nprint(ans)\n", "passed": true, "time": 0.37, "memory": 14024.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\nans = 1\n\nfor i in range(n):\n    ans = min(ans*2, ans+k)\n\nprint(ans)", "passed": true, "time": 0.38, "memory": 14212.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\nstart = 1\nfor i in range(N):\n    start = min(start*2, start+K)\nprint(start)", "passed": true, "time": 0.37, "memory": 14044.0, "status": "done"}, {"code": "def answer(n: int, k: int) -> int:\n    current_num = 1\n    for _ in range(n):\n        current_num = min(current_num * 2, current_num + k)\n\n    return current_num\n\n\ndef main():\n    n =int(input())\n    k = int(input())\n    print((answer(n, k)))\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.21, "memory": 14064.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\nres = 1\nfor i in range(n):\n    if res >= k:\n        res += k\n    else:\n        res *= 2\nprint(res)\n", "passed": true, "time": 0.18, "memory": 14048.0, "status": "done"}, {"code": "N=int(input())\nK=int(input())\n\n#A+B=N\n#A:C[i]*2 \n#B:C[i]+K\n  \nC=1\nfor i in range(N):\n  if C*2>C+K:\n    C=C+K\n  else:\n    C=C*2\n    \nprint(C)\n  \n\n", "passed": true, "time": 0.21, "memory": 14184.0, "status": "done"}, {"code": "def solve():\n    n = int(input())\n    k = int(input())\n    ans = 1\n    for i in range(n):\n        if ans < k:\n            ans *= 2\n        else:\n            ans += k\n\n    print(ans)\n\n\ndef __starting_point():\n    solve()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n \nnum = 1\ncount = 0\n \nwhile count < n:\n    num = min(num * 2, num + k)\n    count += 1\n  \nprint(num)", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\nans = 1\nfor r in range(n):\n    if ans <= k:\n        ans *= 2\n    else:\n        ans += k\n\nprint(ans)", "passed": true, "time": 0.25, "memory": 14228.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\ninit = 1\nfor i in range(N):\n    init = min(init*2, init + K)\nprint(init)", "passed": true, "time": 0.25, "memory": 14064.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\na = 1\nfor _ in range(N):\n    if a*2 < a+K:\n        a *= 2\n    else:\n        a += K\nprint(a)", "passed": true, "time": 0.14, "memory": 14284.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\n\nnum=1\nfor i in range(n):\n  num=min(num*2,num+k)\n\nprint(num)", "passed": true, "time": 0.16, "memory": 14216.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\nans=1\nfor i in range(n):\n    if ans<k:\n        ans*=2\n    else:\n        ans+=k\nprint(ans)", "passed": true, "time": 0.15, "memory": 14040.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\nans = 1\nfor _ in range(N):\n    if ans + K < 2 * ans:\n        ans += K\n    else:\n        ans *= 2\nprint(ans)", "passed": true, "time": 0.15, "memory": 14076.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\ni=1\nfor _ in range(n):\n    i = i+min(i,k)\nprint(i)", "passed": true, "time": 0.15, "memory": 14080.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\n\nfrom itertools import product\n\npr = list(product([0,1],repeat=n))\n\nans=float('inf')\nfor p in pr:\n\n    tmp=1\n    for i in p:\n        if i==0:\n            tmp*=2\n        else:\n            tmp+=k\n\n    ans= min(ans,tmp)\n\n\nprint(ans)\n\n", "passed": true, "time": 0.23, "memory": 14324.0, "status": "done"}, {"code": "n = int(input())\nk = int(input()) \nmn = 1\nfor i in range(n):\n    if mn + k  <= mn *2:\n      mn += k\n    else:\n      mn = mn * 2\nprint(mn)\n", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\ns = 1\nfor _ in range(N):\n    s = min(s * 2, s + K)\nprint(s)", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\ncnt = 1\nfor _ in range(n):\n    if cnt <= k:\n        cnt *= 2\n    else:\n        cnt += k\nprint(cnt)", "passed": true, "time": 0.13, "memory": 14208.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\n\nans = float(\"inf\")\nfor i in range(N+1):\n  num = 1 * (2 ** i) + K * (N - i)\n  ans = min(ans, num)\n  \nprint(ans)", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\nans = 1\nfor i in range(N):\n    ans = min(2*ans,ans+K)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "N = int (input ())\nK = int (input ())\ns = 1\nfor i in range (N):\n  if s < K:\n    s = s*2\n  else:\n    s += K\nprint (s)", "passed": true, "time": 0.14, "memory": 14140.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\na = 1\nfor _ in range(N):\n    a = min(a*2, a+K)\nprint(a)", "passed": true, "time": 0.15, "memory": 14264.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\nx = 1\nfor _ in range(N):\n\tx = min(x * 2, x + K)\nprint(x)", "passed": true, "time": 0.22, "memory": 14064.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nans = 1\nfor _ in range(n):\n  ans = min(ans*2, ans+k)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14024.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\ndisplay = 1\n\nfor i in range(N):\n    display = min(display*2, display + K)\nprint(display)\n", "passed": true, "time": 0.23, "memory": 14084.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\n\nans = 1\nfor i in range(n):\n  ans = min(ans * 2, ans + k)\n  \nprint(ans)", "passed": true, "time": 0.14, "memory": 14080.0, "status": "done"}, {"code": "import sys\n\ninput = sys.stdin.readline\nN = int(input())\nK = int(input())\n\nc = 0\ntmp = 1\nwhile c < N:\n    if tmp < K:\n        tmp *= 2\n    else:\n        tmp += K\n    c += 1\n    # print(tmp)\n\nprint(tmp)", "passed": true, "time": 0.14, "memory": 14084.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nx = 1\nfor i in range(a):\n    if x + b > x * 2:\n        x = x * 2\n    else:\n        x = x + b\nprint(x)", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "n,k=int(input()),int(input());a=1\nfor _ in range(n): a=min(2*a,k+a)\nprint(a)", "passed": true, "time": 0.14, "memory": 14080.0, "status": "done"}, {"code": "N=int(input())\nK=int(input())\nres=1\nfor i in range(N) :\n  if res*2<=res+K :\n    res*=2\n  else :\n    res+=K\nprint(res)", "passed": true, "time": 0.14, "memory": 14048.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nans = 1\nfor i in range(n):\n    ans = min(ans*2,ans+k)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\nans=1\nfor i in range(n):\n    ans=min(ans+k,ans*2)\nprint(ans)", "passed": true, "time": 0.15, "memory": 14060.0, "status": "done"}, {"code": "N=int(input())\nK=int(input())\nnow=1\nfor i in range(N):\n    now=min(now*2,now+K)\nprint(now)", "passed": true, "time": 0.14, "memory": 14156.0, "status": "done"}, {"code": "n = int(input())\nk = int(input())\nc = 1\nfor i in range(n):\n  c = min(2*c, c+k)\nprint(c)", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "import bisect, collections, copy, heapq, itertools, math, string, sys\ninput = lambda: sys.stdin.readline().rstrip() \nsys.setrecursionlimit(10**7)\nINF = float('inf')\ndef I(): return int(input())\ndef F(): return float(input())\ndef SS(): return input()\ndef LI(): return [int(x) for x in input().split()]\ndef LI_(): return [int(x)-1 for x in input().split()]\ndef LF(): return [float(x) for x in input().split()]\ndef LSS(): return input().split()\n\ndef resolve():\n    N = I()\n    K = I()\n\n    ans = 1\n    while ans < K and N > 0:\n        ans *= 2\n        N -= 1\n    ans += N * K\n\n    print(ans)\n\ndef __starting_point():\n    resolve()\n\n__starting_point()", "passed": true, "time": 0.15, "memory": 14140.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\nans = 1\n\nfor i in range(N):\n  if ans > K:\n    ans += K\n  else:\n    ans *= 2\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "N = int(input())\nK = int(input())\nv = 1\nfor _ in range(N):\n    if v <= K:\n        v *= 2\n    else:\n        v += K\nprint(v)", "passed": true, "time": 0.14, "memory": 14020.0, "status": "done"}, {"code": "n=int(input())\nk=int(input())\nans=1\nfor i in range(n):\n  if ans*2 >= ans+k:\n    ans=ans+k\n  else:\n    ans=ans*2\nprint(ans)", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}]