Harryxun/stf_run huggingface dataset:
def solve():
    n, k = map(int, input().split())
    s = list(map(int, input().split()))

    def is_ok(x):
        res = 0
        for ss in s:
            y = ss // x
            if ss % x == 0:
                y -= 1
            res += y
        return res

    ok = -1
    ng = 10 ** 10
    while ng - ok > 1:
        mid = (ok + ng) // 2
        if is_ok(mid) > k:
            ok = mid
        else:
            ng = mid

    print(ok + 1)


solve()


### FIXED CODE ###

def solve():
    n, k = map(int, input().split())
    s = list(map(int, input().split()))

    def is_ok(x):
        res = 0
        for ss in s:
            y = ss // x
            if ss % x == 0:
                y -= 1
            res += y
        return res

    ng = 0
    ok = 10 ** 10
    while ok - ng > 1:
        mid = (ok + ng) // 2
        if is_ok(mid) <= k:
            ok = mid
        else:
            ng = mid

    print(ok)


solve()
S,W=input(),sep(",")
S=int(S)

W=int(W)

if W >= S:
  print("unsafe")
  else:
    print("safe")


### FIXED CODE ###

s, w = input().split(" ")

s = int(s)
w = int(w)

if w >= s:
    print("unsafe")
else:
    print("safe")
import math
n,d=input().split()
n=int(n)
d=int(d)
def combinations(n, r):
    return math.factorial(n)/(math.factorial(n-r)*math.factorial(r))
x=[]
if d==1:
  count=combinations(n,2)
  count = int(count)
else:
  for i in range(n):
    xa=[int(s) for s in input().split()]
    x.append(xa)
  a=[]
  for i in range(n-1):
    for j in range(i+1,n):
      t=[]
      for k in range(d):
        c=(x[i][k]-x[j][k])*(x[i][k]-x[j][k])
        t.append(c)
        if k==d-1:
          a.append(sum(t))
  answer=list(map(lambda x:pow(x,1/2),a))
  count=0
  for l in range(n):
    if answer[l].is_integer()==True:
      count=count+1
print(count)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys

N, D = map(int, input().split())
s_lines = sys.stdin.readlines()

ans = 0
X_list_list = []
for s in s_lines:
    new_list = list(map(int, s.split()))
    for i in range(len(X_list_list)):
        sum_num = float(0)
        for idx, ite in enumerate(X_list_list[i]):
            sum_num += (new_list[idx] - ite) ** 2
        if pow(sum_num, 0.5).is_integer():
            ans += 1
    X_list_list.append(new_list)

print(ans)
import sys


sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    a, b, c = read_int_list()
    if a != b and a == c:
        print(b)
    elif a != c and b == c:
        print(a)
    else:
        print(c)


main()


### FIXED CODE ###

import sys
from collections import Counter

# sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n = read_int_list()
    c = Counter(n)
    for i in c:
        if c[i] == 1:
            print(i)


main()
n,i = map(int(input().split()))
print((n-i)+1)


### FIXED CODE ###


n,i = map(int,input().split())
print((n-i)+1)
import datetime
d1 = input().split("/")

y = int(d1[0])
m = int(d1[1])
d = int(d1[2])

dd = datetime.date(y,m,d)
d2 = datetime.date(2019,4,30)

if dd =< d2:
  print("Heisei")
else:
  print("TBD")

### FIXED CODE ###

import datetime
d1 = input().split("/")

y = int(d1[0])
m = int(d1[1])
d = int(d1[2])

dd = datetime.date(y,m,d)
d2 = datetime.date(2019,4,30)

if dd <= d2:
  print("Heisei")
else:
  print("TBD")
n=int(input())
a=list(map(int,input().split(" ")))

a.insert(0,-1)

m=len(a)-1
res=""
k=m
if m%2==0:
    aa=0
else:
    aa=1

