Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
 r = int(input())
print(R*2*3.14159265359)

Fixed submission:
r = int(input())
print(r*2*3.141592653589793238462643383279502884197169399375105820974944592307816406286)

Buggy python submission (verdict: Runtime Error):
 r = int(input())
print(R*2*3.14)

Fixed submission:
r = int(input())
print(r*2*3.141592653589793238462643383279502884197169399375105820974944592307816406286)
Buggy python submission (verdict: Time Limit Exceeded):
N,K =  map(int,input().split())
if K == 1 or N%K == 0:
    print(0)
    exit()
S = set()
S.add(N)
for x in range(N):
    c = abs(N-K)
    if N == c:
        break
    N = abs(N-K)
    S.add(N)
print(min(S))

Fixed submission:
N,K =  map(int,input().split())
T = N%K
L = [T,abs(T-K)]
print(min(L))
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
if K>=N:
	print(0)
	quit()
L = [int(x) for x in input().split()]
L.sort()
if K:
	for _ in range(K):
		L.remove(L[-1])
print(sum(L))

Fixed submission:
n,k=map(int,input().split())
h=[int(i) for i in input().split()]
h.sort(reverse=True)

if k>=n:
    print(0)
else:
    print(sum(h[k:]))
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
if N == M:
    print("Yes")
else:
    print(No)

Fixed submission:
N,M = map(int,input().split())
if N == M:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import itertools
N = int(input())
P = list(map(int,input().split()))
Q = list(map(int,input().split()))
for i,v in enumerate(list(itertools.permutations(range(1,N+1))), 1):
    if list(v) == P:
        A = i
    elif list(v) == Q:
        B = i
    else:
        pass
try:
    print(abs(A-B))

Fixed submission:
import itertools
N = int(input())
P = list(map(int,input().split()))
Q = list(map(int,input().split()))
num = 0
for v in list(itertools.permutations(range(1,N+1))):
    num += 1
    if list(v) == P:
        A = num
    elif list(v) == Q:
        B = num
    else:
        pass
try:
    print(abs(A-B))
except:
    print(0)

Buggy python submission (verdict: Runtime Error):
import itertools
N = int(input())
P = list(map(int,input().split()))
Q = list(map(int,input().split()))
num = 0
for v in list(itertools.permutations(range(1,N+1))):
    num += 1
    if list(v) == P:
        A = num
    elif list(v) == Q:
        B = num
    else:
        pass
print(abs(A-B))

Fixed submission:
import itertools
N = int(input())
P = list(map(int,input().split()))
Q = list(map(int,input().split()))
num = 0
for v in list(itertools.permutations(range(1,N+1))):
    num += 1
    if list(v) == P:
        A = num
    elif list(v) == Q:
        B = num
    else:
        pass
try:
    print(abs(A-B))
except:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
L = [int(input()) for _ in range(int(input()))]
r = 0
for s in set(L):
    if L.count(s) % 2 == 1:
        r+=1
print(r)

Fixed submission:
S = set()
for _ in range(int(input())):
    A = int(input())
    if A not in S:
        S.add(A)
    else:
        S.remove(A)
print(len(S))

Buggy python submission (verdict: Time Limit Exceeded):
L = [int(input()) for _ in range(int(input()))]
r = 0
for s in set(L):
    C = L.count(s)
    if C == 1:
        r+=1
    else:
        if C % 2 != 0:
            r+=1
print(r)

Fixed submission:
S = set()
for _ in range(int(input())):
    A = int(input())
    if A not in S:
        S.add(A)
    else:
        S.remove(A)
print(len(S))

Buggy python submission (verdict: Time Limit Exceeded):
L = [int(input()) for _ in range(int(input()))]
r = 0
for s in set(L):
    C = L.count(s)
    if C == 1:
        r+=1
    else:
        if L.count(s) % 2 != 0:
            r+=1
print(r)

Fixed submission:
S = set()
for _ in range(int(input())):
    A = int(input())
    if A not in S:
        S.add(A)
    else:
        S.remove(A)
print(len(S))

Buggy python submission (verdict: Time Limit Exceeded):
L = []
for _ in range(int(input())):
    A = int(input())
    if A not in L:
        L.append(A)
    else:
        L.remove(A)
print(len(L))
    

Fixed submission:
S = set()
for _ in range(int(input())):
    A = int(input())
    if A not in S:
        S.add(A)
    else:
        S.remove(A)
print(len(S))
Buggy python submission (verdict: Runtime Error):
N,M=map(int,input())
A=list(map(int,input()))
print(N-sum(A))

