Harryxun/stf_run huggingface dataset:
a,b,c = map(int,input().input())
if max(a,b,c) % 2 == (a + b + c) % 2:
	print((3 * max(a,b,c) - (a + b + c)) // 2)
else:
	print((3 * (max(a,b,c) + 1) - (a + b + c)) // 2)

### FIXED CODE ###

a,b,c = map(int,input().split())
if max(a,b,c) % 2 == (a + b + c) % 2:
	print((3 * max(a,b,c) - (a + b + c)) // 2)
else:
	print((3 * (max(a,b,c) + 1) - (a + b + c)) // 2)
from math import gcd
n = int(input())
ans = 1
for i in range(n):
    t = int(input())
    if ans%t!=0:
        ans = ans*t//gcd(ans,t)
print(ans)

### FIXED CODE ###

from fractions import gcd
n = int(input())
ans = 1
for i in range(n):
    t = int(input())
    if ans%t!=0:
        ans = ans*t//gcd(ans,t)
print(ans)
num=int(input())
line=input().split(" ")
a=int(line[0])
b=int(line[1])
low=[]
middle=[]
high=[]

lines=input().split(" ")


for i in range(num):
    n=int(lines[i])
    if n<=a:
        low.append(n)
    elif n<=b:
        middle.append(n)
    else:
        high.append(n)

print(min(len(low),len(middle),len(high)))

### FIXED CODE ###

squ=int(input())
h=int(input())
w=int(input())

print((squ-h+1)*(squ-w+1))
# -*- coding: utf-8 -*-

import math
import functools

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

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a if a > 0 else 1

max_under_lcm = functools.reduce(lambda x, y: int((x * y) / gcd(x,y)), numbers) - 1
answer = sum([ max_under_lcm % n for n in numbers])

print(answer)

### FIXED CODE ###

import functools
import fractions

N = int(input())
numbers = list(map(int, input().split()))
answer = sum([n - 1 for n in numbers])

print(answer)
# E - Multiplication 4
import heapq
N, K = map(int, input().split())
A = list(int(a) for a in input().split())
MOD = 10**9 + 7

# N = K の時
if N == K:
    ans = 1
    for a in A:
        ans = (ans * a) % MOD

else:
    pos = []
    neg = []
    for a in A:
        if a >= 0:
            pos.append(a)
        else:
            neg.append(a)

    # 必ずマイナスになる時＝全てがマイナスの値であり、
    # かつKが奇数の時
    if len(neg) == N and K&1 == 1:
        neg.sort(reverse=True)
        ans = 1
        for i in range(K):
            ans = (ans * neg[i]) % MOD

    # それ以外のプラスになるケース
    # プラスの要素とマイナスの要素を絶対値の大きい順にソートし、
    # Kが奇数であれば、プラスのリストから1つ選び、
    # 残りの偶数個のKに対して、２つずつを選んだ時の
    # 大きい方から取得していく
    else:
        pos.sort(reverse=True)
        pos2 = []
        ans = 1
        ini = 0
        if K&1 == 1:
            ans = (ans * pos[0]) % MOD
            ini = 1
        for i in range(ini, len(pos)//2, 2):
            heapq.heappush(pos2, (pos[i] * pos[i+1])*-1)
        neg.sort()
        neg2 = []
        for i in range(0, len(neg)//2, 2):
            heapq.heappush(neg2, (neg[i] * neg[i+1]) * -1)
        rem = K-1
        while rem > 0:
            if (pos2 != [] and neg2 != [] and pos2[0] <= neg2[0]) or (pos2 != [] and neg2 == []):
                tmp = heapq.heappop(pos2) * -1
            else:
                tmp = heapq.heappop(neg2) * -1
            ans = (ans * tmp) % MOD
            rem -= 2

print(ans)

### FIXED CODE ###

# E - Multiplication 4
import heapq
N, K = map(int, input().split())
A = list(int(a) for a in input().split())
MOD = 10**9 + 7

# N = K の時
if N == K:
    ans = 1
    for a in A:
        ans = (ans * a) % MOD

else:
    pos = []
    neg = []
    for a in A:
        if a >= 0:
            pos.append(a)
        else:
            neg.append(a)

    # 必ずマイナスになる時＝全てがマイナスの値であり、
    # かつKが奇数の時
    if len(neg) == N and K&1 == 1:
        neg.sort(reverse=True)
        ans = 1
        for i in range(K):
            ans = (ans * neg[i]) % MOD

    # それ以外のプラスになるケース
    # プラスの要素とマイナスの要素を絶対値の大きい順にソートし、
    # Kが奇数であれば、プラスのリストから1つ選び、
    # 残りの偶数個のKに対して、２つずつを選んだ時の
    # 大きい方から取得していく
    else:
        pos.sort(reverse=True)
        pos2 = []
        ans = 1
        ini = 0
        rem = K
        if K&1 == 1:
            ans = (ans * pos[0]) % MOD
            ini = 1
            rem -= 1
        for i in range(0, (len(pos)-ini)//2):
            heapq.heappush(pos2, (pos[i*2+ini] * pos[i*2+ini+1])*-1)
        neg.sort()
        neg2 = []
        for i in range(0, len(neg)//2):
            heapq.heappush(neg2, (neg[i*2] * neg[i*2+1]) * -1)
        while rem > 0:
            if (pos2 != [] and neg2 == []) or (pos2 != [] and neg2 != [] and pos2[0] <= neg2[0]):
                tmp = heapq.heappop(pos2) * -1
            else:
                tmp = heapq.heappop(neg2) * -1
            ans = (ans * tmp) % MOD
            rem -= 2

print(ans)
sorted_s = sorted(s)
sorted_t = sorted(t, reverse=True)

len_s = len(sorted_s)
flag = 0
for i in range(len_s):
    s_i = sorted_s[i]
    t_i = sorted_t[i]
    if s_i < t_i:
        flag = 1
        break
if flag:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s = input()
t = input()

sorted_s = sorted(s)
sorted_t = sorted(t, reverse=True)
len_s = len(sorted_s)
len_t = len(sorted_t)
iter_range = len_s if len_s < len_t else len_t

flag = 0
same_count = 0
for i in range(iter_range):
    s_i = sorted_s[i]
    t_i = sorted_t[i]
    if s_i < t_i:
        flag = 1
        break
    if s_i == t_i:
        same_count+= 1

if (same_count == len_s) & (len_s < len_t):
    print("Yes")
elif (same_count == len_s) & (len_s >= len_t):
    print("No")
elif flag:
    print("Yes")
else:
    print("No")
N,M = map(int,input().split())
ichi = []
juu = []
hyaku = []
for i in range(M):
    if N == 1:
        s,c = map(int,input().split())
        ichi.append(c)
    elif N == 2:
        s,c = map(int,input().split())
        if s == 1:
            juu.append(c)
        else:
            ichi.append(c)
    elif N == 3:
        s,c = map(int,input().split())
        if s == 1:
            hyaku.append(c)
        elif s == 2:
            juu.append(c)
        else:
            ichi.append(c)
ichi = set(ichi)
juu = set(juu)
hyaku = set(hyaku)
if N == 1:
    if len(ichi) >= 2:
        print(-1)
    else:
        print(min(ichi))
elif N == 2:
    if juu == set([0]):
        print(-1)
    elif len(juu) >= 2:
        print(-1)
    elif len(ichi) >= 2:
        print(-1)
    else:
        if ichi == set():
            ichi.add(0)
        print(str(min(juu))+str(min(ichi)))
else:
    if hyaku == set([0]):
        print(-1)
    elif len(hyaku) >= 2:
        print(-1)
    elif len(juu) >= 2:
        print(-1)
    elif len(ichi) >= 2:
        print(-1)
    else:
        if juu == set():
            juu.add(0)
        if ichi == set():
            ichi.add(0)
        print(str(min(hyaku))+str(min(juu))+str(min(ichi)))



### FIXED CODE ###

N,M = map(int,input().split())
values = []
for i in range(N):
    values.append([])
for i in range(M):
    s,c = map(int,input().split())
    values[s-1].append(c)

#同じ桁に2つ以上候補があるなら-1
for i in values:
    if len(set(i)) >= 2:
        print(-1)
        exit()

#最上位桁に候補がないときは1を補う
if values[0] == list():
    if N != 1:
        values[0].append(1)

#候補がない桁は0を補う
for i in range(N):
    if len(values[i]) == 0:
        values[i].append(0)

#探索
for i in range(1000):
    i = [int(j) for j in list(str(i))]
    if len(i) != N:
        continue
    if N==3:
        if i[0] in values[0] and i[1] in values[1] and i[2] in values[2]:
            print("".join([str(j) for j in i]))
            exit()
    elif N==2:
        if i[0] in values[0] and i[1] in values[1]:
            print("".join([str(j) for j in i]))
            exit()
    else:
        if i[0] in values[0]:
            print("".join([str(j) for j in i]))
            exit()
print(-1)
a = N % 10
if a = 2 or 4 or 5 or 7 or 9:
  print('hon')
elif a = 0 or 1 or 6 or 8:
  print('pon')
else:
  print('bon')


### FIXED CODE ###

N = int(input())
a = N % 10
if a == 2 or a==4 or a==5 or a==7 or a==9:
    print('hon')
elif a == 0 or a==1 or a==6 or a==8:
    print('pon')
else:
    print('bon')
import numpy as np
n,m = map(int,input().split())
if b%a == 0:
    print(b+a)
else:
    print(b-a)

### FIXED CODE ###

import numpy as np
a,b = map(int,input().split())
if b%a == 0:
    print(b+a)
else:
    print(b-a)
if sum(list(map(int, input()))) > 21:
  print('bust')
else:
  print('win')

### FIXED CODE ###

if sum(list(map(int, input().split()))) > 21:
  print('bust')
else:
  print('win')
A,B = [int(i) for i in input().split()]

flag=0
for i in range(1,10000):
    if int(i*0.08)==A and int(i*0.1)==B:
        ans = i
        flag=1
        break
if flag==1:
    print(ans)
else:
    print(-1)


### FIXED CODE ###

S=input()

if S=='AAA' or S=='BBB':
    print('No')
else:
    print('Yes')
class FenwickTree:
    arr = []
    def __init__(self, n):
        self.arr = [0 for _ in range(n + 1)]

    def inc(self, i, val):
        self.private_inc(i + 1, val)

    def sum(self, a, b):
        return self.private_sum(b+1) - self.private_sum(a)

    def private_inc(self, i, val):

        while i < len(self.arr):
            self.arr[i] += val
            i += i & -i

    def private_sum(self, i):
        s = 0
        while i > 0:
            s += self.arr[i]
            i -= i & -i
        return s

MOD = 10 **9 +7
 
N, K = [int(v) for v in raw_input().split()]
A = [int(v) for v in raw_input().split()]
maxA = max(A)
indexInv = [ [] for _ in range(maxA)]
for index, value in enumerate(A):
    indexInv[value-1].append(index)
nbrs = FenwickTree(maxA+1)
dbl = []
inversions = 0
versions = 0
for k in range(maxA):
    for index in indexInv[k]:

        thisInv = nbrs.sum(index, maxA)
        thisVer = nbrs.sum(0, index -1)
        dbl.append((index, thisInv, thisVer))
    #print('Adding doubles ', dbl)
    for val, invV, vers in dbl:
        inversions += invV
        versions += vers
        nbrs.inc(val, 1)
    dbl = []
#print('Inversions =  {} '.format(inversions))
#print('Versions =  {} '.format(versions))
res = ((K + 1) * K)/2 * inversions + (K * (K-1))/2 * versions
res = res % MOD
print(res)

### FIXED CODE ###


MOD = 10 **9 +7
 
N, K = [int(v) for v in raw_input().split()]
A = [int(v) for v in raw_input().split()]

inversions = 0
versions = 0
for i in range(N):
    for j in range(i+1, N):
        if A[i] > A[j]:
            inversions += 1
        if A[i] < A[j]:
            versions += 1



#print('Inversions =  {} '.format(inversions))
#print('Versions =  {} '.format(versions))
res = ((K + 1) * K)/2 * inversions + (K * (K-1))/2 * versions
res = res % MOD
print(res)
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author apurba_debnath
 */

#include <bits/stdc++.h>

#define ll long long
#define DEBUG(x) cout << '>' << #x << ':' << x << endl

using namespace std;

class BMultiplication2 {
public:
    void solve(std::istream &in, std::ostream &out) {
        int n;
        in >> n;
        ll a[101010];
        ll zero = 0;
        for (int i = 0; i < n; ++i) {
            in >> a[i];
            if (a[i] == 0)
                zero++;
        }
        if (zero)
            out << 0;
        else {
            ll p = 1;
            for (int i = 0; i < n; ++i) {
                if (a[i] <= 1e18 / p)
                    p *= a[i];
                else {
                    out << "-1";
                    return;
                }
            }
            out << p;
        }
    }
};


int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    BMultiplication2 solver;
    std::istream &in(std::cin);
    std::ostream &out(std::cout);
    solver.solve(in, out);

    return 0;
}


### FIXED CODE ###

def func():
    N = int(input())
    A = list(map(int, input().split()))
    if 0 in A:
        print(0)
        return
    prod = 1
    for item in A:
        prod *= item
        if prod > 1e18:
            print(-1)
            return
    print(prod)

func()
import sys
import math
import heapq
from collections import defaultdict, deque
input = sys.stdin.readline
def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

n,m,k=rm()
a=rl()
b=rl()
i=0;j=0;la=len(a);lb=len(b);cnt=0
while (i<la or j<lb) and k>0:
    if i==la:
        if b[j]<=k:
            cnt+=1
            k-=b[j]
            j+=1
        else:
            break
    elif i==lb:
        if a[i]<=k:
            cnt+=1
            k-=a[i]
            i+=1
        else:
            break
    elif a[i]<=b[j]:
        if a[i]<=k:
            k-=a[i]
            cnt+=1
            i+=1
        else:
            break
    else:
        if b[j]<=k:
            k-=b[j]
            cnt+=1
            j+=1
        else:
            break
print(cnt)

### FIXED CODE ###

import sys
import math
import heapq
from collections import defaultdict, deque
sys.setrecursionlimit(10**6)
input = sys.stdin.readline
def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

'''C Tsundoku'''
n,m,k=rm()
a=rl()
b=rl()
c=[0]*(n+1)
d=[0]*(m+1)
for i in range(n):
    c[i+1]=c[i]+a[i]
for i in range(m):
    d[i+1]=d[i]+b[i]
ans=0;j=m
for i in range(n+1):
    if c[i]>k:
        break
    while c[i]+d[j]>k:
        j-=1
    ans=max(ans,i+j)
print(ans)
s = input()

k = int(input())

ichi = -1
for i in s:
    if int(i) == 1:
        ichi = ichi +1
    else:
        break



if ichi >= k:
    print(1)
else:
    print(s[ichi+1])

        


### FIXED CODE ###

s = input()

k = int(input())

ichi = 0
for i in s:
    if int(i) == 1:
        ichi = ichi +1
    else:
        break


if ichi >= k:
    print(1)
else:
    print(s[ichi])
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
    
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

def main():
    a,b,c,d = LI()
    c_d_gcd = lcm(c,d)
    s = b//c + b//d - b//c_d_gcd
    t = (a-1) // c + (a-1) // d - (a-1) // c_d_gcd
    print(b - a + 1 - (s-t))
main()



### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque


from fractions import gcd

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
    
def lcm(x, y):
    return (x * y) // gcd(x, y)

def main():
    a,b,c,d = LI()
    c_d_gcd = lcm(c,d)
    s = b//c + b//d - b//c_d_gcd
    t = (a-1) // c + (a-1) // d - (a-1) // c_d_gcd
    print(b - a + 1 - (s-t))
main()
a = int(input()) #ch
b = int(input())  #ch
h = int(input())  #hour
m = int(input())  #minits
import math


angle = abs((30 * h + m * 0.5) - m*6)

if angle > 180:
    angle = 360 - angle

cos = math.cos(math.radians(angle))
ans = (a * a) + (b * b) - (2 * a * b * cos)
print(math.sqrt(ans))


### FIXED CODE ###

import math

a, b, h, m = map(int, input().split())
h=h*60+m

ang=abs(h*0.5-m*6)
if ang > 180:
  ang = 360-ang
if ang==180:
  print(a+b)
elif(ang==0):
  print(abs(b-a))
else:
  ans=(a**2)+(b**2)-(2*a*b*math.cos(math.radians(ang)))
  print(math.sqrt(ans))
n,m=map(int,input().split())
st=[]
ch=[]
def mht(a,b):
  return abs(a[0]-b[0])+abs(a[1]-b[1])
for i in range(n):
  st.append(list(map(int,input().split())))
for i in range(m):
  ch.append(list(map(int,input().split())))
  
for i in st:
  mn=100000000
  for (j,k) in zip(ch,range(m)):
    mh=mht(i,j)
    if mh<mn:
      mn=mh
      nm=k+1
  print(nm)

### FIXED CODE ###

n,m=map(int,input().split())
st=[]
ch=[]
def mht(ax,ay,bx,by):
  return abs(ax-bx)+abs(ay-by)

for i in range(n):
  st.append(list(map(int,input().split())))
for i in range(m):
  ch.append(list(map(int,input().split())))
  
for i in st:
  ax=i[0]
  ay=i[1]
  mn=1000000000
  for (j,k) in zip(ch,range(len(ch))):
    bx=j[0]
    by=j[1]
    mh=mht(ax,ay,bx,by)
    if mh<mn:
      mn=mh
      nm=k
  print(nm+1)
import fraction as math

from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

input()

li = [int(i) for i in input().split(" ")]

print(gcd(*li))

### FIXED CODE ###

from functools import reduce

def mgcd(a, b):
    while b:
        a, b = b, a % b
    return a

def gcd(*numbers):
    return reduce(mgcd, numbers)

input()

li = [int(i) for i in input().split(" ")]

print(gcd(*li))
int A = input(stdin)
int B = input(stdin)
 
if(A > 2 * B):
  print(A - 2 * B)
else:
  print("0")

### FIXED CODE ###

A, B = map(int,input().split())
 
if(A > 2 * B):
  print(A - 2 * B)
else:
  print("0")
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
#from fractions import gcd
#from itertools import combinations,permutations # (string,3) 3回
#from collections import deque
#from collections import deque,defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
N = I()
A = readInts()
import collections
dic = collections.Counter(A)
A = set(A)
is_prime = [True] * (2*10**5+1)
for a in A:
    if is_prime[a]:
        for v in range(a*2,2*10**5+1,a):
            is_prime[v] = False
cnt = 0
for a in A:
    if is_prime[a]:
        cnt += 1
for k,v in dic.items():
    if v >= 2 and is_prime[k]:
        cnt -= 1
print(cnt)


### FIXED CODE ###

#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
#from fractions import gcd
#from itertools import combinations # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
A = sorted(readInts())
dic = defaultdict(int)
cnt = 0
for i in A:
   dic[i] += 1
A = list(set(A))
# ------------
is_prime = [True] * (10**6+1)
#print('a')
for i in range(len(A)):
    #ll += 1
    #print(i)
    #print(A[i])
    if is_prime[A[i]] == True:
        for j in range(2*A[i], 10**6+1,A[i]):
            is_prime[j] = False # その素数の倍数のやつ

 # -----------
cnt = 0
if A[0] == 1:
    if dic[1] >= 2:
        print(0)
        exit()
    else:
        print(1)
        exit()
for a in A:
    if is_prime[a] and not dic[a] >= 2:
        #print(a)
        cnt += 1
print(cnt)
A = [input() for _ in range(N)]
B = [input() for _ in range(N)]

REA = (A[0] + A[1] + A[2])
REB = (A[2] + A[1] +A[0])

if REA == REB:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

A = input()
B = input()

REA = (A[0] + A[1] + A[2])
REB = (B[2] + B[1] +B[0])

if REA == REB:
    print("YES")
else:
    print("NO")
a=input()

print(int(a+a**2+a**3))

### FIXED CODE ###

a=int(input())
 
b=a+(a**2)+(a**3)
print(b)
nums = input().split()
x = nums[0] * nums[1]
y = nums[0] * 2 + nums[1] * 2
print(str(x) + " " + str(y))


### FIXED CODE ###

nums = [int(e) for e in input().split()]
x = nums[0]*nums[1]
y = nums[0]*2 + nums[1]*2
print(str(x) + " " + str(y))
import copy
n = int(input())
red = []
blue = []
for _ in range(n):
    a, b = map(int, input().split())
    red.append([a, b])
for _ in range(n):
    c, d = map(int, input().split())
    blue.append([c, d])

red_list = copy.copy(red)
blue_list = copy.copy(blue)
    
red_list.sort()
blue_list.sort()
count = 0
for i in range(n):
    a, b = red_list.pop(0)
    for j in range(len(blue_list)):
        if (a < blue_list[j][0]) & (b < blue_list[j][1]):
            count += 1
            blue_list.pop(j)
            break

red_list = copy.copy(red)
blue_list = copy.copy(blue)
    
red_list.sort(key=lambda x: x[1])
blue_list.sort(key=lambda x: x[1])
count1 = 0
for i in range(n):
    a, b = red_list.pop(0)
    for j in range(len(blue_list)):
        if (a < blue_list[j][0]) & (b < blue_list[j][1]):
            count1 += 1
            blue_list.pop(j)
            break            

ans = max(count, count1)        
print(ans)

### 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()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
ans = sum(b)
for i in range(n-1):
    if a[i+1] - a[i] == 1:
        add = a[i-1]
        ans += c[add]
    else:
        pass
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
ans = sum(b)
for i in range(n-1):
    if a[i+1] - a[i] == 1:
        add = a[i]
        ans += c[add-1]
    else:
        pass
print(ans)
s = str(input())
if s[2]==s[3] and s[4]==s[5]:
    print(Yes)
else:
    print(No)

### FIXED CODE ###

s = str(input())
if s[2]==s[3] and s[4]==s[5]:
    print("Yes")
else:
    print("No")
A,B = map(int,input().split())

if(500*K>=X):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

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

if(500*K>=X):
  print("Yes")
else:
  print("No")
while True:
    x = str(input())
    if x==0:break
    sum=0
    for i in x:
        sum=sum+int(i)
    print(sum)

### FIXED CODE ###

while True:
    x = str(input())
    if x=='0':break
    sum=0
    for i in x:
        sum=sum+int(i)
    print(sum)
N, K = map(int, input())

print(N + 1 - K)

### FIXED CODE ###

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

print(N + 1 - K)
n=raw_input()
A=map(int,raw_input.split())
q=raw_input()
m=map(int,raw_input.split())

def solve(i, m)
  if m == 0:
    return true
  if i >= n or sum(A)<m:
    return false
  res = solve(i + 1, m) || solve(i + 1, m - A[i])
  return res

for i range(0,q):
  if solve(0,m[i])==1:
    print yes
  else:
    print no

### FIXED CODE ###

n=int(raw_input())
A=map(int, raw_input().split())
q=int(raw_input())
m=map(int, raw_input().split())

def solve(j, m):
  if m == 0:
    return 1
  if j >= n or m > sum(A):
    return 0
  res = solve(j + 1, m) or solve(j + 1, m - A[j])
  return res

for i in range(0,q):
  if solve(0,m[i]):
    print "yes"
  else:
    print "no"
N,M=map(int,input().split())

G=[[] for _ in range(N+1)]  #G[0]はダミー
for edge in range(M):
    x,y=map(int,input().split())
    G[x].append(y)

DP=[-1]*(N+1)   #DP[0]はダミー

def rec(now):
    global G
    global DP

    if DP[now]!=-1:
        return DP[now]

    else:
        res=0
        for next in G[now]:
            res=max(res,rec(next)+1)
        DP[now]=res
        return DP[now]  #resは不可

ans=0
for v in range(1,N+1):
    ans=max(ans,rec(v))

print(ans)



### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

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

G=[[] for _ in range(N+1)]  #G[0]はダミー
for edge in range(M):
    x,y=map(int,input().split())
    G[x].append(y)

DP=[-1]*(N+1)   #DP[0]はダミー

def rec(now):
    global G
    global DP

    if DP[now]!=-1:
        return DP[now]

    else:
        res=0
        for next in G[now]:
            res=max(res,rec(next)+1)
        DP[now]=res
        return DP[now]  #resは不可


ans=0
for v in range(1,N+1):
    ans=max(ans,rec(v))



print(ans)
a, o, b = map(int, input().split())

if o == "+":
	print(a + b)
else:
	print(a - b)

### FIXED CODE ###

a, o, b = map(str, input().split())

if o == "+":
	print(int(a) + int(b))
else:
	print(int(a) - int(b))
N, K = map(int, input().split())
H = list(map(int, input()split())
num = 0
for i in H:
    if i >= K:
        num += 1

print(num)

### FIXED CODE ###

N, K = map(int, input().split())
H = list(map(int, input().split()))
num = 0
for i in H:
    if i >= K:
        num += 1

print(num)