for i in range(int(m/2)+1):
    res+=str(a[k])+" "
    k-=2
    if k<=0:
        break

if m%2==0:
    s=1
else:
    s=2

k=s
for i in range(int(m/2)+1):
    res+=str(a[k])+" "
    k+=2
    if k>m:
        break

print(res)

### FIXED CODE ###

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

a.insert(0,-1)

m=len(a)-1
res=""

k=m
for i in range(int(m/2)+1):
    res+=str(a[k])+" "
    k-=2
    if k<=0:
        break

if m%2==0:
    s=1
else:
    s=2

if m>1:
    k=s
    for i in range(int(m/2)+1):
        res+=str(a[k])+" "
        k+=2
        if k>=m:
            break

print(res)
pi = 3.14

R = input()
print(2*pi*R)

### FIXED CODE ###

R = input()
R = int(R)

print(2*3.14*R)
#17:11
n,m = map(int,input().split())
pre = [-1 for i in range(n)]
for _ in range(m):
  x,y,z = map(int,input().split())
  x -= 1
  y -= 1
  while pre[x] != -1:
    x = pre[x]
  while pre[y] != -1:
    y = pre[y]
  if x != y:
    if len(X) > len(Y):
      pre[x] = y
    else:
      pre[y] = x
father = set()
ans = 0
for i in range(n):
  if pre[i] == -1:
    ans += 1
#print(pre)
print(ans)

### FIXED CODE ###

#解説チラ見
n,m = map(int,input().split())
ans = n
pre = [i for i in range(n)]
for _ in range(m):
  x,y,z = map(lambda x: int(x)-1, input().split())
  X = [x]
  while pre[x] != x:
    x = pre[x]
    X.append(x)
  Y = [y]
  while pre[y] != y:
    y = pre[y]
    Y.append(y)
  if x != y:
    ans -= 1
    for xx in X:
      pre[xx] = y
    for yy in Y:
      pre[yy] = y
    pre[x] = y
print(ans)
import itertools
n=int(input())
l=list(map(int,input().split()))
if n!=3:print("No")
else:
  flag=0
  for i in itertools.permutations(s):
    if i[0]^i[2]==i[1] and i[1]^i[2]==i[0] and i[0]^i[1]==i[2]:flag+=1
  if flag!=0:print("Yes")
  else:print("No")


### FIXED CODE ###

import sys
import itertools
n=int(input())
l=list(map(int,input().split()))
l.sort()
s=set(l)
if len(s)>=4 :print("No");sys.exit()
if len(s)==1:print("Yes" if 0 in s else "No");sys.exit()
s=list(s);s.sort()
if len(s)==2:
  if 0 not in s:print("No");sys.exit()
  if n%3==1:
    if l.count(0)==(n-1)//3:print("Yes");sys.exit()
    else:print("No");sys.exit()
  elif n%3==2:
    if l.count(0)==(n+1)//3:print("Yes");sys.exit()
    else:print("No");sys.exit()
  elif n%3==0:
    if l.count(0)==n//3:print("Yes");sys.exit()
    else:print("No");sys.exit()
a=l.count(s[0]);b=l.count(s[1]);c=l.count(s[2])
if a!=b or b!=c or c!=a:print("No");sys.exit()
flag=0
for i in itertools.permutations(s):
  if i[0]^i[2]==i[1] and i[1]^i[2]==i[0] and i[0]^i[1]==i[2]:flag+=1
if flag!=0:print("Yes")
else:print("No")
N,A,B = map(int,input().split())
output = 0
for i in range(1,N+1): 
  # set condition for i < 10^4
  if i < 10:
	digitsum = i
  elif i<100:
    digitsum = i//10+i%10
  elif i<1000:
    digitsum = i//100+(i%100)//10+(i%100)%10
  elif i<10000:
    digitsum= i//1000+(i%1000)//100+((i%1000)%100)//10+((i%1000)%100)%10
  else:
    digitsum = 0
 
  if A <= digitsum and digitsum <= B:
  	output += i
    
