peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
s = input()
if s[0] != 'A':
  print('WA')
  exit()
sho = ord('a')
ok = 0
for i in s[2: len(s) - 1]:
  if ord(i) < sho:
    if ord(i) == ord("C"):
      ok += 1
    else:
      print("WA")
      exit()
if ord(s[1]) < sho or ord(s[len(s) - 1]) < sho:
  print("WA")
  exit()
if ok == 1:
  print("AC")
else:
  print("WA")
# Judge status: Accepted
n = int(input())
s = [input() for i in range(n)]

d = {}
cnt = 0
for i in range(n):
	if s[i] in d: d[s[i]] += 1
	else: d[s[i]] = 1
	cnt = max(cnt, d[s[i]])

l = []
for i in range(n):
	if d[s[i]] == cnt:
		l.append(s[i])

l = list(set(l))
l.sort()
for i in range(len(l)):
	print(l[i])
# Judge status: Wrong Answer
A,B,C = [int(i) for i in input().split()]
for i in range(1,B+1):
  if A * i % B == C:
    print("YES")
    break
    if A * i % B != C and i == B:
      print("NO")
# Judge status: Accepted
from collections import deque
N,H = map(int,input().split())
A=[]
B=[]
d=deque()
max_axe = 0
max_throw = 0
ans=0
for i in range(N):
    a,b = map(int,input().split())
    A.append(a)
    B.append(b)

A.sort(reverse=True)
B.sort(reverse=True)
    
for i in B:
    if i>=A[0]:
        H-=i
        ans+=1
        if H<=0:break
    else:
        break