Fixed submission:
N,M=map(int,input().split())
A=list(map(int,input().split()))
print(N-sum(A) if N-sum(A) >=0 else -1)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
for i in range(N):
  print(A.count((i+1)))

Fixed submission:
import collections
N=int(input())
A=list(map(int,input().split()))
c=collections.Counter(A)
for i in range(N):
  print(c[i+1])
Buggy python submission (verdict: Time Limit Exceeded):
S=input()
Q=int(input())
checker=-1#-1で正向き、1で反転
for _ in range(Q):
  B=input().split()
  if len(B)==3:
    T,F,C=B
  else:
    T=B[0]
    F,C="",""
    
  if T=="1":
    checker*=-1
  elif T=="2":
    if all([F=="1",checker==-1]):
      S=C+S
    elif all([F=="1",checker==1]):
      S=S+C
    elif all([F=="2",checker==-1]):
      S=S+C
    elif all([F=="2",checker==1]):
      S=C+S
print(S if checker==-1 else "".join(list(reversed(S))))

Fixed submission:
S=input()
Q=int(input())
checker=-1#-1で正向き、1で反転
BUF1,BUF2="",""
for _ in range(Q):
  B=input().split()
  if len(B)==3:
    T,F,C=B
    if all([F=="1",checker==-1]):
      BUF1+=C
    elif all([F=="1",checker==1]):
      BUF2+=C
    elif all([F=="2",checker==-1]):
      BUF2+=C
    elif all([F=="2",checker==1]):
      BUF1+=C
  else:
    checker*=-1
S=BUF1[::-1]+S+BUF2
print(S if checker==-1 else S[::-1])
Buggy python submission (verdict: Runtime Error):
s,t= input().split()
a,b=map(int,input().split())
u=input()
if u==s:
  a-=1
else:
  t-=1
print(a,b)

Fixed submission:
s,t= input().split()
a,b=map(int,input().split())
u=input()
if u==s:
  a-=1
else:
  b-=1
print(a,b)
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split)
print("Yes" if m==n else "No")

Fixed submission:
n,m = map(int,input().split())
print("Yes" if m==n else "No")
Buggy python submission (verdict: Runtime Error):
import numpy as np
n,k,s = map(int,input().split())
a=np.arange(n)
if k>0 & s<=1000000000:
  a[:k]=s
  a[k:]=s+1
elif k>0 & s=1000000000:
  a[:k]=s
  a[k:]=s-1
else:
  a[:]=s+1
for s in a:
  print(s, end =" ")

Fixed submission:
import numpy as np
n,k,s = map(int,input().split())
a=np.arange(n)
if k>0 and s<1000000000:
  a[:k]=s
  a[k:]=s+1
elif k>0 and s>=1000000000:
  a[:k]=s
  a[k:]=s-1
elif k==0 and s>=1000000000:
  a[:]=s-1
else:
  a[:]=s+1
for s in a:
  print(s, end =" ")
Buggy python submission (verdict: Runtime Error):
from sys import stdin


def main():

    R = [int(x) for x in stdin.readline().rstrip().split()]

    print(R*R*3.14)


if __name__ == "__main__":
    main()


Fixed submission:
from sys import stdin


def main():

    R = int(stdin.readline().rstrip())

    print(2*R*3.14)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
from sys import stdin

S, T = stdin.readline().rstrip().split()

print(T+S)
from sys import stdin

S, T = stdin.readline().rstrip().split()

print(T+S)


Fixed submission:
from sys import stdin

S, T = stdin.readline().rstrip().split()

print(T+S)
Buggy python submission (verdict: Runtime Error):
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    ans = A
    sum_ = 1

    while True:
        if ans >= B:
            break

        sum_ += 1

        ans = ans - 1 + A

    print(sum_)


if __name__ == "__main__":
    main()
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    ans = A
    sum_ = 1

    while True:
        if ans >= B:
            break

        sum_ += 1

        ans = ans - 1 + A

    print(sum_)


if __name__ == "__main__":
    main()


Fixed submission:
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    ans = A
    sum_ = 1

    while True:
        if B == 1:
            sum_ = 0
            break

        if ans >= B:
            break

        sum_ += 1

        ans = ans - 1 + A

    print(sum_)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
from sys import stdin


def main():
    N = int(input())
    H = [int(x) for x in stdin.readline().rstrip().split()]

    sum_ = set()
    count = 0

    for i in range(N):
        if H[i] >= H[i+1]:
            count += 1
            sum_.add(count)
        else:
            sum_.add(count)
            count = 0
        if i == N-2:
            break

    print(max(sum_))


if __name__ == "__main__":
    main()


Fixed submission:
from sys import stdin