print (output)
N,A,B = map(int,input().split())
output = 0
for i in range(1,N+1): 
  # set condition for i < 10^4
  if i < 10:
	digitsum = i
  elif i<100:
    digitsum = i//10+i%10
  elif i<1000:
    digitsum = i//100+(i%100)//10+(i%100)%10
  elif i<10000:
    digitsum= i//1000+(i%1000)//100+((i%1000)%100)//10+((i%1000)%100)%10
  else:
    digitsum = 1
 
  if A <= digitsum and digitsum <= B:
  	output += i
    
print (output)
N,A,B = map(int,input().split())
output = 0
for i in range(1,N+1): 
  # set condition for i < 10^4
  if i < 10:
	digitsum = i
  elif i<100:
    digitsum = i//10+i%10
  elif i<1000:
    digitsum = i//100+(i%100)//10+(i%100)%10
  elif i<10000:
    digitsum= i//1000+(i%1000)//100+((i%1000)%100)//10+((i%1000)%100)%10
  else:
    digitsum = 0
 
  if A <= digitsum and digitsum <= B:
  	output += i
    
print (output)
N,A,B = map(int,input().split())
output = 0
for i in range(1,N+1): 
  # set condition for i < 10^4
  if i < 10:
	digitsum = i
  elif i<100:
    digitsum = i//10+i%10
  elif i<1000:
    digitsum = i//100+(i%100)//10+(i%100)%10
  elif i<10000:
    digitsum= i//1000+(i%1000)//100+((i%1000)%100)//10+((i%1000)%100)%10
  else:
    digitsum = 1
 
  if A <= digitsum and digitsum <= B:
  	output += i
    
print (output)

### FIXED CODE ###

 
N,A,B=map(int,input().split())
 
sum_k=0
 
for i in range(N+1):
    if i <10:
        k=i
    elif i<100:
        k=i//10+i%10
    elif i<1000:
        k=i//100+(i%100)//10+(i%100)%10
    elif i<10000:
        k=i//1000+(i%1000)//100+((i%1000)%100)//10+((i%1000)%100)%10
    else:
        k=1
    if A<=k and k<=B:
        sum_k=sum_k+i
      
print(sum_k)
x = input().split()[1]

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

for index in range(len(ls)):
	list = ls[0:index]
	if sum(list) > x:
		print(index)
		break
	elif sum(list) == x:
		print(index + 1)
		break

### FIXED CODE ###

x = int(input().split()[1])

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

for index in range(len(ls)):
	list = ls[0:index]
	if sum(list) > x:
		print(index)
		break
	elif sum(list) == x:
		print(index + 1)
		break

	if index == len(ls) - 1:
		print(len(ls) + 1)
S=input().split()
total=0

for i in range(ren(S)):
    if  i%2=0:
        if  S[i]=='R'or'U'or'D':
            pass
        else:
            total+=1
    elif  i%2=1:
        if  S[i]=='L'or'U'or'D':
            pass
        else:
            total+=1

if  total==0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

S=input()
total=0

for i in range(len(S)):
    if  (i%2)==0:
        if  (S[i]=='R')or(S[i]=='U')or(S[i]=='D'):
            pass
        else:
            total+=1
    else:
        if  (S[i]=='L')or(S[i]=='U')or(S[i]=='D'):
            pass
        else:
            total+=1

if  total==0:
    print('Yes')
else:
    print('No')
import math
r = int(input())
PI = math.pi
men = (r**2) * PI
sen = (r + r) * PI
print('%.6f %.6f' % (men,sen))

### FIXED CODE ###

import math
PI = math.pi

r = input()
men = r*r * PI
sen = r*2 * PI

print('%.6f %.6f' % (men, sen))
import bisect
from collections import deque

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

lst.sort(key=lambda x:(x[1]), reverse=True)
lst.sort(key=lambda x:(x[0]), reverse=False)

