Harryxun/stf_run huggingface dataset:
N,K=map(int,input().split())
V=list(map(int,input().split()))
if N<=K:
  W=sorted(V)
  h=sum(V)
  for i in range(K-N):
    if W[i]<0:
      h-=W[i]
    else:
      break
else:
  ans=[]
  for i in range(1,K):
    for j in range(i+1):
      l=V[0:i-j]+V[N-j:N]
      l.sort()
      H=sum(l)
      for k in range(min(i,K-i)):
        if l[k]<0:
          H-=l[k]
        else:
          break
      ans.append(H)
  h=max(ans)
print(h)

### FIXED CODE ###

N,K=map(int,input().split())
V=list(map(int,input().split()))
if N<=K:
  W=sorted(V)
  h=sum(V)
  for i in range(K-N):
    if W[i]<0:
      h-=W[i]
    else:
      break
else:
  ans=[]
  for i in range(1,K+1):
    for j in range(i+1):
      l=V[0:i-j]+V[N-j:N]
      l.sort()
      H=sum(l)
      for k in range(min(i,K-i)):
        if l[k]<0:
          H-=l[k]
        else:
          break
      ans.append(H)
  h=max(ans)
print(h)
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))
p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

red=0
green=0
no=0
ans=0

while True:
    if red>x-1 and green>y-1:
        break
    if no<=c-1:
        if red>x-1:
            if q[green]>=r[no]:
                ans+=q[green]
                green+=1
            else:
                ans+=r[no]
                green+=1
                no+=1
        elif green>y-1:
            if p[green]>=r[no]:
                ans+=p[red]
                red+=1
            else:
                ans+=r[no]
                red+=1
                no+=1
        else:
            if max(p[red],q[green],r[no])==p[red]:
                ans+=p[red]
                red+=1
            elif max(p[red],q[green],r[no])==q[green]:
                ans+=q[green]
                green+=1
            else:
                if p[red]>q[green]:
                    q[green]=r[no]
                else:
                    p[red]=r[no]
                no+=1
    else:
        ans+=sum(p[red:x])
        ans+=sum(q[green:y])
        break
print(ans)

### FIXED CODE ###

import heapq

x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))
p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)
pq=p[:x]+q[:y]
heapq.heapify(pq)

for i in range(c):
    a=heapq.heappop(pq)
    if a<r[i]:
        heapq.heappush(pq,r[i])
    else:
        heapq.heappush(pq,a)
        break

print(sum(pq))
d,g=map(int,input().split())
g//=100
l=[]
ans=1000
for i in range(d):
  p,c=map(int,input().split())
  l+=[[p,c,i*p,i*p+c]]