def main():
    N = int(input())
    H = [int(x) for x in stdin.readline().rstrip().split()]

    sum_ = set()
    count = 0

    if N == 1:
        print(0)
        return

    for i in range(N):
        if H[i] >= H[i+1]:
            count += 1
            sum_.add(count)
        else:
            sum_.add(count)
            count = 0
        if i == N-2:
            break

    print(max(sum_))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
from sys import stdin


def main():

    S = stdin.readline().rstrip()
    S_len = len(S)

    sum = 0
    s = S[0]
    x = 1

    while True:
        if len(s) == 1:
            if s == S[x]:
                s = s + S[x]
            else:
                sum += 1
                s = S[x]
        else:
            sum += 2
            x += 1
            s = S[x]
        x += 1

        if x >= S_len:
            sum += 1
            break

    print(sum)


if __name__ == "__main__":
    main()


Fixed submission:
from sys import stdin


def main():

    S = stdin.readline().rstrip()
    S_len = len(S)

    sum = 0
    s = S[0]
    x = 1

    while True:
        if len(s) == 1:
            if s == S[x]:
                s = s + S[x]
            else:
                sum += 1
                s = S[x]
        else:
            sum += 2
            x += 1

            if x >= S_len:
                break
            s = S[x]
        x += 1

        if x >= S_len:
            sum += 1
            break

    print(sum)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
from sys import stdin


def main():

    S = stdin.readline().rstrip()
    S_len = len(S)

    sum = 0
    s = S[0]
    x = 1

    while True:
        if len(s) == 1:
            if s == S[x]:
                s = s + S[x]
            else:
                sum += 1
                s = S[x]
        else:
            sum += 2
            x += 1
            s = S[x]
        x += 1

        if x == S_len:
            sum += 1
            break

    print(sum)


if __name__ == "__main__":
    main()


Fixed submission:
from sys import stdin


def main():

    S = stdin.readline().rstrip()
    S_len = len(S)

    sum = 0
    s = S[0]
    x = 1

    while True:
        if len(s) == 1:
            if s == S[x]:
                s = s + S[x]
            else:
                sum += 1
                s = S[x]
        else:
            sum += 2
            x += 1

            if x >= S_len:
                break
            s = S[x]
        x += 1

        if x >= S_len:
            sum += 1
            break

    print(sum)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
import math


def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def main():
    N = int(stdin.readline())
    s = [stdin.readline().rstrip().split() for _ in range(N)]

    s_flat = [flatten for inner in s for flatten in inner]

    a = []
    b = set()
    sum = 0

    for S in s_flat:
        new_S = ''.join(sorted(S))
        a.append(new_S)
        b.add(new_S)

    for X in b:
        if a.count(X) == 1:
            pass
        else:
            sum += combinations_count(a.count(X), 2)

    print(sum)


if __name__ == "__main__":
    main()


Fixed submission:
from sys import stdin


def main():
    N = int(stdin.readline())
    s = [stdin.readline().rstrip().split() for _ in range(N)]

    s_flat = [flatten for inner in s for flatten in inner]

    s_dict = {}
    sum = 0

    for S in s_flat:
        new_S = ''.join(sorted(S))
        if not s_dict.get(new_S):
            s_dict[new_S] = 1
        else:
            sum += s_dict[new_S]
            s_dict[new_S] = s_dict[new_S] + 1

    print(sum)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
from sys import stdin


def main():
    N = int(input())
    a = [int(x) for x in stdin.readline().rstrip().split()]
    a_ = {int(x) for x in stdin.readline().rstrip().split()}
    count = 0


    for i in range(N):
        
        if  a[i-1] ^ a[i] in a_ :
            # a_.discard(a[i-1] ^ a[i])
        else:
            count += 1

    if count == 0:
        print("Yes")
    else:
        print("No")    


if __name__ == "__main__":
    main()

Fixed submission:
from sys import stdin


def main():
    _ = int(input())
    a_lists = [int(x) for x in stdin.readline().rstrip().split()]
    z = 0

    for a in a_lists:
        z ^= a

    if z == 0:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
from sys import stdin


def main():
    n = int(input())

    p = stdin.readline().split()
    count = 0

    for i in range(1 , n):
        if p[i-1] >= p[i] >=p[i+1] and  p[i-1] != p[i] or p[i-1] <= p[i] <=p[i+1] and p[i] !=p[i+1]:
            count +=1
    
    print(count)


if __name__ == "__main__":
    main()

Fixed submission:
from sys import stdin


def main():
    n = int(input())

    p = [int(x) for x in stdin.readline().split()]
    count = 0

    for i in range(1 , n-1):
        if p[i-1] > p[i] >p[i+1] or p[i-1] < p[i] < p[i+1]:
            count +=1
    
    print(count)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