ans = 0
ind = 0
kouho = deque([])
for i in range(1, m+1):
    tugi = True
    while tugi:
        if ind >= n:
            break
        if lst[ind][0] == i:
            bisect.insort(kouho, lst[ind][1])
            ind += 1
        else:
            tugi = False
    if kouho != deque([]):
        ans += kouho.pop()

print(ans)

### FIXED CODE ###

import heapq

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

lst.sort(key=lambda x:(x[1]), reverse=True)
lst.sort(key=lambda x:(x[0]), reverse=False)

ans = 0
ind = 0
kouho = []
for i in range(1, m+1):
    tugi = True
    while tugi:
        if ind >= n:
            break
        if lst[ind][0] == i:
            heapq.heappush(kouho, -lst[ind][1])
            ind += 1
        else:
            tugi = False
    try:
        ans += heapq.heappop(kouho) * (-1)
    except:
        IndexError

print(ans)
s=input()
d={}
for i in s:
  d.get(i,0)+=1
for i in set(s):
  if i%2==1:
    print("No")
    break
else:
  print("Yes")

### FIXED CODE ###

s=input()
d={}
for i in s:
  d[i]=d.get(i,0)+1
for i in set(s):
  if d[i]%2==1:
    print("No")
    break
else:
  print("Yes")
n=int(input())
for i in range(n):
  if i**2>n:
    ans=(i-1)**2
    break
print(ans)

### FIXED CODE ###

n=int(input())
i=1
while True:
  if i**2>n:
    ans=(i-1)**2
    break
  i+=1
print(ans)
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
Asum = [0] * N
Bsum = [0] * M
res = [0]

for i in range(N-1):
    Asum[0] = A[0]
    Asum[i+1] = Asum[i] + A[i+1]
for j in range(M-1):
    Bsum[0] = B[0]
    Bsum[i+1] = Bsum[i] + B[i+1]

for i in range(N):
    for j in range(M):
        if (Asum[i] + Bsum[j]) >= K:
            res.append(i+1+j-1+1)
            break

print(max(res))

### FIXED CODE ###

n,m,k=map(int,input().split())
arr1=list(map(int,input().split()))
arr2=list(map(int,input().split()))
acum1=[0]
for i in range(n): #累積和ai,bjを求める
 acum1.append(acum1[-1]+arr1[i])
acum2=[0]
for i in range(m):
 acum2.append(acum2[-1]+arr2[i])
ans=0
j=m
for i in range(n+1):
 if acum1[i]>k: #ai>Kであれば、どのようにjを選んでもai+bj<=Kとなることはないので探索を終了する
   break
 while acum2[j]>k-acum1[i] and j>0: #各iについて、bj<=K-aiを満たす最大のjを求める
   j-=1
 ans=max(ans,i+j)
print(ans)
n = int(input())
a = list(input().split())

if n == 1:
    print(1)
    print(1)
    exit()

MOD = 10 ** 9 + 7

b = sorted(a)

for i in range(n):
    if b[i] == b[i + 1]:
        d = b[i]
        break

p = []
for i in range(n):
    if a[i] == d:
        p.append(i)

w = p[0] + n - p[1]

c = [0 for _ in range(n + 2)]

temp = 1
for i in range(1, n + 2):
    temp *= i
    c[i] = temp

def cmb(x, y):
    if y < 0 or y > x:
        return 0
    elif x == y:
        return 1
    else:
        return c[x] // c[y] // c[x - y] % MOD


print(n)
for k in range(2, n + 2):
    ans = cmb(n + 1, k) - cmb(w, k - 1)
    print(ans % MOD)



### FIXED CODE ###

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

print(a + b + c - max(a, b, c))
# import sys
# sys.setrecursionlimit(10**9)

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

Map = [[] for _ in range(M)]
reached = [False]*N

