Harryxun/stf_run huggingface dataset:
a = list(sorted(map(int, input().split())))
if (a[2] - a[0]) % 2 == 0 and (a[2] - a[1]) % 2 == 0:
    print((a[2] - a[0]) // 2 + (a[2] - a[1]) // 2)
elif (a[2] - a[0]) % 2 == 1 and (a[2] - a[1]) % 2 == 1:
    print((a[2] - a[0]) // 2 + (a[2] - a[1]) // 2 + 1)
else:
    if (a[2] - a[0]) % 2 == 1:
        a[0] += 3
        a[1] += 2
        a[2] += 1
    else:
        a[1] += 3
        a[0] += 2
        a[2] += 1
    a = sorted(a)
    if (a[2] - a[0]) % 2 == 0 and (a[2] - a[1]) % 2 == 0:
        print((a[2] - a[0]) // 2 + (a[2] - a[1]) // 2 + 3)
    elif (a[2] - a[0]) % 2 == 1 and (a[2] - a[1]) % 2 == 1:
        print((a[2] - a[0]) // 2 + (a[2] - a[1]) // 2 + 1 + 3)
    else:
        raise


### FIXED CODE ###

a = list(sorted(map(int, input().split())))
if (a[2] - a[0]) % 2 == 0 and (a[2] - a[1]) % 2 == 0:
    print((a[2] - a[0]) // 2 + (a[2] - a[1]) // 2)
elif (a[2] - a[0]) % 2 == 1 and (a[2] - a[1]) % 2 == 1:
    print((a[2] - a[0]) // 2 + (a[2] - a[1]) // 2 + 1)
else:
    if (a[2] - a[0]) % 2 == 1:
        a[0] += 2
        a[1] += 1
        a[2] += 1
    else:
        a[0] += 1
        a[1] += 2
        a[2] += 1
    a = sorted(a)
    if (a[2] - a[0]) % 2 == 0 and (a[2] - a[1]) % 2 == 0:
        print((a[2] - a[0]) // 2 + (a[2] - a[1]) // 2 + 2)
    elif (a[2] - a[0]) % 2 == 1 and (a[2] - a[1]) % 2 == 1:
        print((a[2] - a[0]) // 2 + (a[2] - a[1]) // 2 + 1 + 2)
    else:
        raise
import numpy as np
n=int(input())
a=np.array( [int(i) for i in input().split()])
b=np.array([99]*n)
for i in range(n//2,n):
    b[i]=a[i]
print(b)
for i in range(n//2,0,-1):        
    cand = np.array([i*j for j in range(2,n//i+1)])
    print(i,cand,a[cand-1])
    if sum(a[cand-1])%2==0:
        b[i-1]=a[i-1]
    else:
        b[i-1]=1-a[i-1]
posi=np.where(b==1)[0]
print(len(posi))
for j in range(len(posi))):
    print(posi[j],end=" ")

### FIXED CODE ###

n=int(input())
a=[int(i) for i in input().split()]
b=[99]*n
for i in range(n//2,n):
    b[i]=a[i]
for i in range(n//2-1,-1,-1):
    s = sum(b[(i+1)*j-1] for j in range(2,n//(i+1)+1))
    if s%2==0:
        b[i]=a[i]
    else:
        b[i]=1-a[i]
print(sum(b))
print(*[i+1 for i in range(n) if b[i]==1])
a,b=input().split()
ai=int(a)
bf100=b*100

print(int(ai*bf100/100))

### FIXED CODE ###

a,b=input().split()
ai=int(a)
bi=int(float(b)*100)//1
bi=int(b.replace('.',''))

print(ai*bi//100)
n = int(input())
h = list(map(int,input().split()))
x = []
y = 0

for i in range(n-1):
    if h[i] < h[i+1]:
        y = 0
    else:
        y = y + 1
    x.append(y)
 
print(max(x))

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
x = []
y = 0

if n == 1:
    print(0)

else:
    for i in range(n-1):
        if h[i] < h[i+1]:
            y = 0
        else:
            y = y + 1
        x.append(y)
 
    print(max(x))
n=input()
mx=0
for a in map(int,input().split()):
    i=0
    if a%2!=0: break
    while a%2==0:
        i+=1
        mx=i
        a/=2
    if mx<i:
        mx=i

print(mx)


### FIXED CODE ###

ls=input()
i=0
for x in ls:
    if x=='1':
        i+=1

print(i)
D,T,S=map(int,input().split())
if D<T*S:
  print(Yes)
else:
  print(No)

### FIXED CODE ###

D,T,S=map(int,input().split())
if T*S>=D:
  print("Yes")
else:
  print("No")
import sys
input = sys.stdin.readline

N = int(input())
A = map(int, input().split())

A.sort()

ans = 1
for a in A:
  ans = ans * a
  if ans > 1000000000000000000:
    print -1
    quit()

print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.readline

N = int(input())
A = list(map(int, input().split()))

A.sort()

ans = 1
for a in A:
  ans = ans * a
  if ans > 1000000000000000000:
    print(-1)
    quit()

print(ans)
#!/usr/bin/python3

import random, math

def lcm(a, b):
    return (a // math.gcd(a, b)) * b

def is_prime(n):
    i = 2
    while i * i <= n:
        if n % i == 0:
            return False
        i += 1
    return True

def primes(n):
    lst = []
    for i in range(2, n + 1):
        if is_prime(i):
            lst.append(i)
    return lst

n = int(input())

a = [[None for j in range(n)] for i in range(n)]

lst = [(i,j) for i in range(n) for j in range(n - 1, -1, -1)]

used = set()
pr = primes(10 ** 4)

off = 0
while pr[off] < n + 3:
    off += 1

for (i, j) in lst:
    if (i + j) % 2 == 0:
        A = (i + j) // 2
        B = n + (i - j) // 2
        a[i][j] = (A + 1) * (pr[off + B])
        if a[i][j] in used:
            print(101, a[i][j])
            raise ValueError()
        used.add(a[i][j])
        
for (i, j) in lst:
    if (i + j) % 2 == 0:
        continue
    
    val = 1
    for (ip, jp) in [(i - 1, j), (i + 1, j), (i, j - 1), (i, j + 1)]:
        if 0 <= ip < n and 0 <= jp < n and a[ip][jp] != None:
            val = lcm(val, a[ip][jp])

    if val >= 5 * 10 ** 14:
        print("ERR", val)
        raise ValueError()
    
    res = val + 1
    while res in used:
        k = random.randint(1, (10 ** 15 - 1) // val)
        res = k * val + 1

    a[i][j] = res
    used.add(res)

for i in range(n):
    print(" ".join(map(str, a[i])))


### FIXED CODE ###

#!/usr/bin/python3

import random, math, fractions

def lcm(a, b):
    return (a // fractions.gcd(a, b)) * b

def is_prime(n):
    i = 2
    while i * i <= n:
        if n % i == 0:
            return False
        i += 1
    return True

def primes(n):
    lst = []
    for i in range(2, n + 1):
        if is_prime(i):
            lst.append(i)
    return lst

n = int(input())

a = [[None for j in range(n)] for i in range(n)]

lst = [(i,j) for i in range(n) for j in range(n - 1, -1, -1)]

used = set()
pr = primes(10 ** 4)

off = 0
while pr[off] < n + 3:
    off += 1

for (i, j) in lst:
    if (i + j) % 2 == 0:
        A = (i + j) // 2
        B = n + (i - j) // 2
        a[i][j] = (A + 1) * (pr[off + B])
        if a[i][j] in used:
            print(101, a[i][j])
            raise ValueError()
        used.add(a[i][j])
        
for (i, j) in lst:
    if (i + j) % 2 == 0:
        continue
    
    val = 1
    for (ip, jp) in [(i - 1, j), (i + 1, j), (i, j - 1), (i, j + 1)]:
        if 0 <= ip < n and 0 <= jp < n and a[ip][jp] != None:
            val = lcm(val, a[ip][jp])

    if val >= 5 * 10 ** 14:
        print("ERR", val)
        raise ValueError()
    
    res = val + 1
    while res in used:
        k = random.randint(1, (10 ** 15 - 1) // val)
        res = k * val + 1

    a[i][j] = res
    used.add(res)

for i in range(n):
    print(" ".join(map(str, a[i])))
n, W = map(int, input().split())
MAX_V = 1000
dp = [0] + [float('INF')]*MAX_V
for _ in range(n):
    tmp_dp = [0]*(MAX_V+1)
    w, v = map(int, input().split())
    for sum_v in range(MAX_V+1):
        if sum_v >= v:
            tmp_dp[sum_v] = min(dp[sum_v], dp[sum_v - v] + w)
        else:
            tmp_dp[sum_v] = min(dp[sum_v], w)
    dp = tmp_dp

ans = 0
while dp[ans+1] <= W:
    ans +=1
print(ans)

### FIXED CODE ###

N, W = map(int, input().split())
MAX_V = 10**5+1
dp = [float('inf')] * MAX_V
dp[0] = 0
for _ in range(N):
    w, v = map(int, input().split())
    for sum_v in range(MAX_V)[::-1]:
        if sum_v >= v:
            dp[sum_v] = min(dp[sum_v - v] + w, dp[sum_v])
        else:
            dp[sum_v] = min(dp[sum_v], w)
ans = 0
for v in range(MAX_V)[:: -1]:
    if dp[v] <= W:
        ans = v
        break
print(ans)
from sys import setrecursionlimit
setrecursionlimit(99999)
   
class Node():
    NIL = -1

    def __init__(self, parent=NIL, left=NIL, right=NIL, depth=-1):
        self.parent = parent
        self.left = left
        self.right = right
        self.depth = depth

def read_nodes(T):
    for _ in range(len(T)):
        id, _, *child = [int(x) for x in input().split()]
        for i, c in enumerate(child):
            if i == 0:
                T[id].left = c
            else:
                T[l].right = c
            l = c
            T[c].parent = id

def calc_depth(T):

    def rec(r, p):
        nonlocal T

        T[r].depth = p
        if T[r].right != Node.NIL:
            rec(T[r].right, p)
        if T[r].left != Node.NIL:
            rec(T[r].left, p + 1)

    rec([u.parent for u in T].index(-1), 0)

def node_type(T, id):
    if T[id].parent == Node.NIL:
        return "root"
    elif T[id].left == Node.NIL:
        return "leaf"
    else:
        return "internal node"

def child(T, id):
    c = []
    i = T[id].left
    while i != Node.NIL:
        c.append(i)
        i = T[i].right
    return c

def print_nodes(T):
    for id in range(len(T)):
        print("node {}: parent = {}, depth = {}, {}, {}".
              format(id, T[id].parent, T[id].depth,
                     node_type(T, id), child(T, id)))

def main():
    n = int(input())
    T = [Node() for _ in range(n)]

    read_nodes(T)
    calc_depth(T)
    print_nodes(T)

main()


### FIXED CODE ###

class Node():
    def __init__(self, parent=-1, child=[]):
        self.parent = parent
        self.child = child


def node_depth(u, id):
    if u[id].parent == -1:
        return 0
    else:
        return node_depth(u, u[id].parent) + 1


def node_type(u, id):
    if u[id].parent == -1:
        return "root"
    elif u[id].child == []:
        return "leaf"
    else:
        return "internal node"


def main():
    n = int(input())
    u = [Node() for _ in range(n)]

    for _ in range(n):
        id, _, *child = (int(x) for x in input().split())
        u[id].child = child
        for c in child:
            u[c].parent = id

    for id in range(n):
        print("node {}: parent = {}, depth = {}, {}, {}".
              format(id, u[id].parent,
                     node_depth(u, id), node_type(u, id),
                     u[id].child))


main()
N = int(input())
A = list(map(int, input().split()))

ans = []
mx = max(A)
mi = min(A)

if abs(mi) > abs(mx):
    x = A.index(mi)
    for y in range(N):
        if y == x:
            continue
        A[y] += mi
        ans.append((x, y))
else:
    x = A.index(mx)
    for y in range(N):
        if x == y:
            continue
        A[y] += mx
        ans.append((x, y))

for i in range(N - 1)[::(-1)**(max(A) < 0)]:
    l, r = A[i], A[i + 1]

    if l > r:
        if r > 0:
            A[i + 1] += l
            ans.append((i, i + 1))
        if l < 0:
            A[i] += r
            ans.append((i + 1, i))

print(len(ans))
for x, y in ans:
    print(x + 1, y + 1)

if list(sorted(A)) != A:
    print(A)
    1 / 0


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))

ans = []
mx = max(A)
mi = min(A)

if mx * mi < 0:
    if abs(mi) > abs(mx):
        x = A.index(mi)
        for y in range(N):
            if y == x:
                continue
            A[y] += mi
            ans.append((x, y))
    else:
        x = A.index(mx)
        for y in range(N):
            if x == y:
                continue
            A[y] += mx
            ans.append((x, y))

for i in range(N - 1)[::(-1)**(min(A) < 0)]:
    l, r = A[i], A[i + 1]

    if l > r:
        if r >= 0:
            A[i + 1] += l
            ans.append((i, i + 1))
        elif l <= 0:
            A[i] += r
            ans.append((i + 1, i))

print(len(ans))
for x, y in ans:
    print(x + 1, y + 1)

if list(sorted(A)) != A:
    print(A)
    1 / 0
s = 'alababaababa'
x, y = map(int, input().split())
print('YES' if s[x] == s[y] else 'NO')

### FIXED CODE ###

x, y = map(int, input().split())
a = [4, 6, 9, 11]
b = [1, 3, 5, 7, 8, 10, 12]
if x==y or (x in a and y in a) or (x in b and y in b):
  print('Yes')
else:
  print('No')
N = int(input())
a, b, ab, ret = 0, 0, 0, 0
for i in range(N):
    s = input()
    l = len(s) - 1
    if s[0] == "B":
        b += 1
    if s[l] == "A":
        a += 1
    ret += s.count("AB")
if a == b:
    a -= 1
ab = min(a,b)
print(ret + ab)

### FIXED CODE ###

cnt = 0
R, G, B, N = map(int, input().split())
comb = []
tmp = []
rgb = [R, G, B]

for r in range((N//R)+2):
    for g in range((N//G)+2):
        m = N - r*R - g*G
        if m == 0 or (m % B == 0 and m >= B):
            cnt += 1

print(cnt)
x,y=map(int,input().split())
if x>y :
    print(y,x)
elif x=y=0:
    print()
else :
    print(x,y)
for i in :
    


### FIXED CODE ###

while True:
    x,y = map(int,input().split())

    if x == 0 and y == 0:
        break
    elif x < y:
        print(x,y)
    else:
        print(y,x)
class Dice:
    def __init__(self, top, dside):
        self.top = top
        self.dside = dside
        self.rside = None
        self.num = [self.top, self.dside, 7-self.top, 7-self.dside]
    def rside_num(self):
        if 2 in self.num and 3 in self.num:
            if(self.num.index(3)==self.num.index(2)+1 or 
                self.num==[3, 5, 4, 2]):
                self.rside = 1
            else:
                self.rside = 6
        elif 1 in self.num and 4 in self.num:
            if(self.num.index(4)==self.num.index(1)+1 or 
                self.num==[3, 6, 4, 1]):
                self.rside = 2
            else:
                self.rside = 5
        else:
            if(self.num.index(2)==self.num.index(1)+1 or
                self.num==[2, 6, 5, 1]):
                self.rside = 3
            else:
                self.rside = 4

num = list(map(int, input().split()))
n = int(input())
for i in range(n):
    value = list(map(int, input().split()))
    dice = Dice((num.index(value[0])+1), (num.index(value[1]+1)))
    dice.rside_num()
    print(dice.rside)



### FIXED CODE ###

class Dice:
    def __init__(self, top, dside):
        self.top = top
        self.dside = dside
        self.rside = None
        self.num = [self.top, self.dside, 7-self.top, 7-self.dside]
    def rside_num(self):
        if 2 in self.num and 3 in self.num:
            if(self.num.index(3)==self.num.index(2)+1 or 
                self.num==[3, 5, 4, 2]):
                self.rside = 1
            else:
                self.rside = 6
        elif 1 in self.num and 4 in self.num:
            if(self.num.index(4)==self.num.index(1)+1 or 
                self.num==[4, 6, 3, 1]):
                self.rside = 2
            else:
                self.rside = 5
        else:
            if(self.num.index(2)==self.num.index(1)+1 or
                self.num==[2, 6, 5, 1]):
                self.rside = 3
            else:
                self.rside = 4

num = list(map(int, input().split()))
n = int(input())
for i in range(n):
    value = list(map(int, input().split()))
    dice = Dice(num.index(value[0])+1, num.index(value[1])+1)
    dice.rside_num()
    print(num[dice.rside-1])
# -*- coding: utf-8 -*- 
price, K = map(int, input().split())
 
kirai_data =input().split()
#print(set(data))
 
lst = list(range(price,10001))
for min in lst:
   
    shugo = set(kirai_data) & set(list(str(min))) 
    if  len(shugo) == 0 :                         
        print(min)
        break
    else:
        continue

### FIXED CODE ###

# -*- coding: utf-8 -*-

input_list = input().split()

cnt7 = 0
cnt5 = 0

for n in input_list:
    if int(n) == 7:
        cnt7 += 1
    elif int(n) == 5:
        cnt5 += 1
    else:
        continue
if cnt7 == 1 and cnt5 == 2:
    print("YES")
else:
    print("NO")
value=input().split()

print(3*value*value)

### FIXED CODE ###

r=int(input())
print(3*r*r)
n = int(input())
a = [int(input()) for i in range(n)]

c0, c1, c2, c3 = 0, 0, 0, 0

for output in a:
    if output == 'AC':
        c0 += 1
    elif output == 'WA':
        c1 += 1
    elif output == 'TLE':
        c2 += 1
    elif output == 'RE':
        c3 += 1
        
        
print('AC x {}'.format(c0))
print('WA x {}'.format(c1))
print('TLE x {}'.format(c2))
print('RE x {}'.format(c3))

### FIXED CODE ###

n = int(input())
a = [input() for i in range(n)]

c0, c1, c2, c3 = 0, 0, 0, 0

for output in a:
    if output == 'AC':
        c0 += 1
    elif output == 'WA':
        c1 += 1
    elif output == 'TLE':
        c2 += 1
    elif output == 'RE':
        c3 += 1
        
        
print('AC x {}'.format(c0))
print('WA x {}'.format(c1))
print('TLE x {}'.format(c2))
print('RE x {}'.format(c3))
a = int(input())
b = list(map(int,input().split()))
b[0:0]=0
c = 0
for i in range(1,a+1):
  switch = 0
  for j in range(0,i):
    if b[i] < b[j]:
      switch = 1
    if switch == 1:
      c += 1
print(c)
      
      
  

### FIXED CODE ###

a = int(input())
b = list(map(int,input().split()))
c = 1
k = b[0]
for i in range(1,a):
  if k>b[i]:
  	
  	k = b[i]
  	c+=1
print(c)
import numpy as np
W, H, K = map(int,input().split())
S = list(list(input())for i in range(H))
cake = [[0]*W for i in range(H)]
cake = np.array(cake).T
queue = []
for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            queue.append([i,j])
            cake[i][j] = -1
for i in range(len(queue)):
    h,w = queue[i]
    U,D,L,R = 0,0,0,0
    while U < h:
        if cake[h-U-1][w] != 0:
            break
        U += 1
    while D + h < H-1:
        if cake[h+D+1][w] != 0:
            break
        D += 1
    while L < w:
        flag = False
        for k in range(h-U,h+D+1):
            if cake[k][w-L-1] != 0:
                flag = True
        if flag:
            break
        L += 1
    while R + w < W-1:
        flag = False
        for k in range(h-U,h+D+1):
            if cake[k][w+R+1] != 0:
                flag = True
        if flag:
            break
        R += 1
    for x in range(h-U,h+D+1):
        for y in range(w-L,w+R+1):
            cake[x][y] = i+1

for i in cake:
    print(*i)



### FIXED CODE ###

H, W, K = map(int,input().split())
S = list(list(input())for i in range(H))
cake = [[0]*W for i in range(H)]

queue = []
for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            queue.append([i,j])
            cake[i][j] = -1
for i in range(len(queue)):
    h,w = queue[i]
    U,D,L,R = 0,0,0,0
    while L < w:
        if cake[h][w-L-1]:
            break
        L += 1
    while R+w < W-1:
        if cake[h][w+R+1]:
            break
        R += 1
    while U < h:
        flag = False
        for k in range(w-L,w+R+1):
            if cake[h-U-1][k]:
                flag = True
        if flag:
            break
        U += 1
    while D+h < H-1:
        flag = False
        for k in range(w-L,w+R+1):
            if cake[h+D+1][k] != 0:
                flag = True
                break
        if flag:
            break
        D += 1
    for x in range(h-U,h+D+1):
        for y in range(w-L,w+R+1):
            cake[x][y] = i+1

for i in cake:
    print(*i)
n, a, b = map(int, input().split())

num1 = n // (a + b) * a
num2 = n % (a + b)

if num2 < a:
    print(num1 + num2)
else:
    print(num1)

### FIXED CODE ###

S= input()

if 'A' in S and 'B' in S:
    print('Yes')
else:
    print('No')
N=int(input())
A=sorted(list(map(int,input().split())))

flag = False
for i in range(1,N):
  if A[i] == A[i-1]:
    flag = True
    
if flag:
  print("NO")
else:
  print("YES")


### FIXED CODE ###

S,T=input().split()
A,B=map(int,input().split())
U=input()

if S==U:
  print(A-1,B)
else:
  print(A,B-1)
import math
a,b = map(int,input().split())

c = math.gcd(a,b)
ans = int(a*b/c)
print(ans)


### FIXED CODE ###

import fractions
a,b = map(int,input().split())

c = fractions.gcd(a,b)
ans = int(a*b/c)
print(ans)
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,M,X = map(int, readline().split())
data = np.array(read().split(), np.int64)
data = data.reshape(N,-1)
C = data[:,0]
A = data[:,1:]

cost = np.zeros(1<<N, np.int64)
dability = np.zeros((1<<N, M), np.int64)

for i in range(N):
  cost[1<<i:1<<(i+1)] = cost[:1<<i] + C[i]
  ability[1<<i:1<<(i+1)] = ability[:1<<i] + A[i]
  
ok = np.all(ability >= X, axis=1)

x = cost[ok]
answer = -1 if len(x) == 0 else x.min()
print(answer)




### FIXED CODE ###

import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,M,X = map(int, readline().split())
data = np.array(read().split(), np.int64)
data = data.reshape(N,-1)
C = data[:,0]
A = data[:,1:]

cost = np.zeros(1<<N, np.int64)
ability = np.zeros((1<<N, M), np.int64)

for i in range(N):
  cost[1<<i:1<<(i+1)] = cost[:1<<i] + C[i]
  ability[1<<i:1<<(i+1)] = ability[:1<<i] + A[i]

ok = np.all(ability >= X, axis=1)

x = cost[ok]
answer = -1 if len(x) == 0 else x.min()
print(answer)
a, b, c, k = map(int, input().split())

if k <= a:
    print(k)
elif k <= a + b:
    print(a)
elif k > a + b:
    print(a - (k - (a + b)))

### FIXED CODE ###

s = input()
t = input()
flag = 1
for i in range(len(s)):
    if s[i] != t[i]:
        flag = 0
        break

if flag and len(t) == len(s) + 1:
    print("Yes")
else:
    print("No")
A=int(input())
B=int(input())

if A==B:
  print(A+B)
elif:
  print(2*max([A,B])-1)

### FIXED CODE ###

[A,B] = [int(e) for e in input().split()]
 
if A==B:
  print(A+B)
else:
  print(2*max([A,B])-1)
s=input()
N=len(s)
print(s[0]+ str(N-2)+s[N])

### FIXED CODE ###

S=str(input())
L=len(S)
print(S[0]+str(L-2)+S[L-1])
x='123'
for _ in range(2): 
  x=x.remove(input())
print(x)

### FIXED CODE ###

x='123'
for _ in range(2): 
  x=x.replace(input(),'')
print(x)
N = int(input())
X = input()
X_list = []
for i in range(N):
    X_list.append(int(X[i]))


import math
def solve(x):
    count = 0
    while x != 1 or :
        tmp = int(math.log2(x))
        tmp += 1
        for i in range(tmp):
            if (x >> i) & 1 == 1:
                count += 1
        x = x%count
    return x

def solve2(x):
    tmp = X_list.copy()
    if tmp[x] == 1:
        tmp[x] = 0
    else:
        tmp[x] = 1
    num = 1
    ans = 0
    for i in range(N-1,-1,-1):
        ans += tmp[i]*num
        num = num*2
        
    return ans   

for i in range(N):
    tmp = solve2(i)
    ans = solve(tmp)
    print(ans)

### FIXED CODE ###

n = int(input())
s = input()
x = int(s, 2)
pcx = s.count("1")
pc1 = x % (pcx - 1) if pcx > 1 else 0
pc2 = x % (pcx + 1)

def f(j):
    cnt = 0
    while j:
        j %= bin(j).count("1")
        cnt += 1
    return cnt

for i, y in enumerate(s):
    k = n - 1 - i
    if y == "0":
        print(f((pc2 + pow(2, k, pcx + 1)) % (pcx + 1)) + 1)
    elif pcx > 1:
        print(f((pc1 - pow(2, k, pcx - 1)) % (pcx - 1)) + 1)
    else:
        print(0)
def text_match_words(text, words):
	match_words = []
	for word in words:
		if word == text[:len(word)]:
			match_words.append(word)
	return match_words

def is_match_for(text, words):
	if "" == text: 
		return True
	else:
		match_words = text_match_words(text, words)
		if [] == match_words:
			return False
		else:
			return any([is_match_for(text[len(match_word):], words) for match_word in match_words])

words = ("dream", "dreamer", "erase", "eraser")

s = input()

if is_match_for(s, words):
	print("YES")
else:
	print("NO")

### FIXED CODE ###

import re

if re.match("(dream|dreamer|erase|eraser)*$", input()):
    print("YES")
else:
    print("NO")
s=input()
print(700+s.count(o)*100)

### FIXED CODE ###

s=input()
print(700+s.count("o")*100)
x=int(input())
a=0
b=0
for i in range(500):
  for j in range(-1000,1000):
    if i**5-j**5==x:
       a=i
       b=j
       break
print(a,b)

### FIXED CODE ###

s=input()
if s=="ABC":
  print("ARC")
else:
  print("ABC")
s = input()
print(s[:5]+' '+s[6:13]+' '+a[14:])


### FIXED CODE ###

s = input()
print(s[:5]+' '+s[6:13]+' '+s[14:])
import numpy as np
N = int(input())
print(np.sum(np.arange(1, N, dtype='int32')))

### FIXED CODE ###

import sys
def input():
    return sys.stdin.readline()[:-1]

N = int(input())
total = sum(range(1, N))
  
print(total)