from sys import stdin


def main():
    N, L = [int(x) for x in stdin.readline().rstrip().split()]

    apple_list = []

    for i in range(N):
        apple_list.append(L+i)

    s = sorted(apple_list, key=abs)
    s.pop(0)
    print(sum(s))
    //print(123)


if __name__ == "__main__":
    main()


Fixed submission:
from sys import stdin


def main():
    N, L = [int(x) for x in stdin.readline().rstrip().split()]

    apple_list = []

    for i in range(N):
        apple_list.append(L+i)

    s = sorted(apple_list, key=abs)
    s.pop(0)
    print(sum(s))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):

def main():
    N = int(input())
    A = list(map(int, input().split()))
    A_reverse = list(reversed(A))
    left = [0]
    right = [0]
    answer = []
    for n in range(N):
        left.append(gcd(left[n], A[n]))
        right.append(gcd(right[n], A_reverse[n]))
    del left[N]
    del right[N]
    right.reverse()
    for n in range(N-1):
        answer.append(gcd(left[n], right[n]))
    print(max(answer))


def gcd(x, y):
    while y != 0:
        x, y = y, x % y
    return x


if __name__ == "__main__":
    main()


Fixed submission:
from sys import stdin


def main():
    A, B, T = [int(x) for x in stdin.readline().split()]

    print((T // A * B))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def answer(B, C):
    if B > C:
        print("Yes")
    else:
        print("No")


def main():
    A, B, C = [int(x) for x in stdin.readline().split()]
    if A < B:
        answer(B, C)
    else:
        answer(C, B)


if __name__ == "__main__":
    main()


Fixed submission:
from sys import stdin

'''
def answer(A, x, y):
    if A < y < x:
        print("Yes")
    else:
        print("No")
'''


def main():
    A, B, C = [int(x) for x in stdin.readline().split()]
    if A < B:
        if A < C < B:
            print("Yes")
        else:
            print("No")
    else:
        if B < C < A:
            print("Yes")
        else:
            print("No")


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):


def main():
    N = int(input())
    lst = [input().split()for i in range(N)]
    Y = 0

    for i in range(0, N):
        if lst[i][1] == "JPY":
            Y += float(lst[i][0])
        else:
            Y += float(lst[i][0])*380000.0
    print(Y)


if __name__ == "__main__":
    main()

Fixed submission:
def main():
    import datetime
    s = str(input())
    S = datetime.datetime.strptime(s, "%Y/%m/%d")
    if(S <= datetime.datetime(2019, 4, 30)):
        print("Heisei")
    else:
        print("TBD")


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    lst = [input().split()for i in range(N)]
    Y = 0

    for i in range(0, N):
        if str(lst[i][1]) == "JPY":
            Y += float(lst[i][0])
        else:
            Y += float(lst[i][0])*380000.0
    print(Y)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    import datetime
    s = str(input())
    S = datetime.datetime.strptime(s, "%Y/%m/%d")
    if(S <= datetime.datetime(2019, 4, 30)):
        print("Heisei")
    else:
        print("TBD")


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    lst = [input().split()for i in range(N)]
    Y = 0

    for i in range(0, N):
        if lst[i][1] == "JPY":
            Y += float(lst[i][0])
        else:
            Y += float(lst[i][0])*380000.0
    print(Y)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    import datetime
    s = str(input())
    S = datetime.datetime.strptime(s, "%Y/%m/%d")
    if(S <= datetime.datetime(2019, 4, 30)):
        print("Heisei")
    else:
        print("TBD")


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    lst = [input().split()for i in range(N)]
    Y = 0

    for i in range(0, N):
        if lst[i][1] == "JPY":
            Y += float(lst[i][0])
        else:
            Y += float(lst[i][0])*380000.0
    print(Y)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    import datetime
    s = str(input())
    S = datetime.datetime.strptime(s, "%Y/%m/%d")
    if(S <= datetime.datetime(2019, 4, 30)):
        print("Heisei")
    else:
        print("TBD")


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
from re import search


# f = open("./16/input_c2_2.txt")


# def input():
#     return f.readline().rstrip()


def main():
    S = input()

    while True:
        result_1 = search('dreamer$', S)
        result_2 = search('eraser$', S)
        result_3 = search('erase$', S)
        result_4 = search('dream$', S)

        if result_1:
            S = S[:result_1.start()]
        elif result_2:
            S = S[:result_2.start()]
        elif result_3:
            S = S[:result_3.start()]
        elif result_4:
            S = S[:result_4.start()]
        else:
            print("NO")
            break

        if len(S) == 0:
            print("YES")
            break


if __name__ == "__main__":
    main()


Fixed submission:

def main():
    S = input()
    while True:
        if S[-7:] == "dreamer":
            S = S[:-7]
        elif S[-6:] == "eraser":
            S = S[:-6]
        elif S[-5:] == "erase":
            S = S[:-5]
        elif S[-5:] == "dream":
            S = S[:-5]
        else:
            print("NO")
            break

        if len(S) == 0:
            print("YES")
            break


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):