for _ in range(M):
    aa, bb = map(int, input().split())
    Map[aa-1].append(bb-1)
    Map[bb-1].append(aa-1)

cnt = 0

def DFS(x):
    global cnt
    global reached

    reached[x] = True

    if all(reached):
        cnt += 1
        reached[x] = False

        return

    for i in Map[x]:
        if reached[i]:
            continue

        else:
            DFS(i)

    reached[x] = False


DFS(0)
print(cnt)


### FIXED CODE ###

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

Map = [[] for _ in range(N)]
reached = [False]*N

for _ in range(M):
    aa, bb = map(int, input().split())
    Map[aa-1].append(bb-1)
    Map[bb-1].append(aa-1)

cnt = 0

def DFS(x):
    global cnt
    global reached

    reached[x] = True

    if all(reached):
        cnt += 1
        reached[x] = False

        return

    for i in Map[x]:
        if reached[i]:
            continue

        else:
            DFS(i)

    reached[x] = False


DFS(0)
print(cnt)
x = int(input())
return "Yes" if x >= 30 else "No"

### FIXED CODE ###

x = int(input())
a = "Yes" if x >= 30 else "No"
print(a)
n_in = int(input()) 
l = [int(input()) for i in range(n_in)] 
# l = [3, 5, 10, 11]

p = l[0]
for i in range(1, len(l)):
    q = l[i]

    if p >= q:
        m, n = p, q
    else:
        m, n = q, p

    while True:
        mod_value = m % n
        if mod_value  == 0:
            break

        m = n
        n = mod_value

    p = int(p*q/n)

print(p)

### FIXED CODE ###

n_in = int(input()) 
t = [int(input()) for i in range(n_in)] 

p = t[0]
for i in range(1, len(t)):
    q = t[i]

    if p >= q:
        m, n = p, q
    else:
        m, n = q, p

    while True:
        mod_value = m % n
        if mod_value  == 0:
            break

        m = n
        n = mod_value

    p = p//n * q

print(p)
N = int(input())
a = list(map(int, input().split()))

avg = 0
for i in range(N):
    avg += a[i]
avg /= N

if round(avg) in a:
    print(a.index(round(avg)))
else:
    result = 100
    for i in range(N):
        temp = abs(a[i]-avg)
        if temp <= result:
            result = temp
    print(a.index(round(result)))


### FIXED CODE ###

import numpy as np
N = int(input())
a = list(map(int, input().split()))

avg = 0
for i in range(N):
    avg += a[i]
avg /= N

idx = np.abs(np.asarray(a)-avg).argmin()
print(idx)
#!/usr/bin/env python

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

if m<=2*n:
    print n+(m-2*n)/4
else:
    print m/2

### FIXED CODE ###

#!/usr/bin/env python

x=0
y=0
n=int(raw_input().strip())
x=800*n
y=n/15*200
print x-y
N,K = map(int, input().split())
H = list(map(int, input().split()))

H.sort()
for i in range(1,K+1):
    H[-i] = 0
print(sum(H))

### FIXED CODE ###

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

if N < K:
    print(0)
else:
    H.sort()
    for i in range(1,K+1):
        H[-i] = 0
    print(sum(H))
N = int(input())
D = [int(i) for i in input().split()]
Dlist = [0]*max(D)
for d in D:
    Dlist[d-1] += 1

M = int(input())
T = [int(i) for i in input().split()]
Tlist = [0]*max(T)
for t in T:
    Tlist[t-1] += 1

flag = True

for i in range(len(Tlist)):
    if Tlist[i] > Dlist[i]:
        flag = False
        break


if flag:
    print('YES')
else:
    print('NO')


### FIXED CODE ###

from collections import Counter
N = int(input())
D = [int(i) for i in input().split()]
M = int(input())
T = [int(i) for i in input().split()]

cD = Counter(D)

for t in T:
    if cD.get(t,0) == 0:
        print('NO')
        exit()
    else:
        cD[t] -= 1