if H>0:ans+=int(-(-H//A[0]))

print(ans)
# Judge status: Wrong Answer
n = int(input())
if n%7 == 0:
    if n%4==0:
        print('Yes')
    else:
        print('No')
else:
    print('No')
# Judge status: Wrong Answer
S = raw_input()
if S == "MON":
    print 6
elif S == "TUES":
    print 5
elif S == "WED":
    print 4
elif S == "THU":
    print 3
elif S == "FRI":
    print 2
elif S == "SAT":
    print 1
else:
    print 7
# Judge status: Wrong Answer
#!/usr/bin/env python3
mod = 10**9+7
def cmb(a,b):
    b = min(a-b,b)
    ans = 1
    for i in range(b):
        ans *= (a-i) * pow(i+1,mod-2,mod)% mod
    return ans % mod
    
x,y = map(int,input().split())
r = (2*y-x)//3
d = (2*x-y)//3
if (2*y-x)% 3 or (2*x-y)%3: print(0)
else:print(cmb(r+d,d))
# Judge status: Wrong Answer
S=input()
s=[0 for i in range(len(S))]

for i in range(len(S)):
    s[i]=int(S[i])
CHECK=[0 for i in range(2021)]
ans=0
temp=0
for i in range(1,len(s)+1):
    #print(s[-i])
    temp=(temp+s[-i]*pow(10,i-1,2019)+2019*2)%2019
    #print(i,temp)
    #print(temp)
    CHECK[temp]+=1
for i in range(2020):
    if i==0:
        ans+=CHECK[i]
    elif CHECK[i]>1:
        ans+=CHECK[i]-1
 
print(ans)
# Judge status: Accepted
N = int(input())
a = []
if N == 0:
  a = ["0"]
while N != 0:
  a.append(str(N % 2))
  N = -(N // 2)
  # N = -(N - N % 2) // 2
print("".join(list(reversed(a))))
# Judge status: Wrong Answer
N,R = map(int,input().split())

if N < 10:
    print(R + 100*(10-N))
else:
    print(N)
# Judge status: Wrong Answer
import bisect
n,m = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
for _ in range(m):
    #A.sort()
    b,c = map(int,input().split())
    index = bisect.bisect_right(A,c)
    if index == 0:
        pass
    elif b >= index:
        for i in range(0,index):
            A[i] = c
    else:
        for i in range(b):
            A[i] = c
print(sum(A))
# Judge status: Wrong Answer
X = int(input())

t = 1
while True:
	if X-t>t:
		X-=t
	if X-t==0:
		break
	t += 1
print(t)
# Judge status: Accepted
import math
A,B = (int(x) for x in input().split())
print(A*B//math.gcd(A,B))
# Judge status: Wrong Answer
n, m, k = list(map(int, input().split()))

flag = False
for y in range(m):
    if n - 2 * y == 0:
        continue
        
    x = (k - m * y) / (n - 2 * y)
    
    if (k - m * y) % (n - 2 * y) == 0 and (0 <= x and x <= m):
        print(y, (k - m * y) / (n - 2 * y), (n - 2 * y), (k - m * y))
        flag = True
        break
print("Yes" if flag else "No")
# Judge status: Accepted
def main():
    N, S = open(0).read().split()
    pre = S.count("E")
    cur = pre
    for Si in S:
        if pre < cur:
            cur = pre
        if Si == "E":
            pre -= 1
        else:
            pre += 1
    print(pre if pre < cur else cur)
    return


main()
# Judge status: Wrong Answer
import sys
import decimal
input=sys.stdin.readline


def lg(x):
    ans=0
    while (x>1):
        ans+=1
        x=x//10
    return ans+1


S=int(input())
CHECK=[0 for i in range(2020)]
ans=0
for i in range(lg(S)):
    temp=(S%pow(10,i+1))%2019
    #print(S%pow(10,i+1))
    if temp==0:
        ans+=1
    elif CHECK[temp]==0:
        CHECK[temp]=1
    else:
        ans+=1
print(ans)
# Judge status: Accepted
import collections

n,m = map(int,input().split())
g = [[] for i in range(n+1)]
for i in range(m):
  a,b = map(int,input().split())
  g[a].append(b)
  g[b].append(a)
q = collections.deque()
q.append(1)
check = [0]*(n+1)
check[1] = 1
ans = [0]*(n+1)
while len(q)!=0:
  v = q.popleft()
  for j in g[v]:
    if check[j] == 0:
      check[j] = 1
      ans[j] = v
      q.append(j)
print('Yes')
for k in range(2,n+1):
  print(ans[k])
# Judge status: Accepted
A,B,C=map(int,input().split())
if A+B>=C:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

X = list(input())
length = len(X)

cur = 0
cnt = 0
for i in range(length):
    cur = max(cur, i+1)
    x = X[i]
    if x=='S':
        while cur<length:
            v = X[cur]
            if v=='T':
                cnt += 2
                break
            cur += 1
print(length-cnt)
# Judge status: Wrong Answer
degree = float(input())
max_num = 360

if(1 <= degree <= 179 and degree.is_integer() == True):
    answer = round(max_num / degree)
    print(answer)
elif(degree.is_integer() == False):
    print(False)
else:
    print(False)
# Judge status: Accepted
n,k = map(int,input().split())

def func(n,k):
    count = 0
    while True:
        if n / k >= 1:
            n //= k
            count += 1
        else:
            break
    return count + 1

print(func(n,k))
# Judge status: Accepted
s, t = input().split()
a, b = map(int, input().split())
u = input()

if u == s:
    print(a - 1, b)
else:
    print(a, b - 1)
# Judge status: Wrong Answer
name = str(input())
print('A' + name[0] + 'C')
# Judge status: Accepted
N = int(input())
A = []
for i in range(N):
    x,l = map(int,input().split())
    A.append([x-l,x+l])
B=sorted(A,key=lambda x: x[1])
s = B[0][1]
n = 1
for i in range(1,N):
    a = B[i][0]
    b = B[i][1]
    if a >= s:
        n += 1
        s = b
print(n)
# Judge status: Wrong Answer
s= input()
 
list=[]
for i in s:
  if i == '0':
    list.append('0')
  elif i == '1':
    list.append('1')
  elif i == 'B':
    if len(list) != 0:
      list.pop(-1)
print(list)
# Judge status: Accepted
import sys
import fractions
input = sys.stdin.readline


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


A, B = map(int, input().split())
print(lcm(A, B))
# Judge status: Wrong Answer
N=int(input())
A=[]
A.extend((int(x) for x in input().split()))
ans=0
for i in range(0,N-1):
    for j in range(i+1,N):
        n=i+j
        if n==A[i]+A[j]:
            ans=ans+1
print(ans)
# Judge status: Accepted
a,b,k = map(int,input().split())

aa = list(range(a,min(a+k,b)))
bb = list(range(max(b-k+1,a),b+1))
aa.extend(bb)
c = set(aa)
d = list(c)
d = sorted(d)
for i in range(len(d)):
    print(d[i])
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))
M = 10 ** 9 + 7
ans = 0
B = [A[0]]
for j in range(1,n):
    B.append(A[j]+B[j-1])
for i in range(n-1):
    ans += A[i] * (B[-1]-B[i])
    ans %= M
ans %= M
print(ans)
# Judge status: Wrong Answer
import sys

sys.setrecursionlimit(10 ** 5 + 10)


def input(): return sys.stdin.readline().strip()


def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))

    biggerA, biggerB = 0, 0

    for i in range(N):
        if A[i] > B[i]:
            biggerA += A[i] - B[i]
        elif A[i] < B[i]:
            biggerB += B[i] - A[i]
    if biggerA <= biggerB/2:
        print('Yes')
    else:
        print('No')


