Harryxun/stf_run huggingface dataset:
#! bin/env/python python3
# -*- coding:utf-8 -*-

d,n = map(int, raw_input().split())



print(d)
print(n)


if d == 0:
	print(n)
elif d == 1:
	print(n*100*d)
elif d == 2:
	print(n*10000)


### FIXED CODE ###




# import configparser
# import time


# class GetTime():
#     now = time.ctime()

    
#     def debug(self):
#         print('-------debug-begin---------------')
#         print(self.now)
#         parsed = time.strptime(self.now)
#         print(time.strftime("%a %b %d %H:%M:%S %Y", parsed))
#         print('-------debug-end---------------')


# class Person():
#     def __init__(self, name, id):
#         self.name = name
#         self.id = id


# class Greet(Person):
#     def morning(self):
#         print('Good morning ' + self.name)

#     def night(self):
#         print('Good night ' + self.name)


# hunter = Person('Hoge Fugo', 1)

# print('name:%s   id:%s' % (hunter.name, hunter.id))

# o = Greet('Bob', 4)
# o.morning()


# t = GetTime()
# t.debug()

# ##

# poem = 'Hello,friends'
# fout = open('relavity','wt')
# # print(poem, file=fout)
# fout.close()

# ##





# # config.read('exe.ini')
# # print(MySQL_setting['Port'])
# # config.read('exe.ini')
# # print(MySQL_setting['Port'])

# class init_setting():
#     def input(self):
#         print('input port number:')
#         port=input()
#         print('input user name:')
#         user=input()

#         print(port,user)

        
#         with open('example.ini','w') as conf:
#             config.write(conf)

#         config=configparser.ConfigParser()
#         config['MySQL_setting']={}
#         MySQL_setting=config['MySQL_setting']


#         MySQL_setting['Port']=port
#         MySQL_setting['user']=user

#         config.sections()


# MakeSetting=init_setting()
# MakeSetting.input()


# MySQL_setting['Port']=port
# # MySQL_setting['user']=user

# empty_list = []
# print(empty_list)

# weekdays=['monday','Tuesday','Wednesday','Thursday','Friday']

# for i in weekdays:
#     print(weekdays)

# print(weekdays[0])

# for i in weekdays:
# 	print(i)

# a_tuple=('ready','fire','class')


# list('cat')


#! bin/env/python python3
# -*- coding:utf-8 -*-

d,n = map(int, input().split())


# print(d)
# print(n)

if d == 0:
	if n ==100:
		print(101)
	else:
		print(n)
elif d == 1:
	if n ==100:
		print(10100)
	else:
		print(n*100*d)


elif d == 2:
	if(n == 100):
		print(1010000)
	else:
		print(n*10000)
n=int(input())
a=[int(i) for i in input().split()]

ans=0
def plus_minus(i):
    while True:
        if a[i]==a[i+1]:
            i+=1
            continue
        if a[i]<a[i+1]:
            return 1
        if a[i]>a[i+1]:
            return -1

check=plus_minus(0)            
ans=1
for j in range(i,n-1):
    if check==1:
        if a[j] <= a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
    else:
        if a[j]>=a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
print(ans)

### FIXED CODE ###

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

ans=0
def plus_minus(i):
    while True:
        if i==n-1:
            break
        if a[i]==a[i+1]:
            i+=1
            continue
        if a[i]<a[i+1]:
            return 1
        if a[i]>a[i+1]:
            return -1

check=plus_minus(0)            
ans=1
for j in range(n-1):
    if check==1:
        if a[j] <= a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
    else:
        if a[j]>=a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
print(ans)
N,K=input().split()
S=input()
S[K-1].swapcase()
print(S)


### FIXED CODE ###

N,K=map(int,input().split())
S=input()
S=S[:K-1]+S[K-1].swapcase()+S[K:]
print(S)
num = int(input())
mochi = [int(input()) for m in range(0, num)]
maisuu = len(set([n for n in mochi]))
print(maisuu)

### FIXED CODE ###

datestr = input()

if (datestr[0:8] == '2017/01/'):
    ans = datestr.replace("2017",'2018')
    
print(ans)
D = int(input())
T = int(input())
S = int(input())




time=D/S
if time <= T:
    print("yes")
else:
    print("no")



