Harryxun/stf_run huggingface dataset:
n,m=map(int,input().split())
l=[]
for i in range(m):
  l.append(int(input()))
l1=[0 for i in range(n)]
if 1 in l:
  l1[0]=0
if 2 in l:
  l1[1]=0
elif 1 in l:
  l1[1]=1
else:
  l1[1]=2
if n==1:
  print(1)
elif n==2:
  if 1 in l:
    print(1)
  else:
    print(2)
else:
  for i in range(3,n+1): 
    if i in l:
      pass
    else:
      l1[i-1]=(l1[i-2]+l1[i-3])%((10**9+7))
  print(l1[n-1])

### FIXED CODE ###

n,m=map(int,input().split())
l=[]
def nibutan(x,l):
    low=0
    high=len(l)-1
    while low<=high:
      mid=(low+high)//2
      guess=l[mid]
      if guess==x:
         return True
      elif guess>x:
          high=mid-1
      elif guess<x:
          low=mid+1
    return False
if m==0:
  pass
else:
  for i in range(m):
    l.append(int(input()))
l1=[0 for i in range(n+1)]
if 1 in l:
  l1[0]=0
else:
  l1[0]=1

if 2 in l:
  l1[1]=0
elif 1 in l:
  l1[1]=1
else:
  l1[1]=2

if n>=3:
  for i in range(3,n+1): 
    if nibutan(i,l):
      pass
    else:
      l1[i-1]=(l1[i-2]+l1[i-3])%(((10**9)+7))
print(l1[n-1])
import sys
import math
num = []
cyou, hisi = 0, 0
for i in sys.stdin:
	num = map(int, i.split(","))
	kaku = math.acos(num[0]/num[1])*(180/math.pi)
	if kaku == 90:
		cyou += 1
	elif num[0] == num[1]:
		hisi += 1

print cyou
print hisi

### FIXED CODE ###

import sys
cyou, hisi = 0, 0
for i in sys.stdin:
	x,y,z = map(int, i.split(","))
	if x**2+y**2 == z**2:
		cyou += 1
	elif x == y:
		hisi += 1
print cyou
print hisi
import sys
from math import log2

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

AB = []
for _ in range(N):
    AB.append([int(s) for s in input().split()])

