Harryxun/stf_run huggingface dataset:
import bisect
n, k = input().split()
A = sorted(list({i for i in range(10)} - set(map(int, input().split()))))
greater = False
ans = ""
for i in n:
  if greater:
    ans += str(A[0])
  else:
    t = A[bisect.bisect_left(A, int(i))]
    if t > int(i):
      greater = True
    ans += str(t)
print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
A = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} - set(input().split())
while True:
  s = set(str(n))
  if s <= A:
    print(n)
    break
  n += 1
total = (int)input()
s = total%3600
m = (total-(s/60))%60
h = total-(s/3600)-(m/60)
print("{0}:{1}:{2}".format(h,m,s))

### FIXED CODE ###

total = int(input())

h = total // 3600
m = (total - 3600*h) // 60
s = total - 3600*h - 60*m

print("{0}:{1}:{2}".format(h, m, s))
import sys
input = sys.stdin.readline
S = []
s = list(input().rstrip())
K = int(input())
for i in range(len(s)):
    for j in range(i+1, i+5):
        if s[i:j] not in S:
            S.append(s[i:j])
S.sort()
print("".join(S[K-1]))


### FIXED CODE ###

import sys
input = sys.stdin.readline
S = set()
s = list(input().rstrip())
K = int(input())
for i in range(len(s)):
    for j in range(i+1, i+K+1):
        if "".join(s[i:j]) not in S:
            S.add("".join(s[i:j]))
S = list(S)
S.sort()
print("".join(S[K-1]))
def main():
	N = int(input())
	K = int(input())

	price = list(map(int, input().split()))
	
	price.sort()

	part = price[0:K]

	print(sum(part))

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
  N, K = map(int, input().split())

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

  price.sort()

  part = price[0:K]

  print(sum(part))

if __name__ == '__main__':
  main()
s, t = input(), input()

lt= len(t)
for i in range(lt):
  is_double = True
  size = lt-i
  for j in range(0,i+1):
    _t = t[j:j+size]
    print(i,j,size,_t)
    if _t in s:
      is_double = False
      break
  if not is_double:
    print(lt-1)
    break
    

### FIXED CODE ###

s, t = input(), input()

ls = len(s)
lt= len(t)
is_double = False
c = len(s)
for i in range(ls-lt+1):
  _c = 0 
  for j in range(lt):
    if not s[i+j] == t[j]:
      _c +=1
  if c > _c:
    c = _c
    
print(c)
s = input("")

h = s / 3600
m = (s % 3600) / 60
s = ((s % 3600) % 60) % 60

print("{0:d}:{1:d}:{2:d}".format(h, m, s))

### FIXED CODE ###

second = int(input(""))

if second >= 0 and second < 86400:
    h = int(second / 3600)
    m = int((second % 3600) / 60)
    s = int(((second % 3600) % 60) % 60)

print("{0}:{1}:{2}".format(h, m, s))
n = input()
paper = 0
if n % 2 == 0:
    paper = n / 2
else:
    paper = n / 2 + 1
print(paper)


### FIXED CODE ###

n = int(input())
print((n+1) // 2)
import itertools
import math
import fractions
import functools
import copy
from collections import deque

n, m = map(int, input().split())
ab = [[] for _ in range(m)]
for i in range(m):
    a, b = map(int, input().split())
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)

ans = [-1] * n
d = deque([0])

while d:
    f = d.popleft()
    for i in ab[f]:
        if ans[i] == -1:
            ans[i] = f
            d.append(i)

print("Yes")
for i in range(1,n):
    print(ans[i]+1)


### FIXED CODE ###

import itertools
import math
import fractions
import functools
import copy
from collections import deque

n, m = map(int, input().split())
g = [[] for i in range(n)]
for i in range(m):
    a,b = map(int, input().split())
    a -= 1
    b -= 1
    g[a].append(b)
    g[b].append(a)


a = [-1]*n
d = deque([0])
while d:
    f = d.popleft()
    for i in g[f]:
        if a[i] == -1:
            a[i] = f
            d.append(i)