#dp[c][i]
dp=[[0for i in range(d)]for i in range(2**d-1)]
for i in range(2**d-1):
  a=0
  b,c=i,0
  d=0
  while b:
    if b%2>0:
      dp[i]+=l[c][3]
      d+=l[i][0]
    else:
      a=c
    b//=2
    c+=1
  if dp[i]+l[a][2]>=g:
    ans=min(ans,d+(g-dp[i])//a+((g-dp[i])%a))
print(ans)
      


### FIXED CODE ###

d,g=map(int,input().split())
g//=100
l=[]
ans=1000
for i in range(1,d+1):
  p,c=map(int,input().split())
  c//=100
  l+=[[p,c,i*p,i*p+c]]
for i in range(2**d):
  score=0
  a=0
  b=1
  c=0
  if not i:
    b=d
  while i:
    if i%2>0:
      score+=l[a][3]
      c+=l[a][0]
    else:
      b=a+1
    a+=1
    i//=2
  if score>=g:
    ans=min(ans,c)
  elif score+l[b-1][2]>=g:
    ans=min(ans,c+(g-score)//b+((g-score)%b>0))
print(ans)
N, M = map(int, input().split())
length = [list(map(int,input().split()).append(i)) for _ in range(M)]
print(length)

### FIXED CODE ###

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


length = [list(map(int,input().split())) for _ in range(M)]
for i in range(M):
  length[i].insert(2,i)
length = sorted(length)
ans_list =[0]*M
count = 1
for i in range(M):
  if i == 0:
    ans = str(length[i][0]).zfill(6) + str(count).zfill(6)
    ans_list[i] = [length[i][2],ans]
  elif i >= 1 and length[i][0] == length[i-1][0]:
    count += 1
    ans = str(length[i][0]).zfill(6) + str(count).zfill(6)
    ans_list[i] = [length[i][2],ans]
  elif i >= 1 and length[i][0] != length[i-1][0]:
    count = 1
    ans = str(length[i][0]).zfill(6) + str(count).zfill(6)
    ans_list[i] = [length[i][2],ans]
ans_list.sort(key=lambda x: x[0])
for i in range(M):
  print(ans_list[i][1])
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

s,t = map(int,input().split())
print(lcm(s,t))

### FIXED CODE ###

from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)

s,t = map(int,input().split())
print(lcm(s,t))
H,W,h,w = (int(i) for i in input().split())
print((H-W)*(h-w))


### FIXED CODE ###

H,W, = (int(i) for i in input().split())
h,w = (int(i) for i in input().split())
print((H-h)*(W-w))
N,D=map(int,input().split())
c=0
X=[]
for i in range(N):
  X.append(list(map(int,input().split())))

for j in range(N):
  for k in range(j+1,N):
    tmp=sum([(X[j][l]-X[k][l])**2 for l in range(N)])
    if tmp in [y**2 for y in range(21)]:
      c +=1
print(c)

### FIXED CODE ###

N,D=map(int,input().split())
c=0
X=[]
for i in range(N):
  X.append(list(map(int,input().split())))

for j in range(N):
  for k in range(j+1,N):
    tmp=sum([(X[j][l]-X[k][l])**2 for l in range(D)])
    if tmp in [y**2 for y in range(130)]:
      c +=1
print(c)
x=int(input())
i=0
kekka1=[[0] for _ in range(10)]
while x>0:
    kekka1[i]=x%2
    x=x//2
    i+=1

for j in range(10):
    if kekka1[9-j]==1:
        print(str(9-j)+"番の分銅を右の皿に載せる。")



### FIXED CODE ###

a=input()
s=list("abcdefghijklmnopqrstuvwxyz")
if a in s:
    print("a")
else:
    print("A")
print(len({input() for _ in range(int(input()))}))


### FIXED CODE ###

A, B, C, D = map(int, input().split())
for _ in range(1000):
    C = C - B
    A = A - D
    if C <= 0:
        print("Yes")
        exit()
    if A <= 0:
        print("No")
        exit()
a=[0]+[1]*10*6
for i in range(999):
 if a[i]:
  a[i*2+1::i+1]=[0 for e in range(len(li[i*2+1::i+1]))]
for e in sys.stdin:print(len([i for i in li[:int(e)]if i]))


### FIXED CODE ###

import sys
m=500000;a=[1]*m
for i in range(3,999,2):
 if a[i//2]:a[i*i//2::i]=[0]*len(a[i*i//2::i])
p=[]
for i in range(m*2):p+=[i-1 if i<4 else p[i-1]+[0,a[i//2]][i%2]]
for e in sys.stdin:print(p[int(e)])
# -*- coding: utf-8 -*-
a, b, c = map(int, input().split())
ab = int(b / a)
if a < c < b or b < c < a:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

# -*- coding: utf-8 -*-
a, b, c = map(int, input().split())
if a < c < b or b < c < a:
    print('Yes')
else:
    print('No')
import sys
import numpy as np 
def minimize():
    L, R=map(int,input().split())
    lis=[]
    for i in range(L,R):
        for j in range(i+1, R+1):
            x=(i*j) %2019
            lis.append(x)
        if len(np.uniq(lis))==2018:
            break
    lis=np.array(lis)
    ans=lis.min()
    print(ans)

minimize()



### FIXED CODE ###

import sys
import numpy as np 
def minimize():
    L, R=map(int,input().split())
    lis=[]
    if (L+2019) >= R:
        
        for i in range(L,R):
            for j in range(i+1, R+1):
                x=(i*j) %2019
                lis.append(x)
        lis=np.array(lis)
        ans=lis.min()
        print(ans)
    
    else :
        for i in range(L,(L+2019)):
            for j in range(i+1, L+2020):
                x=(i*j) %2019
                lis.append(x)
        lis=np.array(lis)
        ans=lis.min()
        print(ans)


minimize()
N, M = list(map(int, input().split()))
L, R = [], []
for i in range(M):
    L[i], R[i] = list(map(int, input().split()))

ans = min(R) - max(L) + 1
if ans < 0:
    ans = 0
print(ans)

### FIXED CODE ###

N, M = list(map(int, input().split()))
L, R = [None] * M, [None] * M
for i in range(M):
    L[i], R[i] = list(map(int, input().split()))

l = max(L)
r = min(R)
ans = r - l + 1
if ans < 0:
    ans = 0
print(ans)
s = input()
wordList = ['dream', 'dreamer', 'erase', 'eraser']
ansCount = 0
def ansFunc(s1, ansCount):
    for w in wordList:
        #print(s1, w)
        if s1.startswith(w):
            s2 = s1.replace(w, "")
            if s2 == '':
                print("YES")
                ansCount += 1
                return ansCount
            else:
                ansCount = ansFunc(s2, ansCount)
ansCount=ansFunc(s, ansCount)
#print("NO")

### FIXED CODE ###

s=input().replace("eraser","").replace("erase","").replace("dreamer","").replace("dream","")
if s:
    print("NO")
else:
    print("YES")
def BinSearch(A, hi, lo):
    b = (hi + lo) // 2
    tmp0 = FindAns(A, b - 1)
    tmp1 = FindAns(A, b)
    if hi == lo:
        tmp2 = FindAns(A, b + 1)
        return min(tmp0, tmp1, tmp2)
    if tmp0 < tmp1:
        return BinSearch(A, b - 1, lo)
    else:
        return BinSearch(A, hi, b + 1)
    
def FindAns(A, b):
    ans = 0
    for a in A:
        ans += abs(a - b)
    return ans

n = int(input())
A = list(map(int, input().split()))
for i in range(n):
    A[i] -= i + 1
A = sorted(A)
hi = A[int(len(A) / 2 + 1) if int(len(A) / 2 + 1) <  len(A)  else int(len(A) / 2)]
lo = A[int(len(A) / 2 - 1) if int(len(A) / 2 - 1) >= 0 else int(len(A) / 2)]

print(BinSearch(A, hi, lo))

### FIXED CODE ###

def BinSearch(A, hi, lo):
    b = (hi + lo) // 2
    tmp0 = FindAns(A, b - 1)
    tmp1 = FindAns(A, b)
    if hi == lo:
        tmp2 = FindAns(A, b + 1)
        return min(tmp0, tmp1, tmp2)
    if tmp0 < tmp1:
        return BinSearch(A, b - 1, lo)
    else:
        return BinSearch(A, hi, b + 1)
    
def FindAns(A, b):
    ans = 0
    for a in A:
        ans += abs(a - b)
    return ans

n = int(input())
A = list(map(int, input().split()))
for i in range(n):
    A[i] -= i + 1
    
hi = max(A)
lo = min(A)

print(BinSearch(A, hi, lo))
n,k = map(int,input().split())
lis = list(map(int,input().split()))
ans = 0
for i in range(n):
    for j in range(n-i+1):
        num = lis[:i]
        if j > 0:
            num += lis[-j:]
        if len(num) <= k:
            cnt = min(len(num),k-len(num))
            num.sort()
            for h in range(cnt):
                num[cnt] = max(0,num[cnt])
            ans = max(ans,sum(num))
print(ans)

### FIXED CODE ###

n,k = map(int,input().split())
lis = list(map(int,input().split()))
ans = 0
for i in range(n):
    for j in range(n-i+1):
        num = lis[:i]
        if j:
            num += lis[-j:]
        if len(num) <= k:
            spell = min(len(num),k-len(num))
            num.sort()
            for l in range(spell):
                num[l] = max(0,num[l])
            ans = max(ans,sum(num))
print(ans)
A, B, C = map(int, input().split())
msg = 'Yes' if A == B and B == C else 'No'
print(mssg)

### FIXED CODE ###

A, B, C = map(int, input().split())
msg = 'Yes' if A == B and B == C else 'No'
print(msg)
n=int(input())
a = list(map(int,input().split()))
i = 0
while True:
    if a[i]%2==1 or a[i]%3==0 or a[i]%5==0:
        i+=1
    elif i==n:
        print('APPROVED')
        break
    else:
        print('DENIED')
        break

### FIXED CODE ###

n=int(input())
a = list(map(int,input().split()))
i = 0
while True:
    if i==n:
        print('APPROVED')
        break
    elif a[i]%2==0 and a[i]%3!=0 and a[i]%5!=0:
        print('DENIED')       
        break       
    else:
        i+=1
a,b,c,d,e,f = map(int, input().split())
x = a + b + c + d + e + f
y = 100000
for i in (a,b,c,d):
 if y > i : y = i
z = 0
if e < f : z = f
else z = e
print (x - y - z)

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
f = int(input())
x = a + b + c + d + e + f
y = 100000
for i in (a,b,c,d):
    if y > i : y = i
z = 0
if e < f : z = e
else : z = f
print (x - y - z)
import math
math.log2(2)

### FIXED CODE ###

import math
n = int(input())
curnum = 1
curmax = 0
for i in range(1, n + 1):
    c = int(math.log2(i))
    if c > curmax:
        curmax = c
        curnum = i
print(curnum)
h, a = input().split()

print((h - 1) // 4 + 1)

### FIXED CODE ###

h, a = map(int, input().split())

print((h - 1) // a + 1)
#!/usr/bin/env python3
s = list(input())
x, y = map(int, input().split())

X = [0] * 16001
Y = [0] * 16001

X[8000] = Y[8000] = 0
isx = 1
tcnt = 0
fcnt = 0
for i in range(len(s)):
    if s[i] == 'T':
        for j in range(len(X)):
            if isx == 1:
                if tcnt == 0:
                    X[8000 + fcnt] = tcnt + 1
                    break
                if X[j] == tcnt:
                    X[j + fcnt] = X[j - fcnt] = tcnt + 1
            else:
                if X[j] == tcnt:
                    X[j] = tcnt + 1
        for j in range(len(Y)):
            if isx == 0:
                if Y[j] == tcnt:
                    Y[j + fcnt] = Y[j - fcnt] = tcnt + 1
            else:
                if Y[j] == tcnt:
                    Y[j] = tcnt + 1
        isx ^= 1
        tcnt += 1
        fcnt = 0
    else:
        fcnt += 1

if s[-1] == 'F':
    for j in range(len(X)):
        if isx == 1:
            if tcnt == 0:
                X[8000 + fcnt] = tcnt + 1
                break
            if X[j] == tcnt:
                X[j + fcnt] = X[j - fcnt] = tcnt + 1
        else:
            if X[j] == tcnt:
                X[j] = tcnt + 1
    for j in range(len(Y)):
        if isx == 0:
            if Y[j] == tcnt:
                Y[j + fcnt] = Y[j - fcnt] = tcnt + 1
        else:
            if Y[j] == tcnt:
                Y[j] = tcnt + 1
    isx ^= 1
    tcnt += 1
    fcnt = 0

print('Yes' if (X[8000 + x] == tcnt and Y[8000 + y] == tcnt) else 'No')


### FIXED CODE ###

#!/usr/bin/env python3
s = input()
x, y = map(int, input().split())

d = [len(s) for s in s.split('T')]
nx = [set([d[0]])]
ny = [set([0])]

for i, l in enumerate(d[2::2]):
    new_n = set()
    for n in nx[i]:
        new_n.add(n + l)
        new_n.add(n - l)
    nx.append(new_n)

for i, l in enumerate(d[1::2]):
    new_n = set()
    for n in ny[i]:
        new_n.add(n + l)
        new_n.add(n - l)
    ny.append(new_n)

print('Yes' if (x in nx[-1] and y in ny[-1]) else 'No')
a,b=map(int,input().split())

def xor(n):
    ret=0
    i=1
    while True:
        div,mod=divmod(n,i)
        flg=i*(div//2)
        if div%2==1:
            flag+=(mod+1)
        if flg%2==1:
            ret+=i
        i*=2
        if i>n:
            break
    return ret
print(xor(a-1)^xor(b))


### FIXED CODE ###

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

def xor(n):
    ret=0
    i=1
    while True:
        div,mod=divmod(n,i)
        flg=i*(div//2)
        if div%2==1:
            flg+=(mod+1)
        if flg%2==1:
            ret+=i
        i*=2
        if i>n:
            break
    return ret
print(xor(a-1)^xor(b))
n=int(input())
arr=input().split(" ")
arr_s=set(arr)
#print(arr)
a=0
most_e=0
most_o=0
arr_e=[0 for i in range(int(n/2))]
arr_o=[0 for i in range(int(n/2))]
for i in range(int(n/2)):
    arr_e[i]=arr[a]
    arr_o[i]=arr[a+1]
    a+=2
#print(arr_e,arr_o)
arr_es=set(arr_e)
arr_os=set(arr_o)
#print(arr_es,arr_os)

for i in arr_es:
    cnt_e=arr_e.count(i)
    if cnt_e>most_e:
        most_e=cnt_e
        if cnt_e>=n/4:
            break
        
for i in arr_os:
    cnt_o=arr_o.count(i)
    if cnt_o>most_o:
        most_o=cnt_o
        if cnt_o>=n/4:
            break

#print(most_e,most_o)
if len(arr_s)==1:
    print(int(n/2))
else:
    print(n-most_e-most_o)

### FIXED CODE ###

num=input()
num_str=list(num)
lengh=len(num_str)
tmp=num_str
for i in range(lengh):
    if num_str[i]=="1":
        tmp[i]="9"
    elif num_str[i]=="9":
        tmp[i]="1"
ans="".join(tmp)
print(ans)
import time

def min_cost(stones, N):
    def jump(stones, index, N):
        if index == N:
            return 0

        if dp[index] != -1:
            return dp[index]

        left = abs(stones[index] - stones[index + 1]) + jump(stones, index + 1, N)

        right = 2 ** 31
        if index + 2 <= N:
            right = abs(stones[index] - stones[index + 2]) + jump(stones, index + 2, N)

        dp[index] = min(left, right)

        return dp[index]

    dp = [-1] * (N + 1)
    return jump(stones, 0, N - 1)


if __name__ == '__main__':
    N = int(input())
    #stones = list(map(int, input().strip().split()))
    stones = [int(a) for a in input().strip().split()]
    print(min_cost(stones, N))
    
    '''
    stones = [30, 10, 60, 10, 60, 50]
    N = 6
    print(min_cost(stones, N))

    stones = [10, 30, 40, 20]
    N = 4
    print(min_cost(stones, N))
    '''



### FIXED CODE ###



def min_cost(stones, N):
    space = [0] * N

    for i in range(1, N):
        one = abs(stones[i] - stones[i - 1]) + space[i - 1]
        
        two = 2 ** 31

        if i - 2 >= 0:
            two = abs(stones[i] - stones[i - 2]) + space[i - 2]

        space[i] = min(one, two)

    return space[i]


if __name__ == '__main__':
    N = int(input())
    #stones = list(map(int, input().strip().split()))
    stones = [int(a) for a in input().strip().split()]
    print(min_cost(stones, N))
    
    '''
    stones = [30, 10, 60, 10, 60, 50]
    N = 6
    print(min_cost(stones, N))
    

    stones = [10, 30, 40, 20]
    N = 4
    print(min_cost(stones, N))
    '''
row = list(map(int, input().split()))
s = [input().split() for i in range(row[0])]
for i in range(row[0]):
    s[i] = list(s[i][0])
dx = [0, -1, 1, 0]
dy = [-1, 0, 0, 1]
for i in range(row[0]):
    for j in range(row[1]):
        if s[i][j] == "#":
            Flag = False
            for d in range(4):
                nx = i + dx[d]
                ny = j + dy[d]
                if 0 <= nx < row[0] and 0<= ny < row[1]:
                    if s[nx][ny] == "#":
                        Flag = True
                        break
            if Flag != True:
                break
    if Flag != True:
        print("No")
        break
if Flag:
    print("Yes")



### FIXED CODE ###

row = list(map(int, input().split()))
s = [input().split() for i in range(row[0])]
for i in range(row[0]):
    s[i] = list(s[i][0])
dx = [0, -1, 1, 0]
dy = [-1, 0, 0, 1]
Flag = True
for i in range(row[0]):
    for j in range(row[1]):
        if s[i][j] == "#":
            flag = False
            for d in range(4):
                nx = i + dx[d]
                ny = j + dy[d]
                if 0 <= nx < row[0] and 0<= ny < row[1]:
                    if s[nx][ny] == "#":
                        flag = True
                        break
            if flag == False:
                Flag = False
                break
    if Flag == False:
        print("No")
        break
if Flag:
    print("Yes")
N,K = map(int, input().split())

x = abs(N - K*(int(N/K)-1))

for i in range(0,5):
    x = abs(x-K)
    ans = min(ans,x)

print(ans)

### FIXED CODE ###

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

x = abs(N - K*(int(N/K)-1))
ans = N

for i in range(0,100000):
    x = abs(x-K)
    ans = min(ans,x)

print(ans)
S = input()
L=len(S)
ans='No'
for i in S:
    if S==S[::-1] and S[:(L-1)/2+1]==S[(L-1)/2+1::-1] and S[L+3/2:]==S[:(L+3/2)-1:-1]:
    ans='Yes'
print(ans)

### FIXED CODE ###

S = input()
L=len(S)
ans=0
S1=S[:(L-1)//2]
S2=S[((L+3)//2)-1:]
if (S==S[::-1]) & (S1==S1[::-1]) & (S2==S2[::-1]):
    ans='Yes'
else:
    ans='No'
print(ans)
N = int(input())
 
t = [input() for i in range(N)]
 
M = int(input())
 
a = []
for i in range(M):
    a.append(map(int, raw_input().split()))       
 
cal = sum(t)
 
for j in range(M):
    print(cal - t[a[j][0] - 1] + a[j][1])

### FIXED CODE ###

print(eval(input()))
import math
x,a,b=map(int,input().split())
print((x-a)%b)


### FIXED CODE ###

import math
x,a,b=[int(input()) for i in range(3)]
print((x-a)%b)
def sum_digits(n):
    s = 0
    while n:
        s += n % 10
        n //= 10
    return s


while True:
    num = int(input())
    if num % sum_digits(num) == 0:
        print('Yes')
    else:
        print('No')


### FIXED CODE ###

def sum_digits(n):
    s = 0
    while n:
        s += n % 10
        n //= 10
    return s


num = int(input())
if num % sum_digits(num) == 0:
    print('Yes')
else:
    print('No')
n, x = map(int, input().split())


def pi(n):
    return 2**(n+1)-1


def ai(n):
    return 2**(n+2) - 3


def f(n, x):
    if (x <= 1) or (n <= 0):
        return 0
    elif (1 < x) and (x <= 1 + ai(n-1)):
        return f(n - 1, x - 1)
    elif x == 2 + ai(n - 1):
        return pi(n - 1) + 1
    elif (2 + ai(n - 1) < x) and (x <= 2 + 2 * ai(n - 1)):
        return pi(n-1) + 1 + f(n-1, x-2-ai(n-1))
    elif x >= ai(n):
        return pi(n)


print(f(n, x))


### FIXED CODE ###

str = "Christmas"
for i in range(25-int(input())):
    str += " Eve"
print(str)
import math
lists=list(int(input()) for i in range(5))
modlists=list(lists[j]%10 for j in range(5))
x=set(modlists)
if 0 in x:
      x.remove(0)
else:
      x=set(modlists)
            
#a=list(set(modlists).remove(0) if 0 in modlists else set(modlists))
k=modlists.index(min(x))

b=0
for m in range(5):
      b+=math.ceil(lists[m]/10)*10
print(b-math.ceil(lists[k]/10)*10+lists[k])


### FIXED CODE ###

import math
lists=list(int(input()) for i in range(5))
modlists=list(lists[j]%10 for j in range(5))
x=set(modlists)
if 0 in x :
      x.remove(0)

      
else:
      x=set(modlists)
            
#a=list(set(modlists).remove(0) if 0 in modlists else set(modlists))
k=modlists.index(min(x)) if x else 0


b=0
for m in range(5):
      b+=math.ceil(lists[m]/10)*10
print(b-math.ceil(lists[k]/10)*10+lists[k])
import sys
sys.setrecursionlimit(10**9)

n=int(input())
t=list(set([int(input()) for _ in range(n)]))
T=max(t)

def f(j):
  for i in t:
    if (T*j)%i!=0:
      return f(j+1)
      break
  return T*j

print(f(1))

### FIXED CODE ###

import fractions
n=int(input())
t=set([int(input()) for _ in range(n)])
ans=1
for i in t:
  ans=(i*ans)//fractions.gcd(i,ans)
print(ans)
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    X = int(input(),2)
    ANS = [0]*N
    TEMP = [0]*N
    CHAIND = [0]*N


    cnt = count_ones_by_bitmask(X)
    
    if cnt == 0:
        for i in range(N):
            print(1)
            return

    p = X % (cnt+1)
    m = X % (cnt-1)
    pmod = 1 % (cnt+1)
    mmod = 1 % (cnt-1)
    bit = 1
    for i in range(N):
        L = (X^bit)
        if L!=0:
            ANS[i] = 1
            if (X & bit == 0):
                TEMP[i] = (p + pmod) % (cnt+1)
            else:
                TEMP[i] = (m - mmod) % (cnt-1)
        bit = bit<<1
        pmod = (pmod*2) % (cnt+1)
        mmod = (mmod*2) % (cnt-1)


    CHA = list(set(TEMP))

    for i in range(len(CHA)):
        an = 0
        cha = CHA[i]
        cnt = count_ones_by_bitmask(CHA[i])
        while cnt>0:
            an += 1
            cha = cha%cnt
            cnt = count_ones_by_bitmask(cha)
        CHAIND[CHA[i]] = an

    for i in reversed(range(N)):
        print(ANS[i]+CHAIND[TEMP[i]])




def count_ones_by_bitmask(num):
    count = 0
    while num:
        count += num & 1
        num >>= 1
    return count

if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    N = int(input())
    X = input()
    XINT = int(X,2)
    ANS = [0]*N
    TEMP = [0]*N
    CHAIND = [0]*N

    cnt = count_ones_by_bitmask(XINT)
    
    if cnt == 0:
        for i in range(N):
            print(1)
            return
    if cnt ==1:
        for i in  range(N):
            if X[i] == '1':
                print(0) #全てが0になる
            else:
                if i==N-1:
                    print((int(X[N-1])+1)%2+1) # 2の剰余の反転
                else:
                    print((int(X[N-1]))%2+1) # 2の剰余
        return

    p = XINT % (cnt+1)
    m = XINT % (cnt-1)
    pmod = 1
    mmod = 1
    for i in range(N):
        ANS[i] = 1
        if (X[N-i-1] == '0'):
            TEMP[i] = (p + pmod) % (cnt+1)
        else:
            TEMP[i] = (m - mmod) % (cnt-1)
        pmod = (pmod*2) % (cnt+1)
        mmod = (mmod*2) % (cnt-1)


    CHA = list(set(TEMP))

    for i in range(len(CHA)):
        an = 0
        cha = CHA[i]
        cnt = count_ones_by_bitmask(CHA[i])
        while cnt>0:
            an += 1
            cha = cha%cnt
            cnt = count_ones_by_bitmask(cha)
        CHAIND[CHA[i]] = an

    for i in reversed(range(N)):
        print(ANS[i]+CHAIND[TEMP[i]])


def count_ones_by_bitmask(num):
    count = 0
    while num:
        count += num & 1
        num >>= 1
    return count

if __name__ == '__main__':
    main()
a=int,input()
b=int,input()
c=a+b
if c=3:   
    print(3)
elif c=5:
    print(1)
else:
    print(2)

### FIXED CODE ###

a=int(input())
b=int(input())
c=a+b
if c==3:
    print(3)
elif c==4:
    print(2)
else:
    print(1)