print("YES")
import sympy as sp
import math as ma
N = int(input())
dic = sp.factorint(ma.factorial(N))
key = list(dic.keys())
ans = 1
for i in range(len(dic)):
    ans *= (1 + dic[key[i]])
print(ans % 1000000007)

### FIXED CODE ###

def isPrime(n):
	i = 2
	while i*i <= n:
		if n % i == 0:
			return False
		i += 1
	return True

N = 1000
Prime = []

for i in range(2,N):
	if isPrime(i):
		Prime.append(i)
		
dic = {}
for i in Prime:
	dic[i] = 0

p = int(input())
for k in range(2, p+1):
	for i in Prime:
		while k % i == 0:
			k /= i
			dic[i] += 1

ans = 1
for i in Prime:
	ans *= (1+dic[i])

print(ans % 1000000007)
import numpy


### FIXED CODE ###

while True:
    n = int(input())

    if n == 0:
        break

    matrix = [[] for _ in range(n)]
    col_sum = [0 for _ in range(n + 1)]
    for i in range(n):
        matrix[i] = list(map(int, input().split()))
        matrix[i].append(sum(matrix[i]))
        for j in range(n + 1):
            col_sum[j] += matrix[i][j]

    matrix.append(col_sum)

    for i in range(n + 1):
        for j in range(n + 1):
            print('%5d' % matrix[i][j], end='')
        print()
l = int(input())
    m = (l/3)**3
    print(m)

### FIXED CODE ###

if __name__ == "__main__":
    l = int(input())
    m = (l/3)**3
    print(m)
n = int(input())
a = list(map(int,input().split()))
ma = []
pa = []
l =[]
t = 0
for i in a:
  if i < 0:
    ma.append(i)
    l.append(i*-1)
  elif i> 0:
    pa.append(i)
    l.append(i)
  else:
    t = 1
s = sum(l)
print(s  if t == 1 or N%2==0 else s - 2*min(l))


### FIXED CODE ###


n = int(input())
a = list(map(int,input().split()))
ma = []
pa = []
l =[]
t = 0
k  = 0
for i in a:
  if i < 0:
    ma.append(i)
    l.append(i*-1)
    k+=1
  elif i> 0:
    pa.append(i)
    l.append(i)
  else:
    t = 1
s = sum(l)
print(s  if t == 1 or k%2==0 else s - 2*min(l))
for i in lin:
    i = list(i)
    lis = list(accumulate(i))[::-1]
    for i in lis:
        if i % 10 == 0:
            continue
        ma = max(ma,i)
print(ma)


### FIXED CODE ###

from sys import stdin
from itertools import accumulate

n = int(stdin.readline().rstrip())
li = [int(stdin.readline().rstrip()) for _ in range(n)]
li.sort()
lin = list(accumulate(li))
if lin[-1] %10 != 0:
    print(lin[-1])
    exit()
else:
    for i in li:
        if i % 10 == 0:
            continue
        print(lin[-1]-i)
        exit()
print(0)
n = int(input())

from decimal import Decimal

import sys

for i in range(60000):
    if int(Decimal(i) * Decimal('1.08')) == n:
        print(i)
        sys.exit()

print(':(')

### FIXED CODE ###

m1,_ = input().split()
m2,_ = input().split()

if m1==m2:
  print(0)
else:
  print(1)
n,x = map(int,input().split())
l = list(map(int,input().split()))
c = 1
D = 0
for i in range(1,n+1):
  D = D + l[i]
  if D <= x:
    c += 1
  else:
    break
print(c)

### FIXED CODE ###

n,x = map(int,input().split())
l = list(map(int,input().split()))
c = 1
D = 0
li = []
for i in range(1,n+1):
  D = D + l[i-1]
  if D <= x:
    c += 1
print(c)
n=int(input())
b=list(map(int,input().split()))
if b[0]!=1:
    print(-1)