### FIXED CODE ###

a, b, c = map(int, input().split())
 
if b * c >= a:
    print("Yes")
else:
    print("No")
s = list(input())
count = 0
a = []
for i in range(len(s)):
    if s[i] =="A" or s[i] =="T" or s[i] =="G" or s[i] =="C":
        count += 1
    else:
        a.append(count)
        count = 0
print(max(a))

### FIXED CODE ###

s = list(input())
count = 0
a = []
for i in range(len(s)):
    if s[i] =="A" or s[i] =="T" or s[i] =="G" or s[i] =="C":
        count += 1
    else:
        a.append(count)
        count = 0
a.append(count)
print(max(a))
x = []
a = 1
while True:
	if a != 10:
		x.append(int(raw_input()))
		a += 1
		continue
	else:
		break
x.sort()
print x[9]
print x[8]
print x[7]

### FIXED CODE ###

x = []
a = 1
while True:
	if a != 11:
		x.append(int(raw_input()))
		a += 1
		continue
	else:
		break
x.sort()
print x[9]
print x[8]
print x[7]
# 入力
a = int(input())
b = int(input())

# 処理
if a * b % 2 == 0:
    answer = "Even"
else:
    answer = "Odd"

print(answer)


### FIXED CODE ###

# 086A
# 入力値の積が偶数か奇数か


# 入力
a, b = map(int, input().split())

# 処理
x = a * b % 2

if x == 0:
    print("Even")
else:
    print("Odd")
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**9)
from collections import deque
from math import ceil

def dist(h,w,x,y):
    return min(x-1,h-x,y-1,w-y)

h,w,k=map(int,input().split())
MAP=[]
A=['#']*(w+2)
MAP.append(A)
for i in range(h):
    s='#'+input().strip()+'#'
    for j,t in enumerate(s):
        if t=='S':
            sx,sy=i+1,j
    MAP.append(list(s))
MAP.append(A)
delta=[[1,0],[0,1],[-1,0],[0,-1]]
P=[]
Visited=[[False]*(w+2) for _ in range(h+2)]
Visited[sx][sy]=True
q=deque()
q.append((sx,sy,k))
while q:
    x,y,t=q.popleft()
    if t<0:
        break
    P.append([x,y])
    t-=1
    for dx,dy in delta:
        if MAP[y+dy][x+dx]=='.' and not Visited[x+dx][y+dy]:
            q.append((y+dy,x+dx,t))
            Visited[x+dx][y+dy]=True
ans=float('inf')
for x,y in P:
    ans=min(ans,1+ceil(dist(h,w,x,y)/k))
print(ans)

### FIXED CODE ###

a,b,c=map(int,input().split())
if a==b==c:
    print(-int(not a%2))
else:
    cnt=0
    while not (a%2 or b%2 or c%2):
        cnt+=1
        a,b,c=(b+c)//2,(c+a)//2,(a+b)//2
    print(cnt)
N,M = (int(i) for i in input().split())
A = [int(i) for i in input().split()]

A = sorted(A,reverse=True)
#print(A)
X = M
for i in range(M):
    A[0] //= 2
    X -= 1
    count = 0
    for j in range(M):
        if A[j] < A[j+1]:
            x = A[j]
            A[j] = A[j+1]
            A[j+1] = x
            count += 1
        else:
            break
            
    if count >= X:
        for j in range(X):
            A[j] //= 2
        break
    else:
        for j in range(count):
            A[j] //= 2
            X -= count
        A = sorted(A,reverse=True)
        
        
ans = 0
for i in A:
    ans += i

print(ans)




### FIXED CODE ###

N,M = (int(i) for i in input().split())
A = [int(i) for i in input().split()]

A = sorted(A,reverse=True)
#print(A)
X = M
for i in range(M):
    A[0] //= 2
    X -= 1
    count = 0
    for j in range(min(N-1,M)):
        if A[j] < A[j+1]:
            x = A[j]
            A[j] = A[j+1]
            A[j+1] = x
            count += 1
        else:
            break
            
    if count >= X:
        for j in range(X):
            A[j] //= 2
        break
    else:
        for j in range(count):
            A[j] //= 2
        X -= count
        A = sorted(A,reverse=True)
        
        
ans = 0
for i in A:
    ans += i