print("Yes")
for i in range(1,n):
    print(a[i]+1)
N, P = map(int, input().split())
if N == 1:
    print(P)
    exit()

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

    # divisors.sort()
    return divisors


div_list = make_divisors(P)
ans = 0
for i in range(10 ** 6 + 1):
    # idx = bisect.bisect_left(div_list, i ** N)
    # if i ** N == div_list[min(idx, len(div_list) - 1)]:
    if i ** N in div_list:
        ans = i
print(ans)

### FIXED CODE ###

def solve(N, P):
    prime_list = []
    for i in range(2, int(P ** (1 / 2)) + 1):
        cnt = 0
        while P % i == 0:
            cnt += 1
            P //= i
        if cnt:
            prime_list.append([i, cnt])
    if P != 1:
        prime_list.append([P, 1])

    ans = 1
    for prime, cnt in prime_list:
        if cnt >= N:
            ans *= prime ** (cnt // N)
    return ans

if __name__ == '__main__':
    n, p = map(int, input().split())
    print(solve(n, p))
sheep_number=int(input())
wolf_number=int(input())
if sheep_number<=wolf_number:
    print('unsafe')
else:
    print('safe')

### FIXED CODE ###

x,y = map(int,input().split())
if x<=y:
    print('unsafe')
else:
    print('safe')
def solve():
    S = input()
    K = int(input())
    a = min(list(S))
    lis = set()
    if len(S)>=5:
        for i,s in enumerate(S):
            if s==a:
                for j in range(i+1,min(len(S),i+K+1)):
                    lis.add(S[i:j])
    else:
        for i in range(len(S)):
            for j in range(i+1,len(S)+1):
                lis.add(S[i:j])
    ans = sorted(list(lis))[K-1]
    return ans
print(solve())

### FIXED CODE ###

def solve():
    S = input()
    K = int(input())
    strlist = sorted(list(S))
    lis = set()
    p = 0
    while len(list(lis))<K:
        a = strlist[p]
        if len(S)>=5:
            for i,s in enumerate(S):
                if s==a:
                    for j in range(i+1,min(len(S)+1,i+K+1)):
                        lis.add(S[i:j])
        else:
            for i in range(len(S)):
                for j in range(i+1,len(S)+1):
                    lis.add(S[i:j])
        p += 1
    ans = sorted(list(lis))[K-1]
    return ans
print(solve())
n = int(input())
e = [[] for _ in range(n)]
AB = [list(map(int, input().split())) for _ in range(n - 1)]
AB = [(a -1, b - 1) for a, b in AB]

for itr, (a, b) in enumerate(AB):
  e[a].append((b, itr))
  e[b].append((a, itr))
  
cidx = max([len(i) for i in e])

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

def dfs(v = 0, p = 0, p_col = -1):
  # 色は１から順に塗っていく
  col = 1
  for u, i in e[v]:
    if u != p:
      # 親と色がかぶる時は＋１
      if col == p_col:
        col += 1
      if ans[i] == -1: 
        ans[i] = col
      dfs(u, v, col)
      col += 1 

dfs()

print(cidx)
for i in ans:
  print(i)

### FIXED CODE ###

from collections import deque
n = int(input())
e = [[] for _ in range(n)]
AB = [list(map(int, input().split())) for _ in range(n - 1)]
AB = [(a -1, b - 1) for a, b in AB]

for itr, (a, b) in enumerate(AB):
  e[a].append((b, itr))
  e[b].append((a, itr))
  
cidx = max([len(i) for i in e])

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

q = deque()
q.append((0, 0, -1))
# 色は１から順に塗っていく
while q:
  v, p, pcol = q.popleft()
  col = 1
  for u, i in e[v]:
    if u != p:
      # 親と色がかぶる時は＋１
      if col == pcol:
        col += 1
      if ans[i] == -1: 
        ans[i] = col
      q.append((u, v, col))
      col += 1 

print(cidx)
for i in ans:
  print(i)
INFTY = 10**9+7
N,M = map(int,input().split())
A = []
for _ in range(M):
    A.append(int(input()))
dp = [0 for _ in range(N+1)]
dp[0] = 1
dp[1] = 1
cur = 0
if A[0]==1:
    dp[1] = 0
    cur = 1
for i in range(2,N+1):
    if cur<M and i==A[cur]:
        cur += 1
    else:
        dp[i] = (dp[i-1]+dp[i-2])%INFTY
print(dp[N])

### FIXED CODE ###

INFTY = 10**9+7
N,M = map(int,input().split())
A = []
for _ in range(M):
    A.append(int(input()))
dp = [0 for _ in range(N+1)]
dp[0] = 1
dp[1] = 1
cur = 0
if M>0 and A[0]==1:
    dp[1] = 0
    cur = 1
for i in range(2,N+1):
    if M>0 and cur<M and i==A[cur]:
        cur += 1
    else:
        dp[i] = (dp[i-1]+dp[i-2])%INFTY
print(dp[N])
n = int(input())
a = map(int, input().split())
print(max(a)-min(a))


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
print(max(a)-min(a))
K = int(input())
r = 7 % K
ans = -1
for i in range(K):
   if r == 0:
      ans = i
      break
   r = 10r + 7
   r = r % K
print(ans)

### FIXED CODE ###

K = int(input())
r = 7 % K
ans = -2
for i in range(K):
   if r == 0:
      ans = i
      break
   r = 10*r + 7
   r = r % K
print(ans+1)
import functools
import fractions

def main():
  if 'get_ipython' not in globals():  
    # For Subsession
    N = int(input())
    A = list(map(int, input().split()))
    A = list(set(A))
  else:
    # N = 3
    # A = [7,6,8]
    # N = 3
    # A = [12,15,18]
    N = 2
    A = [1000000000,1000000000]

  x = 0
  for i in range(N):
    tmp = functools.reduce(fractions.gcd, A[0:i]+A[i+1:])
    if tmp > x:
      x = tmp
  
  print(x)
  
main()

### FIXED CODE ###

import functools
import fractions

def main():
  if 'get_ipython' not in globals():  
    # For Subsession
    N = int(input())
    A = list(map(int, input().split()))
  else:
    # N = 3
    # A = [7,6,8]
    N = 3
    A = [12,15,18]
    # N = 3
    # A = [1,1000000000,1000000000]

  AL = [0] * N    
  AR = [0] * N
  for i in range(N):
    if i != 0:
      AL[i] = fractions.gcd(AL[i-1],A[i])
    else:
      AL[i] = A[i]
    j = N - i - 1
    if j!= N - 1:
      AR[j] = fractions.gcd(AR[j+1],A[j])
    else:
      AR[j] = A[j]
      
  if 'get_ipython' in globals():   
    print(AL)
    print(AR)
  
  x = 0
  for i in range(N):
    if i == 0:
      tmp = AR[i+1]
    elif i == N - 1:
      tmp = AL[i-1]
    else:
      tmp = fractions.gcd(AL[i-1],AR[i+1])
    if tmp > x: x = tmp
  
  print(x)
    
main()
A, B = input().split()
def calc(A, B):
  Amin = int(A/0.08)
  Amax = int((A+1)/0.08+0.001)
  Arange = set(range(Amin, Amax))
  Bmin = int(B/0.1)
  Bmax = int((B+1)/0.1+0.001)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  if len(intersection) == 0:
    print(-1) 
  else:
    print(min(intersection))
calc(A,B)

### FIXED CODE ###

A, B = map(int, input().split())
def calc(A, B):
  Amin = A/0.08
  if (Amin - int(Amin)) != 0.:
    Amin = int(Amin)+1
  else:
    Amin = int(Amin)
  Amax = int((A+1)/0.08)
  Arange = set(range(Amin, Amax))
  Bmin = B/0.1
  if (Bmin - int(Bmin)) != 0.:
    Bmin = int(Bmin)+1
  else:
    Bmin = int(Bmin)
  Bmax = int((B+1)/0.1)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  print(-1) if len(intersection) == 0 else print(min(intersection))
calc(A, B)
a,b = map(int,input().split();print(max(a-b,0))

### FIXED CODE ###

a,b = map(int,input().split());print(max(a-b,0))
import numpy as np
N = int(input())
A = np.array([int(i) for i in input().split()])
A = A - np.arange(N) - 1
B = A - np.reshape(A, (-1, 1))
print(np.sum(B, axis=1).max())

### FIXED CODE ###

import numpy as np
N = int(input())
A = np.array([int(i) for i in input().split()])
A = np.sort(A - np.arange(N) - 1)
b = A[N//2]
print(np.sum(np.abs(A - b)))
# 青の文字の辞書にtupleの1つ目に数を数える
# 赤の文字の辞書のtupleの２つ目に数を数える
# 青 -　赤を計算する

N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(N)]

# 別のインスタンスを作成する
s2 = s[:]
set(s2)
ans = 0

for i in s2:
    if ans < s.count(i) - t.count(i):
        ans = s.count(i) - t.count(i)

print(ans)

### FIXED CODE ###

N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(M)]

# 別のインスタンスを作成する
s2 = s[:]
# 和集合をとる
set(s2)
ans = 0

for i in s2:
    if ans < s.count(i) - t.count(i):
        ans = s.count(i) - t.count(i)

print(ans)
s = input()
print(s.count('1')

### FIXED CODE ###

s = input()
print(s.count('1'))
# https://yahoo-procon2019-qual.contest.atcoder.jp/tasks/yahoo_procon2019_qual_d

L = int(input())

A = [int(input()) for _ in range(L)]

INF = int(1e15)
dp = [[INF] * (L + 1) for _ in range(5)]

for i in range(4):
    dp[i][0] = 0

for i in range(n):
    dp[0][i + 1] = dp[0][i] + A[i]  # 全部取り除く
    dp[1][i + 1] = min(dp[j][i] for j in range(2)) + (A[i] % 2 if A[i] != 0 else 2)
    dp[2][i + 1] = min(dp[j][i] for j in range(3)) + (1 if A[i] % 2 == 0 else 0)
    dp[3][i + 1] = min(dp[j][i] for j in range(4)) + (A[i] % 2 if A[i] != 0 else 2)
    dp[4][i + 1] = min(dp[j][i] for j in range(5)) + A[i]  # 全部取り除く


print(min(dp[i][L] for i in range(1, 5)))


### FIXED CODE ###

# https://yahoo-procon2019-qual.contest.atcoder.jp/tasks/yahoo_procon2019_qual_d

L = int(input())

A = [int(input()) for _ in range(L)]

INF = int(1e15)
dp = [[INF] * (L + 1) for _ in range(5)]

for i in range(4):
    dp[i][0] = 0

for i in range(L):
    dp[0][i + 1] = dp[0][i] + A[i]  # 全部取り除く
    dp[1][i + 1] = min(dp[j][i] for j in range(2)) + (A[i] % 2 if A[i] != 0 else 2)
    dp[2][i + 1] = min(dp[j][i] for j in range(3)) + (1 if A[i] % 2 == 0 else 0)
    dp[3][i + 1] = min(dp[j][i] for j in range(4)) + (A[i] % 2 if A[i] != 0 else 2)
    dp[4][i + 1] = min(dp[j][i] for j in range(5)) + A[i]  # 全部取り除く


print(min(dp[i][L] for i in range(1, 5)))
s = input()
k = int(input())
def unit(s):
    """sの両端を外した状態でいくつ変えるか
    """
    count = 0
    prev = s[0]
    for c in s[1:]:
        if c==prev:
            count += 1
            prev = None
        else:
            prev = c
    return count
if len(s)==2:
    if s[0]==s[1]:
        print(k)
    else:
        print(0)
elif k==1:
    print(unit(s))
elif len(s)==1:
    print(k//2)
elif not s:
    print(0)
elif s[0]!=s[-1]:
    print(k * unit(s))
else:
    s0 = unit(s[1:-1])
    s1 = unit(s[1:])
    s2 = unit(s[:-1])
    s3 = unit(s)
    import numpy as np
    a = np.zeros((k+1,2), dtype=int)
    a[1,0] = s3
    a[1,1] = s1
    for n in range(2,k+1):
        a[n, 0] = min(a[n-1,1]+s3, a[n-1,0]+s2) + 1
        a[n, 1] = min(a[n-1,1]+s0, a[n-1,0]+s1) + 1
    print(a[k,0])

### FIXED CODE ###

# AGC039A

import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))


s = input()
k = int(input())

def sub(s):
    if not s:
        return 0
    # 連続する文字のカウント
    prev = s[0]
    counts = []
    count = 1
    for c in s[1:]:
        if c==prev:
            count += 1
        else:
            counts.append(count)
            count = 1
        prev = c
    if count>=2:
        counts.append(count)
    return sum([item//2 for item in counts])

if s[0]!=s[-1]:
    ans = k * sub(s)
elif all(s[0]==s[i] for i in range(1, len(s))):
    ans = (k * len(s)) // 2
else:
    i = 0
    while s[i]==s[-1]:
        i += 1
    ss = s[i:] + s[:i]
    ans = sub(s[:i]) + (k-1)*sub(ss) + sub(s[i:])
print(ans)
#     s1 = s[:-1] + "A"
#     c1 = sub(s1)
#     s2 = "B" + s[1:]
#     c2 = sub(s2)
tmp = list(input())

N = int(tmp[0])
R = int(tmp[1])

if N < 10:
  print(100 * (10 - N) + R)
else:
  print(R)

### FIXED CODE ###

tmp = list(input().split(" "))

N = int(tmp[0])
R = int(tmp[1])

if N < 10:
  print(100 * (10 - N) + R)
else:
  print(R)
import itertools

def ij(m):
    return m[0] < m[1]

def main():
    (l, r) = list(map(int, input().split()))

    min = 2020
    for (i, j) in filter(ij, itertools.product(range(l, r + 1), range(l, r + 1))):
        mod = i * j % 2019
        if mod <= min:
            min = mod

    print(min)

if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    (l, r) = list(map(int, input().split()))

    ans = 2020
    for i in range(l, min(r + 1, l + 2019)):
        for j in range(i + 1, min(r + 1, i + 2020)):
            mod = i * j % 2019
            if mod <= ans:
                ans = mod

    print(ans)

if __name__ == "__main__":
    main()
"""
Created on Sun May 19 14:10:21 2019

@author: taikinaka
"""
#print('put key')
K = int(input())
#print('Put numbers')
prob = 0
N = int(input())
for a in range(1,N+1):
    p = 0
    num = a
    while(K >num):
        num=num*2
        #print('num=',num)
        p = p + 1
    #print("p=",p)
    prob = prob + 0.5**p
prob = prob/N
print(prob)

### FIXED CODE ###

N,K = map(int,input().split())
prob = 0
for a in range(1,N+1):
    p = 0
    num = a
    while(K >num):
        num=num*2
        p = p + 1
    prob = prob + 0.5**p
prob = prob/N
print(prob)
# グラフ定義
class Edge:
    def __init__(self, f: int, t: int, cost: int):
        self._t = t
        self._cost = cost
        self._f = f

    @property
    def t(self):
        return self._t

    @property
    def f(self):
        return self._f

    @property
    def cost(self):
        return self._cost


INF = 1 << 28


# ここから本実装
def bellman_ford(n: int, edges, s: int):
    m = len(edges)
    dist = [INF for _ in range(n)]
    looped = [False] * n

    dist[s] = 0

    for i in range(2 * n):
        for e in edges:

            if dist[e.t] > dist[e.f] + e.cost:
                dist[e.t] = dist[e.f] + e.cost
                if i >= n - 1:
                    return None

    return dist


def visitable_node(n, g, rg):

    vis = set()
    def dfs(idx):
        vis.add(idx)
        for e in g[idx]:
            if e in vis:
                continue
            dfs(e)

    dfs(0)

    rvis = set()
    def rdfs(idx):
        rvis.add(idx)
        for e in rg[idx]:
            if e in rvis:
                continue
            rdfs(e)

    rdfs(n - 1)

    return vis & rvis


n, m, p = map(int, input().split())

edges = []
g = [[] for _ in range(n)]
rg = [[] for _ in range(n)]
for _ in range(m):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    edges.append(Edge(a, b, -c + p))
    g[a].append(b)
    rg[b].append(a)

visitable = visitable_node(n, g, rg)

updated = [e for e in edges if e.f in visitable and e.t in visitable]


dist = bellman_ford(n, updated, 0)

if dist:
    print(max(0, -dist[n - 1]))
else:
    print(-1)


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)



# グラフ定義
class Edge:
    def __init__(self, f: int, t: int, cost: int):
        self._t = t
        self._cost = cost
        self._f = f

    @property
    def t(self):
        return self._t

    @property
    def f(self):
        return self._f

    @property
    def cost(self):
        return self._cost


INF = 1 << 28


# ここから本実装
def bellman_ford(n: int, edges, s: int):
    dist = [INF for _ in range(n)]
    dist[s] = 0

    for i in range(2 * n):
        for e in edges:

            if dist[e.t] > dist[e.f] + e.cost:
                dist[e.t] = dist[e.f] + e.cost
                if i >= n - 1:
                    return None

    return dist


def visitable_node(n, g, rg):

    vis = [False] * n

    def dfs(idx):
        vis[idx] = True
        for e in g[idx]:
            if not vis[e]:
                dfs(e)

    dfs(0)

    rvis = [False] * n

    def rdfs(idx):
        rvis[idx] = True
        for e in rg[idx]:
            if not rvis[e]:
                rdfs(e)

    rdfs(n - 1)

    return [vis[i] & rvis[i] for i in range(n)]


n, m, p = map(int, input().split())

edges = []
g = [[] for _ in range(n)]
rg = [[] for _ in range(n)]
for _ in range(m):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    edges.append(Edge(a, b, -c + p))
    g[a].append(b)
    rg[b].append(a)

visitable = visitable_node(n, g, rg)
updated = [e for e in edges if visitable[e.f] and visitable[e.t]]

dist = bellman_ford(n, updated, 0)

if dist:
    print(max(0, -dist[n - 1]))
else:
    print(-1)
def solve(b):
    u = []
    lenu = []
    p = ''
    for i in range(len(b)):
        if (b[i]=='A')or(b[i]=='T')or(b[i]=='G')or(b[i]=='C'):
            p += b[i]
        else:
            u.append(p)
            lenu.append(len(p))
            p=p.replace(p,'')
    
    
    # print(u,lenu)
    print(max(lenu))


 
 
def main():
    b = input()
    solve(b)
 
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

def solve(b):
    u = []
    lenu = []
    p = ''
    for i in range(len(b)):
        if (b[i]=='A')or(b[i]=='T')or(b[i]=='G')or(b[i]=='C'):
            p += b[i]
        else:
            u.append(p)
            lenu.append(len(p))
            p=p.replace(p,'')
    u.append(p)
    lenu.append(len(p))
    
    
    
    # print(u,lenu)

    print(max(lenu))


 
 
def main():
    b = input()
    solve(b)
 
 
if __name__ == '__main__':
    main()
N = int(input())
S = lisr(input())
cnt = 0
for i in range(1, N):
    if S[i-1] == "#" and S[i] == ".":
        cnt += 1
print(cnt)

### FIXED CODE ###

A, B, C = map(int, input().split())
if A > B:
    tmp = A
    A =  B
    B = tmp 

if C >= A and C <= B:
    print("Yes")
else:
    print("No")
#XY = [[1,2],[1,1],[2,2],[2,1],[3,1],[3,2]]
#N = len(XY)
N=int(input())
XY =  [list(map(int, input().split())) for _ in range(N)]
vecs = [  (x[0]-y[0], x[1]-y[1]) for y in XY   for x in XY]
pattern = list(set(vecs))
pattern.remove((0,0))
pattern2 = tuple(pattern)
qty = map(lambda x: vecs.count(x), pattern2)
data = zip(qty, pattern)
data2 = list(data)
data2.sort()
d = int(data2[-1][0]/2)
N-d

### FIXED CODE ###

N=int(input())
XY =  [list(map(int, input().split())) for _ in range(N)]
if N==1:
    print(1)
    exit()
vecs = [  (x[0]-y[0], x[1]-y[1]) for y in XY   for x in XY]
pattern = list(set(vecs))
pattern.remove((0,0))
pattern2 = tuple(pattern)
qty = map(lambda x: vecs.count(x), pattern2)
data = zip(qty, pattern)
data2 = list(data)
data2.sort()
d = int(data2[-1][0])
print(N-d)
n, a, b = map(int, input().split())
tot = 0
for num in range(1, n+1):
     sum_dgt = sum(map(int, str(num)))
     if sum_dgt >= a and sum_dgt <= b:
         tot += num
print(tot)     

### FIXED CODE ###

a,b,c,d = map(int, input().split())

l = a+b
r = c+d
msg = "Balanced"
if l > r:
   msg = "Left"
elif l < r:
   msg = "Right"
print(msg)
def binary_search(S,i,S_num)
	left=0
	right=
	while left<right:
		center=int((left+right)/2)
		if S[center]==i:
			return True
		elif S[center]>i:
			right=center-1
		elif S[center]<i:
			left=center+1
	return False

S=[]
T=[]
S_num=int(input())
S=input().split()
T_num=int(input())
T=input().split()
cnt=0

for i in T:
	if binary_search(S,i,S_num):
		cnt+=1
	
print(cnt)


### FIXED CODE ###

s = int(input())
S = list(map(int, input().split()))
t= int(input())
T = list(map(int, input().split()))
cnt = 0
for i in T:
	a=0
	b=s-1
	while b >= a:
		mid=int((a+b)/2)
		if S[mid]==i:
			cnt+= 1
			break
		elif S[mid]>i:
			b=mid-1
			continue
		else:
			a=mid+1
			continue
print(cnt)
from fractions import gcd
N, M = map(int, input().split())
an = list(map(int, input().split()))

l = an[0]
for a in :
    LCM = l*a//gcd(l, a)
    if LCM//l % 2 == LCM//a % 2 == 1:
        l = LCM
    else:
        print(0)
        exit()
print((M//LCM+1)//2)

### FIXED CODE ###

import fractions
from functools import reduce
import numpy as np
import sys

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


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


def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)


def listdivide(list):
    numpy = np.array(list)
    numpy = numpy//2
    return numpy.tolist()


def divide2(x):
    res = 0
    while x % 2 == 0:
        x /= 2
        res += 1
    return res


# while gcd_list(an) % 2 == 0:
#     print(gcd_list(an))
an = listdivide(an)

t = divide2(an[0])
for i in range(1, N):
    if divide2(an[i]) != t:
        print(0)
        sys.exit()

for i in range(t):
    an = listdivide(an)
    M = M // 2

LCM = lcm_list(an)

if LCM > M == 0:
    print(0)
else:
    print(-(-(M // LCM)//2))
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
p = [a, b, c, d, e]

mi = [a%10,b%10,c%10,d%10,e%10]
mm = [i for i in mi if i != 0]
mm.sort()
sum = 0
for i in range(5):
	if p[i]%10 != 0:
		sum += (p[i]//10+1)*10
	else:
		sum += p[i]//10*10
sum -= 10 - mm[0]
print (sum)

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
p = [a, b, c, d, e]

mi = [a%10,b%10,c%10,d%10,e%10]
mm = [i for i in mi if i != 0]
mm.sort()
sum = 0
for i in range(5):
	if p[i]%10 != 0:
		sum += (p[i]//10+1)*10
	else:
		sum += p[i]//10*10
if (mm):
	sum -= 10- mm[0]
print (sum)