resolve()
# Judge status: Accepted
N, X, T = map(int, input().split())
print((N // X + 1) * T if N % X else (N // X) * T)
# Judge status: Accepted
n,k = [int(x) for x in input().strip().split()]
H = [int(x) for x in input().strip().split()]

dp = [0]+[10**9 + 7] * (n-1)
for i in range(n):
    for j in range(i+1,min(n,i+k+1)):
        dp[j] = min (dp[j], dp[i] + abs(H[i] - H[j]))
print (dp[-1])
# Judge status: Wrong Answer
s = input()

if s == 'keyence':
    print('YES')
    exit()

for i in range(0,len(s)-1):
    for j in range(i+1,len(s)):
        print(s[:i]+s[j:])
        if s[:i]+s[j:] == 'keyence':
            print('YES')
            exit()
print('NO')
# Judge status: Wrong Answer
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
def high(h):
  return T - h*0.006
hs = [high(x) for x in H]
ans = 0
for h in hs:
  if ans < abs(A-h):
    ans = h
print(hs.index(ans)+1)
# Judge status: Accepted
a,b,c = map(int, input().split())
sm=a
x=a%b
sm%=b
if sm==c:
    print("YES")
    exit()

for i in range(10**5):
    sm+=a
    sm%=b
    
    if sm==c:
        print("YES")
        exit()
    elif sm==x:
        break

print("NO")
# Judge status: Accepted
a,b,c,d,e = map(int,input().split())
if(a == 0):
    print(1)
if(b == 0):
    print(2)
if(c == 0):
    print(3)
if(d == 0):
    print(4)
if(e == 0):
    print(5)
# Judge status: Accepted
# C - Step

from itertools import accumulate
import operator

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

b = accumulate(a, max)
s = sum(map(operator.sub, b, a))
print(s)
# Judge status: Accepted
import math
a,b=map(int,input().split())
print((a*b)//math.gcd(a,b))
# Judge status: Accepted
N = int(input())

total = 0
for i in range(1,N+1):
  total += (0 if i%3 == 0 or i%5 == 0 else i)

print(total)
# Judge status: Wrong Answer
n=int(input())

ans=[]

for _ in range(n):
  a,b=map(int,input().split())
  c=a+b
  ans.append(c)
  
m=min(ans)
M=max(ans)

print(M-m)
# Judge status: Accepted
n = int(input())
lst = list(map(int,input().split()))
ans = [0] * n

for i in lst:
    ans[i-1] += 1

print(*ans)
# Judge status: Accepted
s = input()
t = input()

if s == t[:-1]:
  if len(s) + 1 == len(t):
    print('Yes')
else:
  print('No')
# Judge status: Accepted
from math import gcd

n = int(input())

sum = 0

for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1, n+1):
            sum += gcd(gcd(i,j),k)

print(sum)
# Judge status: Wrong Answer
n, x = map(int, input().split())
l = sorted(list(map(int, input().split())))
if sum(l) <= x:
    print(n)
else:
    for i in range(n):
        print(x)
        if x <= 0:
            break
        x -= l[i]
    print(i)
# Judge status: Accepted
import math
n = int(input())
ans = 1001001001
for a in range(1, n):
    b = n - a
    if a > b: break
    map(int, str(a))
    cnddt = sum(map(int, str(a))) + sum(map(int, str(b)))
    ans = min(ans, cnddt)
print(ans)
# Judge status: Wrong Answer
n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse = True)

for i in range(m):
    a[0] = a[0] // 2
    if sum(a) == 0:
        break
    if n < 2:
        for j in range(1, n):
            if a[0] < a[j]:
                a[0], a[j] = a[j], a[0]
                break
print(sum(a))
# Judge status: Wrong Answer
n, m = map(int, input().split())
h = list(map(int, input().split()))
list1 = [1] * n
for _ in range(m):
    a, b = map(int, input().split())
    if h[a - 1] < h[b - 1]:
        list1[a - 1] = 0
    if h[a - 1] > h[b - 1]:
        list1[b - 1] = 0
print(sum(list1))
# Judge status: Accepted
n, a, b = map(int, input().split())
s = input()
c = a+b

for x in s:
    if x == 'a' and c > 0:
        c -= 1
        print('Yes')
    elif x == 'b' and b > 0 and c > 0:
        b -= 1
        c -= 1
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
S = input()
flag = False
if S[0] == S[1] and S[1] != S[2] and S[2] == S[3]:
    flag = True
if S[0] == S[2] and S[2] != S[3] and S[1] == S[3]:
    flag = True
if S[0] == S[3] and S[1] != S[3] and S[1] == S[2]:
    flag = True

if flag:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
a,b,t = map(int,input().split())

t += 0.5
set_su = t // a

print(set_su * b)
# Judge status: Accepted
N=int(input())
p=list(map(int, input().split()))
i = 1
res = 0
while i<N:
    if i==p[i-1] and i+1==p[i]:
        res += 1
        i += 2
    elif i==p[i-1]:
        res += 1
        i += 1
    else:
        i += 1
if i==N and i==p[i-1]:
    res += 1
print(res)
# Judge status: Wrong Answer
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    N, X = map(int, input().split())
    L = list(map(int, input().split()))
    lsum = [0 for _ in range(N + 1)]
    for i in range(N):
        lsum[i + 1] = L[i] + lsum[i]

    for i in range(N):
        if lsum[i] <= X:
            ans = i + 1
        else:
            break
    print(ans)


if __name__ == '__main__':
    solve()
# Judge status: Wrong Answer
import math
N = int(input())

if N <= 6:
  ans = 1
elif N <= 11:
  ans = 2
elif N % 11 == 0:
  ans = N / 11 * 2
else:
  ans = (math.floor(N / 11) * 2) + 1

print(ans)
# Judge status: Wrong Answer
import sys
sys.setrecursionlimit(2147483647)

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

if n==2:
    print(aa[0],aa[1])
    exit()

aa.sort()

nn=aa[-1]

import bisect
#a=[0,2,3,4,67,8]
#a.sort()
i=bisect.bisect_left(aa,nn//2) 

if abs(aa[i]-nn//2)<abs(aa[i+1]-nn//2):
    print(nn,aa[i])
else:
    print(nn,aa[i+1])
# Judge status: Accepted
# 2020/08/08
# AtCoder Beginner Contest 174 - A

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

# Calc
sa = abs(b - a)

if sa % 2 == 0:
    ans = sa // 2
else:
    # B go Right and 1 lose
    bgr = n - b + 1
    bgra = a + bgr
    rans = (n - bgra) // 2 + bgr
    
    # A go Left and 1 lose
    agl = a - 1 + 1
    aglb = b - agl
    lans = (aglb - 1) // 2 + agl
    ans = min(rans, lans)

# Output
print(ans)
# Judge status: Wrong Answer
inf = 10 ** 9 + 7

n = int(input())

happiness = [tuple(map(int, input().split())) for _ in range(n)]
dp = [[inf]*3 for _ in range(n)]

dp[0][0] = happiness[0][0]
dp[0][1] = happiness[0][1]
dp[0][2] = happiness[0][2]

for i in range(1, n):
    for j in range(3):
        for k in range(3):
            if j != k:
                dp[i][j] = dp[i-1][k] + happiness[i][j]

print(max(dp[n-1]))
# Judge status: Wrong Answer
q,h,s,d=map(int,input().split())
n=int(input())
 
l=min(q*n*8,h*n*4,s*n*2,d*n)
if l != d*n:
    print(int(l/2))
else:
    m=min(q*4,h*2,s)
    print(int((d*((n-1)/2))+m) if n%2==1 else int(l/2))
# Judge status: Accepted
c = input()

if c in 'aiueo':
    print('vowel')
else:
    print('consonant')
# Judge status: Wrong Answer
A,B,C,K = list(map(int,input().split()))
print(min(K,A) - min(K-(A+B),C))
# Judge status: Wrong Answer
N = int(input())
if N%2 == 1:
  print(((N-1)/2)/((N-1)/2+1))
else:
  print(0.5)
# Judge status: Accepted
A,B = map(int,input().split())
ans = 0

for a in range(A,B+1):
  a = list(str(a))
  if a[0]==a[4] and a[1]==a[3]:
    ans+=1
    
print(ans)
# Judge status: Wrong Answer
x,y=map(int,input().split())
if 0<=x<y or x<y<=0:
  print(abs(x-y))
elif x<0<y or y<0<=x:
  print(abs(abs(x)-abs(y))+1)
elif y<x<0 or 0<y<x:
  print(abs(x-y)+2)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
new_mode, mode = '', ''
cnt = 0
for i in range(1, n):
    tmp = a[i-1]-a[i]
    if tmp==0: continue
    elif tmp==1: mode='-'
    elif tmp==-1: mode='+'
    else: mode='?'
    if new_mode=='':  new_mode=mode
    elif new_mode!=mode:
        cnt+=1
        new_mode=''
print(cnt if cnt==0 else cnt+1)
# Judge status: Accepted
a=int(input())
b=int(input())
print([i for i in range(1, 4) if i not in [a, b]][0])
# Judge status: Accepted
S = input()
count = 0
ans = 0
for i in range(3):
  if S[i] == "R":
    count += 1
    ans = max(ans, count)
  else:
    ans = max(ans, count)
    count = 0


print(ans)
# Judge status: Wrong Answer
s = input()

if len(set(s)) == 4:
  print('Good')
else:
  print('Bad')
# Judge status: Wrong Answer
n = int(input())
h = list(map(int, input().split()))

dp = [10001] * 110000
dp[0] = 0

for i in range(n-1):
    dp[i+1] = min(dp[i+1], dp[i] + abs(h[i] - h[i+1]))
    if n - 2 > i:
        dp[i+2] = min(dp[i+2], dp[i] + abs(h[i] - h[i+2]))

print(dp[n-1])
# Judge status: Accepted
n,k,s = map(int,input().split())
if s != 10**9:
    ans = [s]*k+[s+1]*(n-k)
    print(*ans)
else:
  ans = [s]*k+[s-1]*(n-k)
  print(*ans)
# Judge status: Accepted
n, x = map(int, input().split())
a = list(map(int, input().split()))
 
ans = 0
for i in range(n-1):
    total = a[i] + a[i+1]
    if total > x:
        diff = total - x
        ans += diff
        a[i+1] = max(0, a[i+1] - diff)
print(ans)
# Judge status: Accepted
n = int(input())
m = 0
s = "No"
for i in range(n):
  a,b = map(int, input().split())
  if a == b:
    m += 1
  if m == 3:
    s = "Yes"
    break
  elif a != b:
    m = 0
print(s)
# Judge status: Accepted
n = int(input())
d_list = sorted(list(map(int, input().split())))
if n % 2 != 0:
    print(0)
    exit()
print(d_list[n // 2] - d_list[n // 2 - 1])
# Judge status: Accepted
N, W = map(int, input().split())
wv = [list(map(int, input().split())) for _ in range(N)]

dp = [[0] * (W + 1) for _ in range(N + 1)]

for i in range(N):
    for w in range(W + 1):
        dp[i + 1][w] = dp[i][w]
        if w - wv[i][0] >= 0:
            dp[i + 1][w] = max(dp[i + 1][w], dp[i][w - wv[i][0]] + wv[i][1])

print(dp[N][W])
# Judge status: Accepted
n,l=map(int,input().split())
ans=n*(2*l+n-1)//2
if l<=0 and l+n>=1:
  print(ans)
elif l>0:
  print(ans-l)
else:
  print(ans-l-n+1)
# Judge status: Accepted
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()

a = int(input())
b = int(input())
h = int(input())

print(((a+b)*h)//2)
# Judge status: Accepted
N, M = map(int, input().split())

ans = int(N*(N-1) /2+ M*(M-1)/2)

print(ans)
# Judge status: Accepted
N  = int(input())
dp = [[0]*3 for _ in range(N+1)]

for n in range(1,N+1):
  a, b, c = map(int,input().split())
  dp[n][0] = max(dp[n-1][1], dp[n-1][2]) + a
  dp[n][1] = max(dp[n-1][0], dp[n-1][2]) + b
  dp[n][2] = max(dp[n-1][0], dp[n-1][1]) + c
print(max(dp[N]))
# Judge status: Accepted
n, a, b = map(str, input().split())
h = 0
ans = []

for i in range(1,int(n)+1):
	for j in str(i):
		h += int(j)
	if h >= int(a) and h <= int(b):
		ans.append(int(i))

	h = 0

print(sum(ans))
# Judge status: Accepted

from bisect import bisect_right

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

L_sorted = sorted(L)

count = 0
for i in range(N):  # longest stick
    for j in reversed(range(i)):  # second longest stick
        r = bisect_right(L_sorted, L_sorted[i] - L_sorted[j])
        if j <= r:
            break
        else:
            count += j - r

print(count)
# Judge status: Accepted
A, B = map(int, input().split())
d = B-A
s = sum([x for x in range(1, d)])
print(s-A)
# Judge status: Accepted
# cook your dish here
a,b=map(int,input().split())
if(a>=10):
    print(b)
else:
    print((10-a)*100+b)
# Judge status: Wrong Answer
S = int(input())
from math import sqrt
rtS = sqrt(S)
u = 10 ** 9
ans = [0 for _ in range(6)]
ans[2] = u
ans[3] = 1
ans[4] = -S%u if S > u else S%u
ans[5] = S//u
# print(ans[2]*ans[5] - ans[4])
print(*ans)
# Judge status: Accepted
k,s=map(int,input().split())
c=0
for i in range(k+1):
  for j in range(k+1):
    if 0<=s-i-j<=k:
      c+=1
print(c)
# Judge status: Accepted
A,V=list(map(int,input().split()))
B,W=map(int,input().split())
T=int(input())

diff_x=abs(A-B)
diff_a=max(V-W,0)

if T*diff_a>=diff_x:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
x,a,b = map(int, input().split())

if abs(x-a) <= abs(x-b):
    print("A")
else:
    print("B")
# Judge status: Accepted
N, K, S = map(int, input().split())

if S == 10**9:
    ans = [1]*N
else:
    ans = [S+1] * N
for i in range(K):
    ans[i] = S

print(" ".join(map(str, ans)))
# Judge status: Accepted
s = input()
r =s[::-1]
l = len(s)
n1=s.index('A')
n2=l-r.index('Z')
print(n2-n1)
# Judge status: Wrong Answer
PQR = list(map(int, input().split()))
PQR.sort
print(PQR)
print(PQR[0]+PQR[1])
# Judge status: Accepted
n = int(input())

for i in range(1, 10):
    for j in range(1, 10):
        if n == i*j:
            print('Yes')
            exit()
print('No')
# Judge status: Wrong Answer
N = int(input())
ans = N / 2
if type(ans) == int:
  print(ans)
else:
  print(int(ans)+1)
# Judge status: Wrong Answer
x, y = map(int, input().split())
mod = 10**9+7

if (2*y-x)%3 != 0 or (2*x-y)%3 != 0:
    print(0)
    exit()

xc = (2*y-x)//3
yc = (2*x-y)//3
p = 1
k = 1
for i in range(1, xc+1):
    p *= (yc+i)
    k *= i
    p %= mod
    k %= mod

ans = p*pow(k, mod-2, mod)%mod
print(ans)
# Judge status: Accepted
x, y = map(int,input().split())
if y != 1:
  if x*(y-1)%y != 0:
    print(x*(y-1))
  else:
    print(-1)
else:
  print(-1)
# Judge status: Wrong Answer
n, r = map(int, input().split())
if n >= 10:
  print(r)
else:
  print(r-100*(10-r))
# Judge status: Wrong Answer
S = [int(input()) for i in range(2)]
N = S[0]
A = S[1]
s = N % 500 
if (A >= s):
  print("yes")
else:
  print("no")
# Judge status: Accepted
n,h=map(int,input().split())
c=[]
#print(c)
#
amax=0
temp=-1
for i in range(n):
    a,b=map(int,input().split())
    if a>amax:amax=a;temp=i
    c.append(b)
#k=c[temp]
import math
c.sort(reverse = True)
rt=[num for num in c if num>amax]
if h<=sum(rt):
    sum1=0
    i=0
    while sum1<h:
        sum1+=rt[i]
        i+=1
    print(i)
else:
    nt=math.ceil((h-sum(rt))/amax)
    print(len(rt)+nt)
# Judge status: Accepted
X,N=map(int,input().split())
p=list(map(int,input().split()))
i=0
j=0
while X+i in p:
    i+=1
while X-j in p:
    j+=1
if i>j:
    print(X-j)
elif i<j:
    print(X+i)
else:
    print(min([X+i,X-j]))
# Judge status: Wrong Answer
n, m = map(int, input().split())
x = list(map(int,input().split()))

x.sort()
dis = [0] * (m - 1)

for i in range(m - 1):
  dis[i] = x[i + 1] - x[i]

dis.sort()

ans = sum(dis[:len(x) - n])
print(ans)
# Judge status: Wrong Answer
L, R, d = map(int, input().split())
print(int(R / d) - int(L / d))
# Judge status: Wrong Answer
# https://atcoder.jp/contests/agc005/tasks/agc005_a

x = input()
i = 0
s = 0
ans = len(x)
x += 'S'
f = True
while i < len(x):
    if f:
        if x[i] == 'S':
            s += 1
            i += 1
        else:
            f = False
    else:
        if x[i] == 'T':
            i += 1
        else:
            ans -= s * 2
            s = 0
            f = True
print(ans)
# Judge status: Accepted
n = int(input())
memo = [0] * (n+1)
memo[0] = 2
memo[1] = 1
for i in range(2, n+1):
  memo[i] = memo[i-2] + memo[i-1]
print(memo[n])
# Judge status: Accepted
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
bc = []
for i in range(m):
    bc.append(list(map(int, input().split())))
bc.sort(key=lambda x: x[1], reverse=True)
for i in bc:
    if a[0] < i[1]:
        for j in range(i[0]):
            if a[0] < i[1]:
                a.append(i[1])
                del a[0]
            else:
                break
    else:
        break
print(sum(a))
# Judge status: Accepted
H1, M1, H2, M2, K = map(int, input().split())
m1 = 60*H1 + M1
m2 = 60*H2 + M2
print(m2-m1-K)
# Judge status: Accepted
W,H,N=map(int,input().split())
values=[[0],[W],[0],[H]]
for i in range(N):
  x,y,a=(map(int,input().split()))
  if a<=2:
    values[a-1].append(x)
  elif a>=3:
    values[a-1].append(y)
print(max(0,min(values[1])-max(values[0]))*max(0,min(values[3])-max(values[2])))
# Judge status: Wrong Answer
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

a, b = map(int, readline().split())
bt = (1 + (b - a)) // 2 * (b - a)

print(bt - b)
# Judge status: Wrong Answer
a,b,x=map(int,input().split())
print('Yes' if a+b>=x and a<=x else 'No')