else:
    ans=[1]
    for j in range(len(b)-1):
        for i in range(len(b)-1,-1,-1):
            if i==0 and b[0]==1:
                ans+=[b.pop(i)]
                break
            if b[i]==i+1:
                ans+=[b.pop(i)]
                break                
if len(ans)!=n:  
    print(-1)
else:
    print(1)
    for i in range(n-1,0,-1):
        print(ans[i])

### FIXED CODE ###

n=int(input())
b=list(map(int,input().split()))
if b[0]!=1:
    print(-1)
else:
    ans=[1]
    for j in range(len(b)-1):
        for i in range(len(b)-1,-1,-1):
            if i==0 and b[0]==1 and b[1]==1:
                ans+=[b.pop(i)]
                break
            if b[i]==i+1 and i>0:
                ans+=[b.pop(i)]
                break    
    if len(ans)!=n:  
        print(-1)
    else:
        print(1)
        for i in range(n-1,0,-1):
            print(ans[i])
def ac_168b(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[0:K] + "..."

K = input()
S = input()
print(ac_168b(K, S))


### FIXED CODE ###


def ac_168b(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[0:K] + "..."

K = int(input())
S = input()
print(ac_168b(K, S))
import heapq
N, M = map(int, input().split())
A = [-int(i) for i in input().split()]

heapq.heapify(A)
for _ in range(M):
#Hは全部マイナスをつけたからaは最大値的なのはいる
    heapq.heapreplace((A, int(A[0]/2))
print(-sum(A))


### FIXED CODE ###

import heapq
N, M = map(int, input().split())
A = list(map(int, input().split()))
A = [-i for i in A]

heapq.heapify(A)
for _ in range(M):
#Hは全部マイナスをつけたからaは最大値的なのはいる
    a = heapq.heappop(A)
    heapq.heappush(A, int(a/2))
print(-sum(A))
N,M = map(int, input().split())

g = {}
steps = 3
for v in range(1,N*steps+1):
    g[v] = []

for _ in range(M):
    u,v = map(int, input().split())
	g[u + N*0].append(v + N*1)
    g[u + N*1].append(v + N*2)
    g[u + N*2].append(v + N*0)

S,T = map(int, input().split())

visiting = [(S,0)]
visited = {}
while visiting:
    v,d = visiting.pop(0)
    if v in visited:
        continue
    visited[v] = d
    if v == T:
        break

    for v2 in g.get(v,()):
        if v2 in visiting or v2 in visited:
            continue
        visiting.append((v2,d+1))
if T in visited:
    print(visited[T] // steps)
else:
    print(-1)


### FIXED CODE ###

N, M = map(int, input().split())
E = {}
for v in range(1,N*3+1):
    E[v] = []
for _ in range(M):
    u, v = map(int, input().split())
    E[u].append(v+N)
    E[u+N].append(v+2*N)
    E[u+2*N].append(v)
S, T = map(int, input().split())
dist = [-1 for _ in range(3*N)]
dist[S-1] = 0

q = []
q.append(S)
while q:
    n = q.pop(0)
    if n == T:
        break
    for t in E[n]:
        if dist[t-1] < 0:
            dist[t-1] = dist[n-1] + 1
            q.append(t)
print(-1 if dist[T-1] < 0 else dist[T-1] // 3)
dish = [int(input()) for d in range(5)]
diff = 0
ans = []
for index,d in enumerate(dish):
  if d % 10 != 0:
    d10 = ((d //10) +1) * 10
    ans.append(d10)
    if diff < d10-d:
      diff = d10-d
      last= index
  else:
    ans.append(d)
del ans[last]
print(sum(ans)+dish[last])

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dish = [a,b,c,d,e]
last = 0
for index,d in enumerate(dish):
  if d % 10 != 0:
    d10 = ((d // 10)+1) *10
    if last <= d10 - d:
      last = d10 - d
    dish[index] = d10
print(sum(dish)-last)