Harryxun/stf_run huggingface dataset:
n, m = map(int, input().split())

nums = sorted([int(i) for i in input().split()])[::-1]

ms = []
for _ in range(m):
    a, b = map(int, input().split())
    ms += [b] * a
ms = sorted(ms)[::-1][:n]

print(sum(nums + ms)[:n])


### FIXED CODE ###

# from collections import defaultdict
# n, m = map(int, input().split())
# nums = [int(i) for i in input().split()]
#
# num_freq = defaultdict(int)
#
# for _ in range(m):
#     b, c = map(int, input().split())
#     num_freq[c] += b
#
#
# new_list = []
# for num, freq in sorted(num_freq.items(), key=lambda x: -x[0]):
#     new_list += [num] * freq
#     if len(new_list) >= n:
#         break
# tmp = sorted(nums + new_list)[::-1]
# print(sum(tmp[:n]))

# ↑と同じ処理なのに↑のはREになる
n, m = map(int, input().split())
nums = list(map(int, input().split()))
exc = []

for i in range(m):
    exc.append(list(map(int, input().split())))
exc.sort(key=lambda x: x[1], reverse=True)
e = []
count = 0
for i in range(m):
    freq = exc[i][0]
    e += [exc[i][1]] * freq
    count += freq
    if count >= n:
        break
cards = sorted(nums + e, reverse=True)
print(sum(cards[:n]))
#135 0 or 1 Swap
N=int(input())
P=map(int,input().split())
c=0
for i in range(1,N):
    if P[i-1]>P[i]:
        c+=1
print('YES' if c==0 or c==2 else 'NO')

### FIXED CODE ###

N=int(input())
p=list(map(int,input().split()))
q=[i for i in range(1,N+1)]
c=0
for i in range(N):
    if p[i]!=q[i]:
        c+=1
print('YES' if c==0 or c==2 else 'NO')
n,a,b=map(int, input().split())

num=n//(a+b)+1

line=("b"*a+"r"*b)*num

print(line[:n].count("b"))


### FIXED CODE ###

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

if a==0:
    print(0)
    
elif b==0:
    print(n)
    
else:
    
    quo=n//(a+b)
    
    #商
    if n%(a+b)==0:
        rem=0
    elif  1<=n%(a+b)<=a:
        rem=n%(a+b)
    else:
        rem=a
        
    print(quo*a+rem)
S, T= map(int, input().split())
2 A = list(map(int, input().split()))
3 B = list(map(int, input().split()))

num = 0
for ind, s in enumerate(A):
    if  A[ind] != B[ind]:
        num = num + 1
print(num)

### FIXED CODE ###

S = input()
T = input()

num = 0
for ind, s in enumerate(S):
    if  S[ind] != T[ind]:
        num = num + 1
print(num)
import sys
n=input()
N=range(n)
m=input()
A=[sys.maxint]*n
B=[A[:] for i in N]
A=[0]*n
C=[A[:] for i in N]
while 1:
    s=raw_input()
    if s=="0": break
    a,b,w=map(int,s.split(","))
    B[a][b],B[b][a]=w,w

s=0
for i in N:
    x=min(B[i])
    y=B[i].index(x)
    if C[i][y]==0:
        C[i][y],C[y][i]=1,1
        s+=x/100-1
print s

### FIXED CODE ###

while 1:
    n=input()
    if n==0:break
    N=range(n)
    T=N[:]
    M=range(input())
    S=[map(int,raw_input().split(","))for i in M]
    S=sorted(S,key=lambda x:x[2])        
    a=0
    while S:
        x,y,w=S.pop(0)
        b,c=T[x],T[y]
        if b==c:continue
        for i in N:
            if T[i]==b:T[i]=c
        a+=w/100-1
    print a