print(ans)
length = input()
list = list(map(int, input().split()))
 
for i in range(length):
  if i == (length - 1):
    print('Yes')
    break
  elif (list[i+1] - list[i]) >1 :
    list[i+1] += 1 
  elif list[i+1] >= 1 :
    continue
  elif list[i+1] < list[i]:
    print("No")
    break

### FIXED CODE ###

length = input()
a_list = list(map(int, input().split()))
 
for i in range(len(a_list)-1):
  if a_list[i] < a_list[i+1]:
    a_list[i+1] -= 1
  elif a_list[i] > a_list[i+1]:
    print("No")
    exit()
    
print('Yes')
m=0
a=0
r=0
c=0
h=0
n=int(input())
for i in range(n):
  s=input()
  if s[0]=="M":m+=1
  elif s[0]=="A":a+=1
  elif s[0]=="R":r+=1
  elif s[0]=="C":c+=1
  elif s[0]=="H":h+=1
  else:pass

li=[m,a,r,c,h]
ans=0
for ai in range(n):
  for bi in range(n):
    for ci in range(n):
      if ci>bi>ai:
        ans+=li[ai]*li[bi]*li[ci]
print(ans)

### FIXED CODE ###

m=0
a=0
r=0
c=0
h=0
n=int(input())
for i in range(n):
  s=input()
  if s[0]=="M":m+=1
  elif s[0]=="A":a+=1
  elif s[0]=="R":r+=1
  elif s[0]=="C":c+=1
  elif s[0]=="H":h+=1
  else:pass

li=[m,a,r,c,h]
ans=0
for ai in range(5):
  for bi in range(5):
    for ci in range(5):
      if ci>bi>ai:
        ans+=li[ai]*li[bi]*li[ci]
print(ans)
from math import gcd

def debug(*args):
    import sys
    #print(*args, file=sys.stderr)