ans = sum([b for a, b in AB if K | a == K])
for i in range(int(log2(K) // 1), 0, -1):
    if not K & (1 << i):
        continue
    km = K & ~(1 << i) | (1 << i) - 1
    anscand = sum([b for a, b in AB if km | a == km])
    ans = max(ans, anscand)
print(ans)


### FIXED CODE ###

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

AB = []
for _ in range(N):
    AB.append([int(s) for s in input().split()])

ans = 0
kbin = bin(K)[2:]
for a, b in AB:
    if K | a == K:
        ans += b
for i in range(1, len(kbin)):
    if kbin[i - 1] == "0":
        continue
    kl = list(kbin)
    kl[i - 1] = "0"
    for j in range(i, len(kbin)):
        kl[j] = "1"
    km = int("".join(kl), 2)
    anscand = 0
    for a, b in AB:
        if km | a == km:
            anscand += b
    if ans < anscand:
        ans = anscand
print(ans)
print(count("1"))

### FIXED CODE ###

s=input()

print(s.count("1"))
n = int(input())
x = str(input())
X = 0
one = 0
for i in range(n):
    X+=int(x[i])*2**(n-i-1)
    if x[i]=="1":
        one+=1


if one>0:
    l = [0, 1]
    for i in range(2,n):
        if i%2==0:
            l.append(1)
        else:
            l.append(l[i%bin(i).count("1")]+1)

    for i in range(n):
        if x[i]=="0":
            print(l[(X+2**(n-i-1))%(one+1)]+1)
        else:
            print(l[(X-2**(n-i-1))%(one-1)]+1)
else:
    for i in range(n):
        if i==n-1:
            print(2)
        else:
            print(1)

### FIXED CODE ###

n = int(input())
x = str(input())

one = x.count("1")
X = int(x, 2)

if one==1:
    for i in range(n):
        if x[i]=="1":
            print(0)
        elif i==n-1:
            print(2)
        else:
            print(1)
    
    
elif one>1:
    
    Xp = X % (one+1)
    Xm = X % (one-1)

    def f(x):
        if x==0:
            return 0
        return 1+f(x%bin(x).count("1"))

    for i in range(n):
        
        if x[i]=="0":
            c = pow(2, n-i-1, one+1)
            print(f((Xp+c)%(one+1))+1)
        else:
            c = pow(2, n-i-1, one-1)
            print(f((Xm-c)%(one-1))+1)
else:
    for i in range(n):
        print(1)
n=int(input())
a=list(map(int,input().split()))
q=int(input())
d=[0]*1000
for i in a:
    d[i-1]+=1
s=0
for num,i in enumerate(d):
    s+=i*(num+1)

bb=[]
cc=[]
for i in range(q):
    b,c=map(int,input().split())
    bb.append(b)
    cc.append(c)

for b,c in zip(bb,cc):
    k=d[b-1]
    s+=(c-b)*k
    d[b-1]=0
    d[c-1]+=k

    print(s)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
q=int(input())
d=[0]*100001
for i in a:
    d[i-1]+=1
s=0
for num,i in enumerate(d):
    s+=i*(num+1)

bb=[]
cc=[]
for i in range(q):
    b,c=map(int,input().split())
    bb.append(b)
    cc.append(c)

for b,c in zip(bb,cc):
    k=d[b-1]
    s+=(c-b)*k
    d[b-1]=0
    d[c-1]+=k

    print(s)
import bisect
import copy
H, W, K = map(int, input().split())
c = [list(input()) for _ in range(H)]
moveRow = [0, 1, -1, 0]
moveCol = [1, 0, 0, -1]
ilst = []
index = 1
for i in range(H):
    for j in range(W):
        if c[i][j] == '#':
            c[i][j] = index
            index += 1
            ilst.append([i, j])

nlst = []
for i in range(K - 1):
    if ilst[i][0] == ilst[i + 1][0]:
        cindex = 0
        if c[ilst[i][0]][0] != '.':
            cindex = ilst[i][1]

        for j in range(cindex, ilst[i + 1][1]):
            c[ilst[i][0]][j] = i + 1
        for j in range(ilst[i + 1][1], W):
            c[ilst[i + 1][0]][j] = i + 2
    else:
        if c[ilst[i][0]][0] == '.':
            for j in range(W):
                c[ilst[i][0]][j] = i + 1
    if c[ilst[i][0]] != '.':
        if nlst == []:
            nlst.append(ilst[i][0])
        elif nlst[-1] != ilst[i][0]:
            nlst.append(ilst[i][0])
copyi = 0
for i in range(H):
    if c[i][0] == '.':
        copyi = bisect.bisect_left(nlst, i)
        if copyi <= len(nlst) - 1:
            c[i] = copy.copy(c[nlst[copyi]])
        else:
            c[i] = copy.copy(c[nlst[copyi - 1]])

for i in range(H):
    for j in range(W):
        if j != W - 1:
            print(c[i][j], end=' ')
        else:
            print(c[i][j])

### FIXED CODE ###

H, W, K = map(int, input().split())
c = [list(input()) for _ in range(H)]

index = 0
for i in range(H):
    cnt = 0
    for j in range(W):
        if c[i][j] == '#':
            index += 1
            cnt = index
            c[i][j] = cnt
        if c[i][j] == '.' and cnt != 0:
            c[i][j] = cnt

for i in range(H):
    for j in reversed(range(W - 1)):
        if c[i][j] == '.':
            c[i][j] = c[i][j + 1]

for i in range(H - 1):
    for j in range(W):
        if c[i][j] != '.' and c[i + 1][j] == '.':
            c[i + 1][j] = c[i][j]

for i in reversed(range(1, H)):
    for j in range(W):
        if c[i][j] != '.' and c[i - 1][j] == '.':
            c[i - 1][j] = c[i][j]


for i in range(H):
    for j in range(W):
        if j != W - 1:
            print(c[i][j], end=' ')
        else:
            print(c[i][j])
a, b, c = map(int, input().sprit())
num = 100 *a + 10*b + c

if num%4==0:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

a, b, c = map(int, input().split())
num = 100 *a + 10*b + c
 
if num%4==0:
    print("YES")
else:
    print("NO")
n = int(input())
a = [int(i) for i in input().split()]

    
b = a[:4]
e = [True]*4

for i in range(1, n // 2):
    c = [0] * 4
    f = [False]*4
    d = -10**24
    for j in range(4):
        if 2 * i + j >= n:
            continue
        if not e[j]:
            continue
        d = max(d, b[j])
        c[j] = d + a[2 * i + j]
        f[j] = True
    e = f.copy()
    b = c.copy()
ans = -10 ** 24
for i in range(4):
    if e[i]:
        ans = max(ans, b[i])
print(e)
print(ans)

### FIXED CODE ###

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

if n // 2 == 1:
    print(max(a))
    exit()
if n < 20:
    d = a.copy()
    
    for i in range(1, n // 2):
        b = [0] * n
        c = -10 ** 24
        ans = -10 ** 24
        for j in range(i * 2, n):
            c = max(c, a[j - 2])
            b[j] = c + d[j]
            ans = max(ans, c + d[j])

        a = b.copy()
    print(ans)
    exit()

b = a[:10]
e = [True]*10

for i in range(1, n // 2):
    c = [0] * 10
    f = [False]*10
    d = -10**24
    for j in range(10):
        if 2 * i + j >= n:
            continue
        if not e[j]:
            continue
        d = max(d, b[j])
        c[j] = d + a[2 * i + j]
        f[j] = True
    e = f.copy()
    b = c.copy()
ans = -10 ** 24
for i in range(10):
    if e[i]:
        ans = max(ans, b[i])
print(ans)
from sys import stdin, stdout
from math import sqrt
from collections import defaultdict
#t = int(stdin.readline().strip())
#R, L, C, Vin = [float(x) for x in stdin.readline().strip().split()]
A = int(stdin.readline().strip())
B = int(stdin.readline().strip())
print("Yay!" if (A <= 8 and B <= 8) else ":(")


### FIXED CODE ###

from sys import stdin, stdout
from math import sqrt
from collections import defaultdict
#t = int(stdin.readline().strip())
#R, L, C, Vin = [float(x) for x in stdin.readline().strip().split()]
A, B = [int(x) for x in stdin.readline().strip().split()]
print("Yay!" if (A <= 8 and B <= 8) else ":(")
n= int(input())
a=list(map(int, input().split()))
ans=0
a.sort(reverse=True)
for b in a:
    if b:
        bi=format(b, 'b')
        x=2**len(bi)-b
        if x==b and a.count(x)>1:
            ans+=1
            b=None
            a[a.index(x)]=None
        elif 1>0 and x!=b:
            ans+=1
            a[a.index(x)]=None
            b=None
print(ans)

### FIXED CODE ###

import collections
import bisect
n= int(input())
a=list(map(int, input().split()))
c=collections.Counter(a)
ans=0
des=sorted(a,reverse=True)
# asc=sorted(a)

for i in des:
    if c[i]>0:
        bi=format(i, 'b')
        x=2**len(bi)-i
        c[i]-=1
        if c[x]>0:
            c[x]-=1
            ans+=1
print(ans)
def s(a,b):return[s(a//b,b)+a%b,a][a<b]
n=int(input());print(min(s(i,6)+s(n-i,9)for i in range(n+1)))

### FIXED CODE ###

def s(n,c):
  if n<6:return c+n
  a=b=1
  while a*6<=n:a*=6
  while b*9<=n:b*=9
  return min(s(n-a,c+1),s(n-b,c+1))
print(s(int(input()),0))
n,k=map(int,input().split())

from scipy.special import comb
for i in range(1,k+1):
    a = comb(k-1, i-1, exact=True)
    b = comb(n-k+1, i, exact=True)
    print((a*b)%(10**9+7))


### FIXED CODE ###

import math

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

def comb(n, r):
    if n-r>=0:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
    else: 
        return 0

for i in range(1,k+1):
    a = comb(k-1, i-1)
    b = comb(n-k+1, i)
    print((a*b)%(10**9+7))
N=int(input())
H=list(map(int,input()))
p,a=True,0
for h in H:
  if h>a:
    a=h-1
  elif a>h:
    p=False
    break
print("Yes" if p else "No")

### FIXED CODE ###

n=int(input())
hl=list(map(int, input().split()))
m=0
for h in hl:
    if m <= h: m = h
    elif m == h+1: continue
    else: print("No"); break
else:
    print("Yes")
n, k = map(int, input().split())
a = list(map(int, input().split()))
l = 1
m = []

for i in range(10000):
    if a[l - 1] in m: #ループが始まったかどうか
        for j in range(len(m)):
            if m[j] == a[l - 1]:
                cnt = j #ループ開始までの端数
                loop = len(m) - cnt #ループの長さ
                break
    else:
        m.append(a[l - 1])
        l = a[l - 1]
        continue
    break

l = 0 #ループの始まり

l = m[(k - cnt)%(loop)]

print(l)

### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    l = [-1]*n
    now = 0
    order = 0
    l[0] = 0
    s = {}
    ans = -100

    for i in range(n):
        a[i] -= 1

    while k > 0:
        k -= 1
        now = a[now]
        order += 1
        if l[now] != -1: #既に訪問済の場合
            loop = order - l[now]
            k %= loop
        if k == 0:
            ans = now + 1
            break
        l[now] = order #転送順で何番目の町かを記録

    print(max(ans, -1))

main()
a = int(input())
b = int(input())
if(a*b%2==0):
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

a,b=map(int,input().split())
if(a*b%2==0):
    print("Even")
else:
    print("Odd")
def answer(in0, in1, in2, in3):
    x1 = int(in0)
    y1 = int(in1)
    x2 = int(in2)
    y2 = int(in3)

    width = (x2 - x1)
    height = (y2 - y1)

    x3 = x2 - height
    y3 = y2 + width
    x4 = x1 - height
    y4 = y1 + width

    print(x3, y3, x4, y4)

answer(input(), input(), input(), input())


### FIXED CODE ###

def answer(in0):
    nums = [int(n) for n in in0.split(" ")]
    x1 = int(nums[0])
    y1 = int(nums[1])
    x2 = int(nums[2])
    y2 = int(nums[3])

    width = (x2 - x1)
    height = (y2 - y1)

    x3 = x2 - height
    y3 = y2 + width
    x4 = x1 - height
    y4 = y1 + width

    print(x3, y3, x4, y4)

answer(input())
a, b, c = map(int, input().split())
print(max(a, b, c)*9 + sum(a, b, c))

### FIXED CODE ###

a, b, c = map(int, input().split())
print(max(a, b, c)*9 + sum([a, b, c]))
import math

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

gcd_l, gcd_r = [0], [0]

for l, r in [(A[i], A[N-i-1]) for i in range(N)]:
    gcd_l.append(math.gcd(gcd_l[-1], l))
    gcd_r.append(math.gcd(gcd_r[-1], r))
gcd_r.reverse()

gcd_nums = [gcd_l[-1]] + [math.gcd(gcd_l[i], gcd_r[i+1]) for i in range(N)]
print(max(gcd_nums))


### FIXED CODE ###

#import math
import fractions as math

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

gcd_l, gcd_r = [0], [0]

for l, r in [(A[i], A[N-i-1]) for i in range(N)]:
    gcd_l.append(math.gcd(gcd_l[-1], l))
    gcd_r.append(math.gcd(gcd_r[-1], r))
gcd_r.reverse()

gcd_nums = [gcd_l[-1]] + [math.gcd(gcd_l[i], gcd_r[i+1]) for i in range(N)]
print(max(gcd_nums))
import itertools
N,M = map(int,input().split())
src = [tuple(map(float,input().split())) for i in range(N)]
if M <= 1:
    print(0)
    exit()
dists = [[None for j in range(N)] for i in range(N)]
for i in range(N-1):
    for j in range(i+1,N):
        l1,a1,b1 = src[i]
        l2,a2,b2 = src[j]
        dist = 0
        dist += (l1-l2)**2 + (a1-a2)**2 + (b1-b2)**2
        dists[i][j] = dists[j][i] = dist

ans = 0
for ptn in itertools.permutations(range(N),M):
    total = 0
    for i in range(M-1):
        for j in range(i+1,M):
            total += dists[ptn[i]][ptn[j]]
    ans = max(ans, total)
print(ans)

### FIXED CODE ###

import itertools
N,M = map(int,input().split())
src = [tuple(map(float,input().split())) for i in range(N)]
if M <= 1:
    print(0)
    exit()
dists = [[None for j in range(N)] for i in range(N)]
for i in range(N-1):
    for j in range(i+1,N):
        l1,a1,b1 = src[i]
        l2,a2,b2 = src[j]
        dist = 0
        dist += (l1-l2)**2 + (a1-a2)**2 + (b1-b2)**2
        dists[i][j] = dists[j][i] = dist

ans = 0
for ptn in list(itertools.combinations(range(N),M)):
    total = 0
    for i in range(M-1):
        for j in range(i+1,M):
            total += dists[ptn[i]][ptn[j]]
    ans = max(ans, total)
print(ans)
import copy
a=int(input())
b=(list(map(int, input().split())))
bb = copy.copy(b)
c=0
d=[]
n=0
f=b[0]
d.append(f)
b.pop(0)
print(1^2)
print(2^3)
print(3^1)

def kakunin(bb,d):
  while c==0:
    cc=0
    for i in range(len(bb)):
      print(d)
      if d[len(d)-2]==d[len(d)-1]^bb[i]:
        g=bb[i]
        d.append(g)
        bb.pop(i)
        cc=1
        if len(d)==a and d[0]==d[len(d)-2]^d[len(d)-1]:
          global ccc
          ccc=1
          return
        break
    if cc==0:
      ccc=0
      return
      
while c==0:
  n+=1    
  bb = copy.copy(b)
  f=b[0]
  d.append(f)
  b.pop(0)
  bb.pop(0)
  kakunin(bb,d)
  b.append(f)
  if ccc==1:
    print("Yes")
    break
  else:
    d=[f]
  if n>=a:
    print("No")
    break

### FIXED CODE ###

a=int(input())
b=list(map(int, input().split()))
c=list(set(b))
t=0
d=[0 for i in range(len(c))]
if a==1:
  print("Yes")
else:
  if len(c)==1:
    if c[0]==0:
      print("Yes")
    else:
      print("No")
  elif len(c)==2:
    for i in range(len(c)):
      e=c[i]
      d[i]=b.count(e)
    if (c[0]==0 and d[0]*2==d[1])or (c[1]==0 and d[1]*2==d[0]):
      print("Yes")
    else:
      print("No")
  elif len(c)>3:
    print("No")
  else:  
    for i in range(len(c)):
      e=c[i]
      d[i]=b.count(e)
    if d[0]==d[1]and d[0]==d[2] and c[0]==c[1]^c[2]:
      print("Yes")
    else:
      print("No")
from collections import defaultdict, deque

n = int(input())
ab = [list(map(int, input().split())) for _ in range(n - 1)]

adj = defaultdict(list)
for i, (a, b) in enumerate(ab):
	a -= 1
	b -= 1
	adj[a].append((b, i))
	adj[b].append((a, i))

k = max([len(li) for li in adj.values()])
print(k)

ans = [-1] * (n - 1)

def dfs(u, p_col):
	col = 1
	for v, i in adj[u]:
		if ans[i] != -1:
			continue
		if col == p_col:
			col += 1
		ans[i] = col
		dfs(v, col)
		col += 1


dfs(0, -1)

print(*ans, sep="\n")


### FIXED CODE ###

from collections import defaultdict
import sys
sys.setrecursionlimit(10 ** 6)

n = int(input())
ab = [list(map(int, input().split())) for _ in range(n - 1)]

adj = defaultdict(list)
for i, (a, b) in enumerate(ab):
	a -= 1
	b -= 1
	adj[a].append((b, i))
	adj[b].append((a, i))

k = max([len(li) for li in adj.values()])
print(k)

ans = [-1] * (n - 1)

def dfs(u, p_col):
	col = 1
	for v, i in adj[u]:
		if ans[i] != -1:
			continue
		if col == p_col:
			col += 1
		ans[i] = col
		dfs(v, col)
		col += 1


dfs(0, -1)

print(*ans, sep="\n")
C - Splitting Pile
N = int(input())
a = list(map(int, input().split()))
sum_s = a[0]
tmp = sum(a)//2
for i in range(1,N):
    if sum_s < tmp:
        sum_s += a[i]
    else:
        break
sum_a = sum(a) - sum_s
ans = abs(sum_s - sum_a)
print(ans)

### FIXED CODE ###

# C - Splitting Pile
N = int(input())
a = list(map(int, input().split()))
sum_s = a[0]
tmp = sum(a)
sum_a = tmp - sum_s
ans = abs(sum_s - sum_a)

for i in range(1,N):
    sum_a = tmp - sum_s
    if ans > abs(sum_s - sum_a):
        ans = abs(sum_s - sum_a)
        sum_s += a[i]
    else:
        sum_s += a[i]
print(ans)
# Pythonで楽々いけちゃったりしないかな？
cost = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
def solve(yoshida, possible, dp):
    if(yoshida == 0):
        dp[0] = 0
        return 0
    if(dp[yoshida] != -1):
        return dp[yoshida]
    for x in possible:
        if(yoshida >= cost[x]):
            if(solve(yoshida - cost[x], possible, dp) != -2):
                a = dp[yoshida - cost[x]] * 10 + x
                dp[yoshida] = max(dp[yoshida], a)
    if(dp[yoshida] == -1):
        dp[yoshida] = -2
    return dp[yoshida]

if __name__ == '__main__':
    n, m = map(int, input().split())
    lst = list(map(int, input().split()))
    DP = [-1] * (n + 1)
    print(solve(n, lst, DP))
    '''
    for i in range(n + 1):
        print("{} : {}".format(i, solve(i, lst, DP)))
    '''

### FIXED CODE ###

cost = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]

''' 再帰が深すぎて, 再起不能
def solve(yoshida, possible, dp):
    if(yoshida == 0):
        dp[0] = 0
    elif(dp[yoshida] == -1):
        for x in possible:
            if(yoshida >= cost[x]):
                idx = yoshida - cost[x]
                solve(idx, possible, dp)
                a = (dp[idx]) * 10 + x
                dp[yoshida] = max(dp[yoshida], a)
'''

def solve(yoshida, possible, dp):
    dp[0] = 0
    for i in range(n):
        a = 10 * dp[i]
        for x in possible:
            dp[i + cost[x]] = max(dp[i + cost[x]], a + x)
if __name__ == '__main__':
    n, m = map(int, input().split())
    lst = list(map(int, input().split(" ")))
    DP = [-1] * (n + 10)
    solve(n, lst, DP)
    '''
    for i in range(n + 1):
        print("{} : {}".format(i, DP[i]))
    '''
    print(DP[n])
import sys

N = int(input())
S = input()

score1 = 0
score2 = 0
length = 1
check = S[0]
A = []
B = []
flag = 0

for i in range(N-1):
    if S[i] == S[i+1]:
        length += 1
    else:
        A.append(length)
        length = 1

if length != 1:
    A.append(length)

if len(A) != 0:
    if S[-1] != S[-2]:
        A.append(1)

if len(A) <= 1:
    print(0)
    sys.exit()

B = A

if S[0] == ".":
    A.pop(0)

if S[len(S)-1] == "#":
    A.pop(-1)


for i in range(len(A)):
    if i % 2 == 0:
        score1 += A[i]
    else:
        score2 += A[i]

ans = min(score1,score2)

if S[0] == "#":
    score3 = A[0] + score2 - A[1]
    ans = min(ans,score3)

if S[0] == ".":
    score4 = A[-1] + score1 - A[len(A)-2]
    ans = min(ans,score4)

print(ans)

### FIXED CODE ###

N = int(input())
S = input()

A = [0] * (N+1)
B = [0] * (N+1)

for i in range(N):
    A[i+1] = A[i]
    if S[i] == "#":
        A[i+1] += 1

for i in range(N,0,-1):
    B[i-1] = B[i]
    if S[i-1] == ".":
        B[i-1] += 1

ans = 10 ** 9
for i in range(N+1):
    ans = min(ans, A[i] + B[i])

print(ans)
count, outrate = input().split()
if count >= 10:
  result = outrate
  print(inrate)
else:
  result = outrate + 100 * (10 - count)
  print(result)

### FIXED CODE ###

count, outrate = map(int, input().split())

if count >= 10:
  result = outrate
  print(result)
else:
  result = outrate + 100 * (10 - count)
  print(result)
import heapq
n = int(input())
A = list(map(int, input().split()))
heapq.heapify(A)

cnt = 1
prev = heapq.heappop(A)
while A:
    x = heapq.heappop(A)
    if prev > x:
        heapq.heappush(A, prev)
        prev = x
        continue
    print(prev, x, A, cnt)
    if 2*prev < x:
        cnt = 1
    else:
        cnt += 1
    prev += x

print(cnt)


### FIXED CODE ###

import heapq
n = int(input())
A = list(map(int, input().split()))
heapq.heapify(A)

cnt = 1
prev = heapq.heappop(A)
while A:
    x = heapq.heappop(A)
    if prev > x:
        heapq.heappush(A, prev)
        prev = x
        continue
    if 2*prev < x:
        cnt = 1
    else:
        cnt += 1
    prev += x

print(cnt)
from collections import Counter
n=int(input())
s=[input() for _ in range(n)]
m=int(input())
t =[input() for _ in range(m)]
sc=Counter(s)
tc=Counter(t)
u=list(set(s)&set(t))
ans=0
for i in u:
    ans=max(ans,max(0,sc[i]-st[i]))
v=list(set(s)-set(u))
for i in v:
    ans=max(ans,sc[i])
print(ans)

### FIXED CODE ###

from collections import Counter
n=int(input())
s=[input() for _ in range(n)]
m=int(input())
t =[input() for _ in range(m)]
sc=Counter(s)
tc=Counter(t)
u=list(set(s)&set(t))
ans=0
for i in u:
    ans=max(ans,max(0,sc[i]-tc[i]))
v=list(set(s)-set(u))
for i in v:
    ans=max(ans,sc[i])
print(ans)
n=int(input())
d=list(int(input()) for i in range(n))
cnt=0
st=100
l=[]
for i in range(n):
    if d<st:
        cnt += 1
        st = d
    else:
        l.append(cnt)
        st = 100
        cnt = 0
l.sort()
print(l[len(l)-1])

### FIXED CODE ###

n=int(input())
k=[]
for i in range(n):
    d = int(input())
    k.append(d)
print(len(set(k)))
n=input()
print(1 - (n // 2) / 2)from collections import Counter
mod = 1000000007


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft


def update(x, y, new_value, dp):
    if 0 <= x < len(dp) and 0 <= y < len(dp):
        dp[x][y] = min(dp[x][y], new_value)

def main():
    n=int(input())
    print(1 - (n // 2) / n)

main()


### FIXED CODE ###

from collections import Counter
mod = 1000000007


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft


def update(x, y, new_value, dp):
    if 0 <= x < len(dp) and 0 <= y < len(dp):
        dp[x][y] = min(dp[x][y], new_value)

def main():
    n=int(input())
    print(1 - (n // 2) / n)

main()
import math
##(A,B,C,D)=map(int,input().split())

N=int(input())
##c=list(map(int, input().split()))


a=[]
b=[]

for i in range(N):
    a.append(input())
    b.append(input())
k=float(0)
for i in range(N-1):
    for j in range(i,N):
        k=k+float(math.sqrt(abs(a[i]-a[j])+abs(b[i]+b[j])))

k=float(k*2/N)
print(k)


### FIXED CODE ###

N=int(input())
##c=list(map(int, input().split()))

a = [list(map(int, input().split())) for _ in range(N)]

k=0
for i in range(N):
    for j in range(N):
        if(i!=j):
            k=k+((a[i][0]-a[j][0])*(a[i][0]-a[j][0])+(a[i][1]-a[j][1])*(a[i][1]-a[j][1]))**0.5

print(k/N)