def main():
    a,b,c,d,e,f= map(int,input().split())

    # 100gあたりE [g]溶ける
    # ビーカーにF [g]いれられる
    # 濃度は100*砂糖 / (水＋砂糖)


    mizu=[]
    sato=[]
    noudo=[]


    x = int(f/100//a) +1
    y = int(f/100//b) +1

    for i in range(x):
        for j in range(y):
            mizu.append(i*100*a+j*100*b)

    mizu = [i for i in mizu if i <= f]
    mizu = list(set(mizu))
    mizu.sort()

    tokeru = int(f/100) * e
    x = tokeru // c +1
    y = tokeru // d +1

    for i in range(x):
        for j in range(y):
            sato.append(i*c + j*d)

    sato = [i for i in sato if i < tokeru]
    sato = list(set(sato))
    sato.sort()
    sato.remove(0)
    mizu.remove(0)

    tmp =0

    for i in mizu:
        for j in sato:
            if i + j <= f and i//100*e >= j :
                if tmp <= (100*j) / (i + j):
                    print((100*j) / (i + j))
                    ans = [i+j,j]

    print(ans)


if __name__ == "__main__":
        main()


### FIXED CODE ###


def main():
    a,b,c,d,e,f= map(int,input().split())

    # 100gあたりE [g]溶ける
    # ビーカーにF [g]いれられる
    # 濃度は100*砂糖 / (水＋砂糖)


    mizu=[]
    sato=[]


    x = int(f/100/a) +1
    y = int(f/100/b) +1

    for i in range(x):
        for j in range(y):
            mizu.append(i*100*a + j*100*b)

    mizu = [i for i in mizu if i <= f]
    mizu = list(set(mizu))
    mizu.sort()

    tokeru = int(f/100) * e
    x = int(tokeru / c) +1
    y = int(tokeru / d) +1

    for i in range(x):
        for j in range(y):
            sato.append(i*c + j*d)

    sato = [i for i in sato if i < tokeru]
    sato = list(set(sato))
    sato.sort()
#    sato.remove(0)
#    mizu.remove(0)

    tmp =0

    for i in mizu:
        for j in sato:
            if i + j <= f and i + j !=0:
                if int(i/100)*e >=j:
                    if tmp <= (100*j) / (i + j):
                        tmp = (100*j) / (i + j)
                        ans = str(i+j) + " " + str(j)

    print(ans)


if __name__ == "__main__":
        main()
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

rate = [0]*9
n = readInt()
a = readInts()

for i in a:
	rate[i//400]+=1

print(8-rate[:-1].count(0),end=" ")
print(min(9,(8-rate[:-1].count(0))+rate[-1]))

### FIXED CODE ###

from collections import defaultdict

def readInt():
  return int(input())
def readInts():
  return list(map(int, input().split()))
def readChar():
  return input()
def readChars():
  return input().split()

n = readInt()
a = readInts()
rate = [0]*9


for i in a:
  rate[min(i//400,8)]+=1
base = 8-rate[:-1].count(0)
ma = base+rate[-1]
print(max(base,1),ma)
N = int(raw_input())
t = [[0,0] for i in range(N)]
for i in range(N):
    l = []
    l = raw_input().split()
    t[i][0] = int(l[0])
    t[i][1] = int(l[1])
min_ = [0,0]
min_[0] = t[0][0]
min_[1]= t[0][1]
for i in range(1,N):
    if min_[0] > min_[1]:
        large_index = 0
    else:
        large_index = 1
    cnt = 1
    while cnt*t[i][large_index]<min_[large_index]:
        cnt = cnt+1
    min_[0] = cnt*t[i][0]
    min_[1] = cnt*t[i][1]
print min_[0]+min_[1]


### FIXED CODE ###

l = raw_input().split()
map_ = {}
for data in l:
    map_[l[0]] = 1
    map_[l[1]] = 1
    map_[l[2]] = 1
print len(map_)
s = sorted(input())
t = sorted(input(), reverse=True)
len_s = len(s)
len_t = len(t)
n_passed = 0

for i in range(len_s):
    if s[i] < t[i]:
        print("Yes")
        exit()

t = sorted(t)
if len_s < len_t:
    for i in range(len_s):
        if s[i] == t[i]:
            n_passed += 1
    if n_passed == len_s:
        print("Yes")
        exit()
print("No")

### FIXED CODE ###

s = sorted(input())
t = sorted(input(), reverse=True)
len_s = len(s)
len_t = len(t)
n_passed = 0

min_len = min(len_s, len_t)
for i in range(min_len):
    if s[i] < t[i]:
        print("Yes")
        exit()

if len_s < len_t:
    t = sorted(t)
    for i in range(len_s):
        if s[i] == t[i]:
            n_passed += 1
    if n_passed == len_s:
        print("Yes")
        exit()
        
print("No")
ProNum = int(input())
time = input()
time = time.split()
TotalTime = 0

for t in time:
  TotalTime += int(t)
                  
DrinkNum = int(input())

for d in range(DrinkNum):
  line = input()
  line = line.split()
  diff = int(line[1]) - int(time(int(line[0])))
  print(TotalTime+diff)


### FIXED CODE ###

ProNum = int(input())
time = input()
time = (time.split())
TotalTime = 0

for t in time:
  TotalTime += int(t)
                  
DrinkNum = int(input())

for d in range(DrinkNum):
  line = input()
  line = line.split()
  diff = int(line[1]) - int(time[int(line[0])-1])
  print(TotalTime+diff)
a,b=map(int, input().split())
max=b//x
min=(a+x-1)//x
print(max-min+1)

### FIXED CODE ###

a,b,x=map(int, input().split())
max=b//x
min=(a+x-1)//x
print(max-min+1)
n,m = map(int,input().split())
cards = list(map(int,input().split()))
cards.sort()
actions = []
#print()
#print(cards)
ans  = sum(cards)
for i in range(m):
    l,r  = map(int,input().split())
    actions.append([r,l])
actions.sort(reverse=True)
start = 0
for i in range(m):
    minnum = min(cards)
    if actions[i][0] <= minnum:
        break
    else:
        for j in range(actions[i][1]):
            #print(cards[j])
            if cards[start+j] <= actions[i][0]:
                #cards[start+j] = actions[i][0] - cards[start+j]
                ans += actions[i][0] - cards[start+j]
            else:
                break
    start += actions[i][1]
    #print(cards)
#print(sum(cards))
print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.readline
import bisect
n,m = map(int,input().split())
A = list(map(int,input().split()))
A.sort()

minA = A[0]
Query = []
for _ in range(m):
    b,c = map(int,input().split())
    if c > minA:
        Query.append([b,c])
Query = sorted(Query, key=lambda x:(x[1], x[0]), reverse=True)

ans = 0
index = 0
for b,c in Query:
    if index >= n:
        break
    #print("----")
    cnt = 0
    Flag = True
    while Flag:
        #print(A,b,c,index)
        if A[index] < c:
            A[index] = c
            cnt += 1
            index += 1
            if (cnt >= b) or (index >= n):
                Flag = False
        else:
            Flag = False
    '''
    #A.sort()
    if A[0] >= c:
        break
    else:
        index = min(bisect.bisect_left(A,c),b)
        if index > len(A):
            ans += c * len(A)
            break
        else:
            ans += c * index
            A = A[index:]
    print(A)
    '''
print(sum(A))
def main():
    d,n = map(int, input().split())
    a_list = []
    
    if d == 0:
        for i in range(1,100):
            a_list.append(i)
    elif d == 1:
        for i in range(100, 10000, 100):
            a_list.append(i)
    else:
        for i in range(10000, 1000000, 10000):
            a_list.append(i)

    print(a_list[n-1])
    
if __name__ == '__main__':
    main()

### FIXED CODE ###

d,n = map(int,input().split())
li = []
for i in range(1,102):
    if i != 100:
        li.append(i*100**d)
print(li[n-1])
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
a.sort()# ソート
hashi = [a[0], a[-1]]
total = abs(a[0] - a[-1])

s = 1
e = n - 2
while True:
    max_diff = 0
    point = "s"
    h = "s"
    if max_diff < abs(hashi[0] - a[s]):
        max_diff = abs(hashi[0] - a[s])
        point = "s"
        h = "s"
    if max_diff < abs(hashi[0] - a[e]):
        max_diff = abs(hashi[0] - a[e])
        point = "e"
        h = "s"
    if max_diff < abs(hashi[1] - a[s]):
        max_diff = abs(hashi[1] - a[s])
        point = "s"
        h = "e"
    if max_diff < abs(hashi[1] - a[e]):
        max_diff = abs(hashi[1] - a[e])
        point = "e"
        h = "e"
    total += max_diff
    if h == "s":
        if point == "s":
            hashi[0] = a[s]
        if point == "e":
            hashi[0] = a[e]
    if h == "e":
        if point == "s":
            hashi[1] = a[s]
        if point == "e":
            hashi[1] = a[e]
    if point == "s":
        s += 1
    if point == "e":
        e -= 1
    if s - 1 == e:
        break
print(total)

### FIXED CODE ###

n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
a.sort()# ソート
hashi = [a[0], a[-1]]
total = abs(a[0] - a[-1])

s = 1
e = n - 2
if n == 2:
    print(total)
    exit()
while True:
    max_diff = 0
    point = "s"
    h = "s"
    if max_diff < abs(hashi[0] - a[s]):
        max_diff = abs(hashi[0] - a[s])
        point = "s"
        h = "s"
    if max_diff < abs(hashi[0] - a[e]):
        max_diff = abs(hashi[0] - a[e])
        point = "e"
        h = "s"
    if max_diff < abs(hashi[1] - a[s]):
        max_diff = abs(hashi[1] - a[s])
        point = "s"
        h = "e"
    if max_diff < abs(hashi[1] - a[e]):
        max_diff = abs(hashi[1] - a[e])
        point = "e"
        h = "e"
    total += max_diff
    if h == "s":
        if point == "s":
            hashi[0] = a[s]
        if point == "e":
            hashi[0] = a[e]
    if h == "e":
        if point == "s":
            hashi[1] = a[s]
        if point == "e":
            hashi[1] = a[e]
    if point == "s":
        s += 1
    if point == "e":
        e -= 1
    if s - 1 == e:
        break
print(total)
n, y = map(int, input().split())
for i in range(0, n+1):
  for j in range(0, n+1-i):
	k = n - (i + j)
	sum_price = 10000*i + 5000*j + 1000*k
	if n == i + j + k and sum_price == y:
		print(i, j, k)
		exit()
print(-1, -1, -1)

### FIXED CODE ###

if __name__ == '__main__':
    one_thousand, five_thousand, ten_thousand = 1000, 5000, 10000
    n, y = map(int, input().split())
    ans = []
    for i in range(0, n+1):
        for j in range(0, n+1-i):
            k = n - (i + j)
            one = one_thousand * i
            five = five_thousand * j
            ten = ten_thousand * k
            sum_price = one + five + ten
            if k >= 0 and n == i + j + k and sum_price == y:
                ans.append([k, j, i])
                break
        if ans != []:
            print(ans[0][0], ans[0][1], ans[0][2])
            break
    if ans == []:
        print(-1, -1, -1)
import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

#a = list(map(int, input().split()))

n = int(input())
a = list(map(int, input().split()))

phase = 0
now = [0,0,0]
ans=1

for i in range(n):
    if(a[i]==0):
        now[phase]=1
        ans*=3-phase
        ans%=1000000007
        phase+=1
    else:
        corr = []
        for j in range(3):
            if(now[j]==a[i]):
                corr.append(j)
        ans*=len(corr)
        ans%=1000000007
        now[corr[0]]+=1
print(ans) 

### FIXED CODE ###

import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

#a = list(map(int, input().split()))

n = int(input())
a = list(map(int, input().split()))

phase = 0
now = [0,0,0]
ans=1

for i in range(n):
    if(a[i]==-1):
        now[phase]=1
        ans*=3-phase
        ans%=1000000007
        phase+=1
    else:
        corr = []
        for j in range(3):
            if(now[j]==a[i]):
                corr.append(j)
        ans*=len(corr)
        ans%=1000000007
        if(len(corr)!=0):
            now[corr[0]]+=1
print(ans)
S = input()
a = S // 3600
b = S % 3600
c = b // 60
d = b % 60
print a + ":" + c + ":" + d

### FIXED CODE ###

S = input()
if S >= 0 and S <= 86400:
   a = S // 3600
   b = S % 3600
   c = b // 60
   d = b % 60
   print "%d:%d:%d" % (a, c, d)
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N = int(input())

Ans = 0
numlist = [0] * 10000

if int(float(N)**0.5) <= 1:
  rMax = 1
else:
  rMax = int(float(N)**0.5)  

for x in range(1,rMax+1):
  for y in range(1,rMax+1):
    for z in range(1,rMax+1):
      Ans = x**2 + y**2 + z**2 + (x * y) + (y * z) + (z * x)
      numlist[Ans] += 1
  
for r in range(1,N+1):
  print(numlist[r])


### FIXED CODE ###

# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N = int(input())

Ans = 0
numlist = [0] * 10001

if int(float(N)**0.5) <= 1:
  rMax = 1
else:
  rMax = int(float(N)**0.5)  

for x in range(1,rMax+1):
  for y in range(1,rMax+1):
    for z in range(1,rMax+1):
      Ans = x**2 + y**2 + z**2 + (x * y) + (y * z) + (z * x)
      if Ans <= 10000:
        numlist[Ans] += 1
  
for r in range(1,N+1):
  print(numlist[r])
import numpy as np


N, K = map(int, input().split())
A = np.array(list(map(int, input().split())))
for k in range(K):
    B_acc = np.zeros(N + 1, dtype=int)
    for i in range(N):
        a = A[i]
        B_acc[max(0, i - a)] += 1
        B_acc[min(N, i + a + 1)] -= 1
    B_acc = np.cumsum(B_acc)
    A = B_acc[:-1]
    if all(a == N for a in A):
        break
print(' '.join(map(str, A)))

### FIXED CODE ###

import numpy as np
from numba import njit


@njit
def solve(N, K, A):
    for _ in range(K):
        B = np.zeros(N + 1, dtype=np.int64)
        for i in range(N):
            a = A[i]
            B[max(0, i - a)] += 1
            B[min(N, i + a + 1)] -= 1
        A = np.cumsum(B)[:-1]
        if np.all(A == N):
            return A
    return A


N, K = map(int, input().split())
A = np.array(input().split(), dtype=int)
print(' '.join(map(str, solve(N, K, A))))
N,M=list(map(int,input().split()))

if N==M:
    print(YES)
else:
    print(NO)
return

### FIXED CODE ###

#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int, M: int):
    if N==M:
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    solve(N, M)

if __name__ == '__main__':
    main()
x,y = map(int,input().split())
if y < x * 4 and y > x * 2 and y % 2 != 0:
    ans ="No"
else :
    ans ="Yes"
print(ans)

### FIXED CODE ###

x  = (list(map(int,input().split())))
x = sum(x)
ans = 15-x
print(ans)
def main():
    inputs = input()

    roop_num = len(inputs)
    if roop_num >= 90000:
        cnt = 0

    else:
        cnt = 0
        flag = False
        for start in range(roop_num-3):
            roop_num_end = roop_num - start
            ans_list = []
            ans_list = [int(inputs[start:end+start+4]) for end in range(roop_num_end-3) if int(inputs[start:end+start+4]) % 2019 == 0]

            cnt += len(ans_list)

    print(cnt)

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    inputs = input().split(' ')
    sheep = int(inputs[0])
    wolf = int(inputs[1])

    if sheep > wolf:
        print('safe')

    else:
        print('unsafe')

if __name__ == '__main__':
    main()
n, m = int(input())
if n == m:
  print("Yes")
else("No")

### FIXED CODE ###

n,m = map(int, input().split())
print("Yes") if n == m else print("No")
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    S = [int(s) for s in input().split()]
    S.sort(reverse = True)

    result = []
    result.append(S[0])

    left = 1
    que = []
    que.append([])

    for i in range(N):
        for j in range(2**i):
            que.append([])
            for k in len(que[-2]):
                if result[j]<=que[-2][k]:
                    que[-1].append(que[-2][k])
                else:
                    result.append(que[-2][k])
                    que[-1].extend(que[-2][k+1:])
                    break
            else:
                for k in range(left,len(S)):
                    if result[j]<=S[k]:
                        que[-1].append(S[k])
                    else:
                        result.append(S[k])
                        left = k+1
                        break
                else:
                    print("No")
                    break
        else:
            continue
        break
    else:
        print("Yes")

if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys

def I(): return(int(sys.stdin.readline()))
def LI(): return([int(x) for x in sys.stdin.readline().split()])


def main():
    N = I()
    S = sorted(LI(),reverse=True)

    flag = [True]*len(S)

    cur = []
    cur.append(S[0])
    flag[0] = False

    for i in range(N):
        nxt = [x for x in cur]
        j = 0

        for k in range(len(S)):
            if j >= len(cur):
                break
            elif flag[k] and S[k]<cur[j]:
                nxt.append(S[k])
                j+=1
                flag[k] = False
        if len(cur) != j:
            return("No")
        cur = sorted(nxt,reverse=True)
    return("Yes")

if __name__ == "__main__":
    print(main())
import numpy as np
a=np.array([[0 if i!="." else 1 for i in input()]for j in range(h)])
s,t,u,p=np.zeros((h,w)),np.zeros((h,w)),np.zeros((h,w)),np.zeros((h,w))
for i in range(h):
    s[i]=(s[i-1]+1)*a[i]
    t[-i-1]=(t[-i]+1)*a[-i-1]
for i in range(w):
    u[:,j]=(u[:,j-1]+1)*a[:,j]
    p[:,-j-1]=(p[:,-j]+1)*a[:,-j-1]
print(np.max(s+t+u+p)-3)

### FIXED CODE ###

import numpy as np
h,w=map(int,input().split())
a=np.array([[0 if i!="." else 1 for i in input()]for j in range(h)])
s,t,u,p=np.zeros((h,w)),np.zeros((h,w)),np.zeros((h,w)),np.zeros((h,w))
for i in range(h):
    s[i]=(s[i-1]+1)*a[i]
    t[-i-1]=(t[-i]+1)*a[-i-1]
for i in range(w):
    u[:,i]=(u[:,i-1]+1)*a[:,i]
    p[:,-i-1]=(p[:,-i]+1)*a[:,-i-1]
print(int(np.max(s+t+u+p))-3)
x, n = map(int, input().split())
p = list(map(int, input().split()))

p2 = [i for i in range(1, 101)]
p3 = list(set(p2) - set(p))

minv = 1000
for i in p3:
    if abs(i-x) < minv:
        minv = abs(i-x)
        ans = i

print(ans) 


### FIXED CODE ###

x, n = map(int, input().split())
p = list(map(int, input().split()))

if not x in p:
    print(x)
    exit()
up = x + 1
down = x - 1
while True:
    if not down in p:
        print(down)
        exit()
    elif not up in p:
        print(up)
        exit()
    up += 1
    down -= 1
def main():
  import sys
  input = sys.stdin.readline
  import bisect
  import numpy as np
  n = int(input())
  a = list(map(int,input().split()))
  b = list(map(int,input().split()))
  x = max(max(a),max(b)).bit_length()+1
  b = np.array(b,dtype=np.int32)
  ans = 0
  for i in range(1,x+1):
    d = sorted(b&(1<<i)-1)
    t = 1<<(i-1)
    anstmp = 0
    for j in range(n):
      y = a[j]&(1<<i)-1
      t1 = np.searchsorted(d,t-y)
      t2 = np.searchsorted(d,2*t-y)
      t3 = np.searchsorted(d,3*t-y)
      anstmp += (t2-t1)+(n-t3)
    if anstmp%2:
      ans += t
  print(ans)
main()

### FIXED CODE ###

a,b,c=map(int,input().split())
if a+b>=c:
  print("Yes")
else:
  print("No")
N=int(input())
A=list(map(int,input().split()))
a_1=sum(A)
count=0
for i in range(0,4):
    if A[i]>A[i+1]:
        A[i+1]=A[i]
    else:
        A[i+1]=A[i+1]
a_2=sum(A)
print(a_2-a_1)
        
    

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
a_1=sum(A)
count=0
for i in range(0,len(A)-1):
    if A[i]>A[i+1]:
        A[i+1]=A[i]
    else:
        A[0]=A[0]
        A[i+1]=A[i+1]
a_2=sum(A)
print(a_2-a_1)
#!/usr/bin/env python3
import sys


def era(N: int):
    N1 = N+1
    prim = [0]*N1
    i = 2
    while i**2 < N1:
        if prim[i] == 0:
            for j in range(i**2, N1, i):
                if prim[j] == 0:
                    prim[j] = i
        i += 1
    ans = []
    p = N
    n = prim[p]
    while n != 0:
        ans.append(n)
        p = p // n
        n = prim[p]
    ans.append(n)
    return ans


def solve(A: int, B: int):

    while A % B:
        tmp = B
        B = A % B
        A = tmp
    ans = set(era(B))
    print(len(ans)+1)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


def solve(A: int, B: int):
    while A % B:
        tmp = B
        B = A % B
        A = tmp
    if B == 1:
        print(1)
    else:
        ans = factorization(B)
        print(len(ans)+1)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)


if __name__ == '__main__':
    main()