def solve(A, B, C, D):
    L = C * D // gcd(C, D)
    A-=1
    debug("A=%d, B=%d, C=%d, D=%d" %(A,B,C,D))
    debug((B//C, A//C), (B//D, A//D) , (B//L , A//L))
    debug((B//C - A//C), (B//D - A//D) , (B//L - A//L))
    return B-A- ((B//C - A//C) + (B//D - A//D) - (B//L - A//L))

def main():
    A, B, C, D = [int(x) for x in input().split()]
    print(solve(A, B, C, D))
    pass

main()



### FIXED CODE ###

from fractions import gcd

def debug(*args):
    import sys
    #print(*args, file=sys.stderr)

def solve(A, B, C, D):
    L = C * D // gcd(C, D)
    A-=1
    debug("A=%d, B=%d, C=%d, D=%d" %(A,B,C,D))
    debug((B//C, A//C), (B//D, A//D) , (B//L , A//L))
    debug((B//C - A//C), (B//D - A//D) , (B//L - A//L))
    return B-A- ((B//C - A//C) + (B//D - A//D) - (B//L - A//L))

def main():
    A, B, C, D = [int(x) for x in input().split()]
    print(solve(A, B, C, D))
    pass

main()
while True:
        try:
            yield ''.join(raw_input().strip())
        except EOFError:
            break
inlist = list(get_input())
instr = "".join(inlist)
instr = instr.lower()
ascstart = 97
ascfin = 122
strlist = [0 for i in xrange(97,122+1)]
# print len(strlist)
for x in xrange(len(instr)):
    if ord(instr[x]) < ascstart or ord(instr[x]) > ascfin:
        continue
    strlist[ord(instr[x])-ascstart] +=1

for x in xrange(ascstart,ascfin+1):
    print "%s : %d" % (chr(x),strlist[x-ascstart])

### FIXED CODE ###

def get_input():
    while True:
        try:
            yield ''.join(raw_input().strip())
        except EOFError:
            break
inlist = list(get_input())
instr = "".join(inlist)
instr = instr.lower()
ascstart = 97
ascfin = 122
strlist = [0 for i in xrange(97,122+1)]
# print len(strlist)
for x in xrange(len(instr)):
    if ord(instr[x]) < ascstart or ord(instr[x]) > ascfin:
        continue
    strlist[ord(instr[x])-ascstart] +=1

for x in xrange(ascstart,ascfin+1):
    print "%s : %d" % (chr(x),strlist[x-ascstart])
N = input()
n = int(N)
if N >= 100000:
  	print(90909)
else if N >= 10000:
  	print(909 + (N - 10000))
else if N >= 1000:
  	print(909)
else if N >= 100:
  	print(9 + (N - 100))
else if N >= 10:
  	print(9)
else:
  	print(N)


### FIXED CODE ###

n = int(input())
cnt = 0
for i in range(1, n + 1):
  if len(str(i)) % 2 == 1:
    cnt +=1
print(cnt)
a,b=map(int,input().split())
if (a+b)>=10:
  print("error")
else:
  pirnt(a+b)

### FIXED CODE ###

a,b=map(int,input().split())
if (a+b)>=10:
  print("error")
else:
  print(a+b)
N,K = map(int,input())
if N % K = 0:
    print(0)
else:
    print(1)

### FIXED CODE ###

N,K = map(int,input().split())
if N % K == 0:
    print(0)
else:
    print(1)
import sys

mod = 10**9 + 7
N = int(sys.stdin.readline())

stones = []
for _ in range(N):
    stones.append(int(sys.stdin.readline()))

left = [-1] * (N+1) # 1-indexed
dp = [0] * (N+1)
dp[0] = 1
for i in range(N):
    dp[i+1] = dp[i]
    # 同じ色が前回出現した位置
    c = stones[i]
    if 0 <= left[c] < i - 1:
        dp[i+1] += dp[left[c] + 1]
    
    dp[i+1] %= mod
    left[stones[i]] = i

print(dp[N])

### FIXED CODE ###

import sys

mod = 10**9 + 7
N = int(sys.stdin.readline())

stones = []
for _ in range(N):
    stones.append(int(sys.stdin.readline()))

left = [-1 for _ in range(2*10**5+1)]
dp = [0 for _ in range(N+5)]
dp[0] = 1
for i in range(N):
    dp[i+1] = dp[i]
    # 同じ色が前回出現した位置
    c = stones[i]
    if 0 <= left[c] < i - 1:
        dp[i+1] += dp[left[c] + 1]
    
    dp[i+1] %= mod
    left[c] = i

print(dp[N])
from fractions import gcd
def lcm(list):
    if len(list) == 2:
        [a, b] = list
        return a*b//gcd(a,b)
    x = list.pop()
    y = lcm(list)
    return x*y//gcd(x,y)

N = int(input())
li = []
for i in range(N):
    li.append(int(input()))
print(lcm(li))

### FIXED CODE ###

from fractions import gcd
def lcm(list):
    if len(list) == 1:
        return list[0]
    if len(list) == 2:
        [a, b] = list
        return a*b//gcd(a,b)
    x = list.pop()
    y = lcm(list)
    return x*y//gcd(x,y)

N = int(input())
li = []
for i in range(N):
    li.append(int(input()))
print(lcm(li))
# -*- coding: utf-8 -*-
MOD = 1000000007
N, M = map(int, input().split())
a = []
for _ in range(M):
    a.append(int(input()))


def getPatternNum(num):
    pattern = [0] * (num + 1)
    for i in range(num + 1):
        if i == 0 or i == 1:
            pattern[i] = 1
            continue
        pattern[i] = (pattern[i - 2] + pattern[i - 1]) % MOD
    return pattern


def solve():
    # 階段の連続してる数のリスト
    stepsList = [0] * (M + 1)
    maxSteps = 0
    stepsList[0] = a[0]
    for j in range(1, M):
        stepsList[j] = a[j] - a[j - 1] - 1
        if stepsList[j] == 0:
            return 0
    stepsList[M] = N - a[M - 1]
    pattern = getPatternNum(max(stepsList) + 1)
    # こわれてるところ以外のパターンを掛ける
    for k in range(len(stepsList)):
        if k == 0:
            total = pattern[stepsList[k] - 1]
        else:
            total = (total * pattern[stepsList[k] - 1]) % MOD
        # print("#", k, stepsList[k], pattern[stepsList[k] - 1], total)

    return total


ans = solve()
print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
a.sort()
a.append(10 ** 9 + 7)

memo = [None] * (N + 1)
memo[0] = 1

idx = 0
for pos in range(1, N + 1):
    if a[idx] == pos:
        memo[pos] = 0
        idx += 1
        continue
    else:
        if pos > a[idx]:
            idx += 1
        #
        if pos == 1:
            memo[1] = (memo[0]) % (10 ** 9 + 7)
        else:
            memo[pos] = (memo[pos - 2] + memo[pos - 1]) % (10 ** 9 + 7)

# print("#", memo)
print(memo[-1])
import numpy as np
def cumprod(arr,MOD):
    L = len(arr); Lsq = int(L**.5+1)
    arr = np.resize(arr,Lsq**2).reshape(Lsq,Lsq)
    for n in range(1,Lsq):
        arr[:,n] *= arr[:,n-1]; arr[:,n] %= MOD
    for n in range(1,Lsq):
        arr[n] *= arr[n-1,-1]; arr[n] %= MOD
    return arr.ravel()[:L]

def make_fact(U,MOD):
    x = np.arange(U,dtype=np.int64); x[0] = 1
    fact = cumprod(x,MOD)
    x = np.arange(U,0,-1,dtype=np.int64); x[0] = pow(int(fact[-1]),MOD-2,MOD)
    fact_inv = cumprod(x,MOD)[::-1]
    return fact,fact_inv

U = 10**6
fact, invfact = make_fact(U,MOD)

MOD = 10**9 + 7
X, Y = [int(x) for x in input().split()]
if (X+Y) % 3 != 0:
    print(0)
    exit()
r = (X+Y) // 3
k = X - r
if (k < 0 or Y - r < 0):
    print(0)
else:
    print(fact[r] * invfact[r-k] % MOD * invfact[k] % MOD)


### FIXED CODE ###

N = int(input())
print(N**2)
# 時間かかりすぎ
s = list(input())
k = int(input())
t = s * k

count = 0
for i in range(1, len(t)):
    if t[i-1] == t[i]:
        count += 1
        t[i] = '-'
print(count)


### FIXED CODE ###

s = list(input())
s2 = s[:]
k = int(input())

s1_count = 0
for i in range(1, len(s)):
    if s[i-1] == s[i]:
        s1_count += 1
        s[i] = '-'

if k == 1:
    print(s1_count)
elif s[0] != s[-1]:
    print(s1_count * k)
elif len(list(set(s2))) == 1:
    if len(s) % 2 == 0:
        print(s1_count * k)
    else:
        s2_count = s1_count + 1
        if k % 2 == 0:
            print(int((s1_count + s2_count) * (k // 2)))
        else:
            print(int((s1_count + s2_count) * (k // 2) + s1_count))
else:
    s2_count = 0
    if s[-1] == '-':
        print(s1_count * k)
    else:
        s2[0] = '-'
        s2_count += 1
        for i in range(1, len(s2)):
            if s2[i-1] == s2[i]:
                s2_count += 1
                s2[i] = '-'
        print(s1_count + s2_count * (k-1))
# -*- Coding: utf-8 -*-

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

if k >= (a+b):
    print('{0} {1}'.format(0,0))
elif k < a:
    print('{0} {1}'.format(a-k, b))
elif k >= a:
    print('{0} {1}'.format(0, b-(k-a)))

exit(1)

### FIXED CODE ###

# -*- Coding: utf-8 -*-

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

if k >= (a+b):
    print('{0} {1}'.format(0,0))
elif k < a:
    print('{0} {1}'.format(a-k, b))
elif k >= a:
    print('{0} {1}'.format(0, b-(k-a)))
import numpy as np

def main():
  N = int(input())
  A = list(map(int,input().split()))
  A.sort()
  d = np.zeros(A[-1]+1, dtype=np.unit64)
  
  for i in range(N):
    a = A[i]
    a1 = A[i-1]
    if a != a1:
      if a != a1:
        d[a::a] += 1
      else:
        d[a] += 1
  print(np.count_nonzero(d[A] == 1))
  
main()


### FIXED CODE ###

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

for i in range(0,5):
  if a[i] == 0:
    n = i + 1
      
print(n)
N, K, S = map(int, input().split())

if S == 1:
    A = [2]*N
    for i in range(K):
        A[i] = 1
elif S == 10e9:
    A = [2]*N
    for i in range(K+1):
        if i % 2 == 0:
            A[i] = S - 1
        else:
            A[i] = 1
else:
    A = [10**10]*N
    for i in range(K+1):
        if i % 2 == 0:
            A[i] = S - 1
        else:
            A[i] = 1


A = [str(i) for i in A]
print(' '.join(A))


### FIXED CODE ###

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

A = []
A += [S]*K
if S == pow(10, 9):
    A += [1]*(N-K)
else:
    A += [S+1]*(N-K)


A = [str(i) for i in A]
print(' '.join(A))
n = int(input())
data = list(map(int, input().split()))

if n == 1:
    print(data[0])
elif n == 2:
    print(data[1], data[0])
else:
    firs_value = [data[0]]
    second_value = [data[1], data[0]]

    def get_value(index, data):
        if index == 0:
            return firs_value
        elif index == 1:
            return second_value
        else:
            lis = get_value(index - 2, data)
            lis.append(data[index - 1])
            lis.insert(0, data[index])
            return lis

    result = get_value(n - 1, data)
    print(" ".join(str(n) for n in result))

### FIXED CODE ###

def main():
    n = int(input())
    data = list(map(int, input().split()))

    if n == 1:
        print(data[0])
    else:
        result = [None] * n

        if n % 2 == 0:
            center = int(n / 2)
            for index, value in enumerate(data):
                if index % 2 == 0:
                    result[center + int(index / 2)] = value
                else:
                    result[center - int((index + 1) / 2)] = value
            print(" ".join(str(n) for n in result))
        else:
            center = int(n / 2)
            for index, value in enumerate(data):
                if index % 2 == 0:
                    result[center - int(index / 2)] = value
                else:
                    result[center + int((index + 1) / 2)] = value
            print(" ".join(str(n) for n in result))

if __name__ == '__main__':
    main()
N,K = map(int,input().split())
nums = list(map(int,input().split()))
nums.sort()
dif = []
cnt=[]
for i in range(N-1):
  if nums[i] != nums[i+1]:
    dif.append(i+1) #玉の番号の変わり目を記録する
for i in range(len(dif)+1):
  if i == 0:
    cnt.append(dif[0])
  if i == len(dif):
    cnt.append(N-dif[-1])
  cnt.append(dif[i]-dif[i-1])
cnt.sort(reverse=True)#それぞれの球が何個ずつあるかのリスト作成
n = 0
if len(cnt)<=K:
  print(0)
else:
  for i in range(K):
    n+=cnt[i]
  print(N-n)
  
    
  

### FIXED CODE ###

N,K = map(int,input().split())
nums = list(map(int,input().split()))
nums.sort()
dif = []
cnt=[]
for i in range(N-1):
  if nums[i] != nums[i+1]:
    dif.append(i+1) #玉の番号の変わり目を記録する
if len(dif)==0:
  print(0)
else:
  for i in range(len(dif)+1):
    if i == 0:
      cnt.append(dif[0])
    if i == len(dif):
      cnt.append(N-dif[-1])
      break
    cnt.append(dif[i]-dif[i-1])
  cnt.sort(reverse=True)#それぞれの球が何個ずつあるかのリスト作成
  n = 0
  if len(cnt)<=K:
    print(0)
  else:
    for i in range(K):
      n+=cnt[i]
    print(N-n)
N = int(input())
A = [int(i) for i in input().split()]	# 1 2 3 4 5 ...
B = [int(i) for i in input().split()]	# 1 2 3 4 5 ...
C = [int(i) for i in input().split()]	# 1 2 3 4 5 ...

A.sort()
B.sort()
C.sort()

#print(A)
#print(B)
#print(C)
##exit(0)

ab=[0]*N
bc=[0]*N

b=N-1
c=N-1
count=0
while (0<=b):
	while (0<=c):
		if B[b]<C[c]:
			count += 1
			c -= 1
		else:
			break
	bc[b] = count
	if b<N-1:
		bc[b] += bc[b+1]
	b -= 1

a=N-1
b=N-1
count=0
while (0<=a):
	while (0<=b):
		if A[a]<B[b]:
			count += 1
			b -= 1
		else:
			break
	ab[a] = count
	a -= 1


#print(ab)
#print(bc)

ans=0

for i in ab:
#	print(i, bc[N-i:N])
#	ans += sum(bc[N-i:N])
	ans += bc[N-i]

print(ans)


### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]	# 1 2 3 4 5 ...
B = [int(i) for i in input().split()]	# 1 2 3 4 5 ...
C = [int(i) for i in input().split()]	# 1 2 3 4 5 ...

A.sort()
B.sort()
C.sort()

#print(A)
#print(B)
#print(C)
##exit(0)

ab=[0]*N
bc=[0]*N

b=N-1
c=N-1
count=0
while (0<=b):
	while (0<=c):
		if B[b]<C[c]:
			count += 1
			c -= 1
		else:
			break
	bc[b] = count
	if b<N-1:
		bc[b] += bc[b+1]
	b -= 1

a=N-1
b=N-1
count=0
while (0<=a):
	while (0<=b):
		if A[a]<B[b]:
			count += 1
			b -= 1
		else:
			break
	ab[a] = count
	a -= 1


#print(ab)
#print(bc)

ans=0

for i in ab:
#	print(i, bc[N-i:N])
#	ans += sum(bc[N-i:N])
	if i>0:
		ans += bc[N-i]

print(ans)
N = int(input())
h = list(map(int,input().split()))

dp = [0] * 1010

dp[0] = 0
dp[1] = abs(h[1]-h[0])

for i in range(2,N):
    dp[i] = min(abs(h[i]-h[i-1])+dp[i-1],abs(h[i]-h[i-2])+dp[i-2]) 
    
print(dp[N-1])

### FIXED CODE ###

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

dp = [0] * 100010

dp[0] = 0
dp[1] = abs(h[1]-h[0])

for i in range(2,N):
    dp[i] = min(abs(h[i]-h[i-1])+dp[i-1],abs(h[i]-h[i-2])+dp[i-2]) 
    
print(dp[N-1])
N = int(input())

nodes = []
edges = []

for i in range(N):
    nodes.append([])


for i in range(N-1):
    a, b = [int(v) for v in input().split()]
    a -= 1
    b -= 1

    nodes[a].append((b, i))
    nodes[b].append((a, i))

max_l = 0
max_i = 0
for i, links in enumerate(nodes):
    l = len(links)
    if max_l < l:
        max_l = l
        max_i = i


def fill(nodes, links, e, pc):
    c = 1
    if c == p:
        c += 1
    for n, i in links:
        if e[i] != 0:
            continue
        e[i] = c
        fill(nodes, nodes[n], e, c)

        c += 1
        if c == pc:
            c += 1
    
e = [0] * (N - 1)
fill(nodes, nodes[max_i], e, 0)

print(max_l)
for i in e:
    print(i)

### FIXED CODE ###

N = int(input())

nodes = []
edge = []
for i in range(N):
    nodes.append([])

for i in range(N-1):
    a, b = [int(v) - 1 for v in input().split(' ')]
    if a >= len(nodes):
        exit()
    if b >= len(nodes):
        exit()
    nodes[a].append((b, i))
    nodes[b].append((a, i))
    edge.append(0)

max_l = 0
max_i = 0
if nodes is None:
    exit()

for i, links in enumerate(nodes):
    if links is None:
        exit()
    l = len(links)
    if max_l < l:
        max_l = l
        max_i = i

def fill(nodes, edge, queue):
    while len(queue) > 0:
        ni, pc = queue.pop(0)
        links = nodes[ni]

        c = 1
        if pc == c:
            c += 1

        if links is None:
            exit()

        next_links = []
        for n, i in links:
            if n < 0 or i < 0:
                exit()
            if n >= len(nodes) or i >= len(edge):
                exit()

            if edge[i] != 0:
                continue
            edge[i] = c
            queue.append((n, c))

            c += 1
            if pc == c:
                c += 1

queue = [(max_i, 0)]    
fill(nodes, edge, queue)

print(max_l)
for e in edge:
    print(e)
N, M = input().split()

N = int(N)
M = int(M)

a = input().split()

a = int(a)


if sam(a) < N:
    print(N - sam(a))

if sam(a) > N:
    print(-1)
    

### FIXED CODE ###

N, M = input().split()

N = int(N)
M = int(M)

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


if sum(a) < N:
    print(N-sum(a))

if sum(a) == N:
    print(0)

if sum(a) > N:
    print(-1)