def main():
    S = input()

    while True:
        result_1 = search('dreamer$', S)
        result_2 = search('eraser$', S)
        result_3 = search('erase$', S)
        result_4 = search('dream$', S)

        if result_1:
            S = S[:result_1.start()]
        elif result_2:
            S = S[:result_2.start()]
        elif result_3:
            S = S[:result_3.start()]
        elif result_4:
            S = S[:result_4.start()]
        else:
            print("NO")
            break

        if len(S) == 0:
            print("YES")
            break


if __name__ == "__main__":
    main()


Fixed submission:

def main():
    S = input()
    while True:
        if S[-7:] == "dreamer":
            S = S[:-7]
        elif S[-6:] == "eraser":
            S = S[:-6]
        elif S[-5:] == "erase":
            S = S[:-5]
        elif S[-5:] == "dream":
            S = S[:-5]
        else:
            print("NO")
            break

        if len(S) == 0:
            print("YES")
            break


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
for i in range(1,N+1):
    print(A.count(i))


Fixed submission:
N = int(input())
A = list(map(int,input().split()))
L = [0] * (N + 1)

for i in A:
    L[i] += 1

for i in range(1,len(L)):
    print(L[i])
Buggy python submission (verdict: Runtime Error):
N, M = map(int,input().split())
A = list(map(int,input().split()))
S = sum(A)
cnt = 0 

for a in A:
    if a >= S / (4*M):
        cnt += 1
    if cnt >= M:
        print("Yes")
    else:
        print("No")

Fixed submission:
a, b, c = map(int,input().split())
a,b = b,a
a,c = c,a 

print(a,b,c)
Buggy python submission (verdict: Runtime Error):
import math
 
a= int(input)
 
print(2 * a * math.pi)

Fixed submission:
import math
 
a= int(input())
 
print(2 * a * math.pi)

Buggy python submission (verdict: Runtime Error):
import math

a= int(input)

print(2 * a * mathpi)

Fixed submission:
import math
 
a= int(input())
 
print(2 * a * math.pi)
Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
list_1 = list(map(int, input().split()))
 
i=0
sum=0
 
while i<=M:
  sum=sum+list_1[i]
  i=i+1
  
if sum>N:
  print("-1")
  
else:
  print(sum-N)

Fixed submission:
N,M = map(int, input().split())
list_1 = list(map(int, input().split()))
 
i=0
sum=0
 
while i<M:
  sum=sum+list_1[i]
  i=i+1
  
if sum>N:
  print("-1")
  
else:
  print(abs(sum-N))

Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
list = list(map(int, input().split()))

i=0
sum=0

while i<=M:
  sum=sum+list[i]
  i=i+1
  
if sum>N:
  print("-1")
  
else:
  print(sum-N)

Fixed submission:
N,M = map(int, input().split())
list_1 = list(map(int, input().split()))
 
i=0
sum=0
 
while i<M:
  sum=sum+list_1[i]
  i=i+1
  
if sum>N:
  print("-1")
  
else:
  print(abs(sum-N))
Buggy python submission (verdict: Runtime Error):
import math
A,H==(float(x) for x in input().split())
print(math.ceil(H/A))


Fixed submission:
import math
H,A=(float(x) for x in input().split())
print(math.ceil(H/A))

Buggy python submission (verdict: Runtime Error):
import math
A,H=input().split()
print(math.ceil(H/A))


Fixed submission:
import math
H,A=(float(x) for x in input().split())
print(math.ceil(H/A))
Buggy python submission (verdict: Runtime Error):
mport numpy as np
import math

H = input()
H_bar=int(H)
counter=0
bunki=0

while H_bar!=1:
 H_bar=math.floor(H_bar/2)
 bunki=bunki+2**counter
 counter=counter+1
  
Sum=bunki+2**counter
print(Sum)

Fixed submission:
import numpy as np
import math

H = input()
H_bar=int(H)
counter=0
bunki=0

while H_bar!=1:
 H_bar=math.floor(H_bar/2)
 bunki=bunki+2**counter
 counter=counter+1
  
Sum=bunki+2**counter
print(Sum)