CodeEff/ECCO huggingface dataset:
# Original solution
N,K=list(map(int,input().split()))
H=list(map(int,input().split()))

if K >= N:
    print('0')
else:
    H.sort(reverse=True)
    for i in range(K):
        H.pop(0)

    ans = sum(H)
    print(ans)

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

if K >= N:
    print('0')
else:
    H.sort(reverse=True)
    H=H[K:]

    ans = sum(H)
    print(ans)
# Original solution
N, K = list(map(int, input().split()))
H = list(map(int, input().split()))
i = 0


H.sort(reverse=True)

while K > 0 and len(H) > 0:
    H.pop(0)
    K -= 1

i += sum(H)

print(i)

# Optimized solution
N, K = list(map(int, input().split()))
H = list(map(int, input().split()))
i = 0

H.sort(reverse=True)

if len(H) <= K:
    print(i)
else:
    del H[:K]
    i += sum(H)
    print(i)
# Original solution
n, k = list(map(int, input().split()))
arr = list(map(int, input().split()))
arr.sort()
if k >= n: print((0))
else: print((sum(arr[:n-k])))


# Optimized solution
def main():
	x = [int(i) for i in input().split()]
	y = [int(i) for i in input().split()]
	y.sort()
	if (x[1]!=0):
		z = y[:-x[1]]
	else:
		z = y
	print((sum(z)))
if __name__== "__main__":
	main()
# Original solution
enemy_num, dethblow_num, *enemy_hp = list(map(int, open(0).read().split()))

if enemy_num >= dethblow_num:
    for i in range(dethblow_num):
        enemy_hp.remove(max(enemy_hp))
else:
    enemy_hp.clear()
    enemy_hp = [0]
    
print((sum(enemy_hp)))

# Optimized solution
enemy_num, dethblow_num, *enemy_hp = list(map(int, open(0).read().split()))

if enemy_num >= dethblow_num:
    enemy_hp.sort(reverse=True)
    del enemy_hp[:dethblow_num]
else:
    enemy_hp.clear()
    enemy_hp = [0]
    
print((sum(enemy_hp)))
# Original solution
import math

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

for _ in range(K):
  H[H.index(max(H))] = 0

ans = 0
for i in H:
  ans += i
  
print(ans)

# Optimized solution
import math

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

for i in range(K):
  H[min(i, N-1)] = 0

ans = 0
for i in H:
  ans += i
  
print(ans)
# Original solution
n,k = list(map(int,input().split()))
h = list(map(int,input().split()))

h.sort(reverse=True)

cnt = 0

for i in range(k):
  h.pop(0)
  if not h:
    break
  
for i in h:
  cnt += i

print(cnt)

# Optimized solution
n,k = list(map(int,input().split()))
h = list(map(int,input().split()))

h.sort()

cnt = 0

for i in range(k):
  h.pop()
  if not h:
    break
  
for i in h:
  cnt += i

print(cnt)
# Original solution
N, K = list(map(int, input().split()))
H = sorted(map(int, input().split()), reverse=True)
print((sum(H[K:])))

# Optimized solution
N,K=list(map(int,input().split()));print((sum(sorted(map(int,input().split()),reverse=True)[K:])))
# Original solution
N, K = list(map(int, input('').split(' ')))
H = input('').split(' ')
if(K >= N):
    print((0))
    exit(0)
H = [int(i) for i in H]
for j in range(K):
    H[H.index(max(H))] = 0
print((sum(H)))

# Optimized solution
N, K = list(map(int, input().split(' ')))
H = sorted(map(int, input().split(' ')))
if(K >= N):
    print((0))
    exit(0)
for j in range(K):
    H[N - j - 1] = 0
print((sum(H)))
# Original solution
n,k=(int(i) for i in input().split())
h=[0 for i in range(k)]
p=0
for i in input().split():
  p+=int(i)
  try:
      if h[0]<int(i):
        h[0]=int(i)
        h.sort()
  except IndexError:
    continue
print((p-sum(h)))

# Optimized solution
n,k=(int(i) for i in input().split())
h=[]
for i in input().split():
  h.append(int(i))
h.sort()
if k!=0:
	for i in range(min(n,k)):
 	  h.pop(-1)
print((sum(h)))
# Original solution
import sys

n,k = list(map(int,input().split()))
ans = 0;
h = [int(x) for x in input().split()]
for i in range(k):
    if len(h) == 0:
        break;
    m = max(h)
    h.remove(m)


if len(h) > 0:
    ans += sum(h)

print(ans)


# Optimized solution
import sys

n,k = list(map(int,input().split()))
ans = 0;
h = [int(x) for x in input().split()]
h.sort(reverse = True)
h = h[k:]

if len(h) > 0:
    ans += sum(h)

print(ans)
# Original solution
N,K= list(map(int,input().split()))
health = list(map(int,input().split()))
health = sorted(health,reverse=True)

if K > N: 
    print((0))
else:
    for i in range(K):
        health.pop(0)
    res = sum(health)
    print(res)

# Optimized solution

N, K = list(map(int, input().split()))
Hs = list(map(int,input().split()))
print((sum(sorted(Hs, reverse=True)[K::])))
# Original solution
n,k=list(map(int,input().split()))
h=list(map(int,input().split()))
for i in range(k):
    a=h.index(max(h))
    h[a]=0
print((sum(h)))


# Optimized solution
n,k=list(map(int,input().split()))
h=list(map(int,input().split()))
h.sort()

if k<n:
    print((sum(h[:n-k])))
else:
    print((0))
# Original solution
def c_fennec_vs_monster():
    N, K = [int(i) for i in input().split()]
    H = [int(i) for i in input().split()]
    H.sort()
    for _ in range(K):
        if not H:
            break
        H.pop()
    return sum(H)

print((c_fennec_vs_monster()))

# Optimized solution
def c_fennec_vs_monster():
    N, K = [int(i) for i in input().split()]
    H = sorted([int(i) for i in input().split()])
    return sum(H[:N - min(K, N)])

print((c_fennec_vs_monster()))
# Original solution
n, k = list(map(int, input().split()))
h = list(map(int, input().split()))

for i in range(k):
    h.pop(h.index(max(h)))
    if len(h) == 0:
        break
print((sum(h)))

# Optimized solution
n, k = list(map(int, input().split()))
h = list(map(int, input().split()))
h.sort()
if len(h) > k:
    print((sum(h[:n - k])))
else:
    print((0))
# Original solution
n,k = list(map(int,input().split()))

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

turn = 0

h.sort(reverse = True)

while len(h)>0 and k>0:
    del h[0]
    k -= 1
    
turn += sum(h)

print(turn)

# Optimized solution
n,k = list(map(int,input().split()))

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

if k>=n:
    print((0))
    
else:
    h.sort()
    print((sum(h[:n-k])))
# Original solution
N,K = input().split()
N = int(N)
K = int(K)

H = input().split()
H = [int(s) for s in H]
H.sort(reverse=True)

if N < K:
  print((0))
else:
  for i in range(0,K):
    H.pop(0)

  sumdata = 0
  for i in range(0,len(H)):
    sumdata += H[i]
  print(sumdata)

# Optimized solution
import sys
input = sys.stdin.readline
N,K = input().split()
N = int(N)
K = int(K)

H = input().split()
H = [int(s) for s in H]
H.sort(reverse=True)

if N < K:
  print((0))
else:
  for i in range(0,K):
    H[i] = 0

  sumdata = 0
  for i in range(0,len(H)):
    sumdata += H[i]
  print(sumdata)
# Original solution
# coding: utf-8

import sys
input=sys.stdin.readline

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

if n<=k:
    print((0))
else:
    for _ in range(k):
        h.remove(max(h))
    print((sum(h)))

# Optimized solution
# coding: utf-8

import sys
input=sys.stdin.readline

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

if n<=k:
    print((0))
else:
    h.sort()
    print((sum(h[:len(h)-k])))
# Original solution
n, k = list(map(int, input().split()))
h = list(map(int, input().split()))

h.sort()
ans = 0

for i in range(n-k):
    ans += h[i]

print(ans)

# Optimized solution
n,k = list(map(int,input().split()))
h = list(map(int,input().split()))

h_sort = sorted(h, reverse=True)
ans = sum(h_sort[k:])

print(ans)
# Original solution
N,K = list(map(int,input().split()))
H = [int(x) for x in input().split()]
ld = sorted(H,reverse=True)
for _ in range(K):
    ld[0:1] = []
print((sum(ld)))


# Optimized solution
N,K = list(map(int,input().split()))
H = [int(x) for x in input().split()]
ld = sorted(H,reverse=True)

ld[0:K] = []
print((sum(ld)))
# Original solution
N, K = list(map(int, input().split()))
List = [int(x) for x in input().split()]


for i in range(K):
    if not List:
        print('0')
        exit()
    List.remove(max(List))

print((sum(List)))


# Optimized solution
N, K = list(map(int, input().split()))
List = [int(x) for x in input().split()]

if K == 0:
    print((sum(List)))
    exit()

if N <= K:
    print('0')
    exit()

List.sort(reverse=True)
del List[:K]

print((sum(List)))
# Original solution
# 2020/01/26
# AtCoder Beginner Contest 153 - C

# Input
n, k = list(map(int,input().split()))
h = list(map(int,input().split()))

# Sort Desc.
h.sort()
h.reverse()

if k >= n:
    ans = 0
else:
    sum = 0
    for i in range(k, n):
        sum = sum + h[i]
    
    ans = sum

# Output
print(ans)


# Optimized solution
# 2020/07/26
# AtCoder Beginner Contest 153 - C

# Input
n, k = list(map(int,input().split()))
h = list(map(int,input().split()))

# 降順にソート
h.sort()
h.reverse()
ans = 0

for i in range(n):
    # K回まで必殺技を使う
    if i < k:
        continue
    else:
        ans = ans + h[i]

# Output
print(ans)
# Original solution
a, b = list(map(int, input().split()))
if a < 10 and b < 10:
  print((a*b))
else:
  print((-1))

# Optimized solution
a, b = list(map(int, input().split()))
if a <= 9 and b <= 9:
  print((a*b))
else:
  print((-1))
# Original solution
A, B = list(map(int, input().split()))
 
if A < 10 and B < 10:
    print((A*B))
else:
    print((-1))

# Optimized solution
def takahashi(A,B):
	if A < 10 and B < 10:
		print((A*B))
	else:
		print((-1))
A, B = list(map(int, input().split()))
takahashi(A,B)
# Original solution
a,b = list(map(int,input().split()))
if a < 10 and b < 10:
  print((a*b))
else:
  print((-1))

# Optimized solution
#20:17
a,b = list(map(int,input().split()))
if 0 < a < 10 and 0 < b < 10:
  print((a*b))
else:
  print((-1))
# Original solution
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

A,B = list(map(int,S().split()))

if A<=9 and B<=9:
    print((A*B))
else:
    print((-1))

# Optimized solution
import sys

def S(): return sys.stdin.readline().rstrip()

A,B = list(map(int,S().split()))

if A <= 9 and B <= 9:
    print((A*B))
else:
    print((-1))
# Original solution
a, b = list(map(int, input().split()))
print((a * b if (a >= 1 and a <= 9 and b >= 1 and b <= 9) else -1))

# Optimized solution
a, b = list(map(str, input().split()))
num = [str(x) for x in range(1, 10)]
if a in num and b in num:
  print((int(a)*int(b)))
else:
  print((-1))
# Original solution
a, b = list(map(int, input().split()))
ans = a*b if a<=9 and b<=9 else -1
print(ans)

# Optimized solution
a, b = list(map(int, input().split()))
print((a*b if a<=9 and b<=9 else -1))
# Original solution
a,b = list(map(int, input().split()))
print((a*b if a <10 and b<10 else -1))

# Optimized solution
a,b = list(map(int, input().split()))
print((a*b if a<=9 and b<=9 else -1))
# Original solution
num = [int(_) for _ in input().split(" ")]
if 0<num[0]<10 and 0<num[1]<10:
  print((num[0]*num[1]))
else:
  print((-1))


# Optimized solution
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") # 無限

a,b = list(map(int,input().split()))
if 0<a<10 and 0<b<10:
    print((a*b))
else:
    print((-1))
# Original solution
a, b = list(map(int, input().split()))
if a > 0 and a < 10:
    if b > 0 and b < 10:
        print((a * b))
    else:
        print((-1))
else:
    print((-1))


# Optimized solution
a, b = list(map(int, input().split()))
if 0 < a < 10 and 0 < b < 10: 
    print((a * b))
else:
    print((-1))
# Original solution
A,B = list(map(int, input().split()))
print((A*B if A<=9 and B<=9 else -1))

# Optimized solution
a,b = list(map(int, input().split()))
print((a*b if a<10 and b<10 else -1))
# Original solution
s = input()
a,b = s.split(' ')
a,b = int(a),int(b)

def mul(a,b):
    if a <= 9 and a >=1 and (1 <= b <= 9):
        return a * b
    else:
        return -1

print(mul(a,b))

# Optimized solution
a,b = input().split()

a=int(a)
b=int(b)

if a>=1 and a<=9 and b>=1 and b<=9:
    print((a*b))
else: print("-1")
# Original solution
a, b = list(map(int, input().split()))

if a >= 10 or b >= 10:
    print('-1')
else:
    answer = a * b
    print(answer)


# Optimized solution
a, b = list(map(int, input().split()))

if a >= 10 or b >= 10:
    print('-1')
else:
    print((a * b))
# Original solution
a,b=list(map(int,input().split()))
if a<10 and b<10:
    print((a*b))
else:
    print((-1))

# Optimized solution
a,b=list(map(int,input().split()))

if a>9 or b>9:
    print((-1))
else:
    print((a*b))
# Original solution
a,b = list(map(int, input().split()))
if 1 <= a <= 9 and 1 <= b<=9:
    print((a*b))
else:
    print((-1))

# Optimized solution
A,B = list(map(int, input().split()))
if A >= 10 or B >= 10:
    print((-1))
else:
    print((A*B))
# Original solution
# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()

# int(input())
# map(int, input().split())

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

if 1 <= a <= 9 and 1 <= b <= 9:
    print((a * b))
else:
    print((-1))


# Optimized solution
def main():
    A, B = list(map(int, input().split()))
    print((A * B if 1 <= A <= 9 and 1 <= B <= 9 else -1))


if __name__ == '__main__':
    main()
# Original solution
a,b=list(map(int,input().split()))
print((-1 if a>9 or b>9 else a*b))

# Optimized solution
a,b=list(map(int,input().split()))

if a<=9 and b <=9:
  print((a*b))
else:
  print((-1))
# Original solution
A, B = list(map(int, input().split()))
print((A*B if 1 <= A <= 9 and 1 <= B <= 9 else -1))

# Optimized solution
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B = lr()
print((-1 if max(A, B) >= 10 else A * B))
# Original solution
A,B = list(map(int,input().split()))
if A>=10 or B>=10:
    print((-1))
else:
    print((A*B))

# Optimized solution
A,B = list(map(int,input().split()))
if A<=9 and B<=9:
    print((A*B))
else:
    print((-1))
# Original solution
a, b = list(map(int, input().split()))

if a > 9 or b > 9:
    print((-1))
else:
    print((a*b))

# Optimized solution
a, b = list(map(int, input().split()))
if a<=9 and b<=9:
    print((a*b))
else: print((-1))
# Original solution
a,b=list(map(int,input().split()))
if a<10 and b<10:
  print((a*b))
else:
  print("-1")

# Optimized solution
a,b = list(map(int,input().split()))
if 1<=a<=9 and 1<=b<=9:
  print((a*b))
else:
  print((-1))
# Original solution
A, B = list(map(int, input().split()))

if 1 <= A <= 9 and 1 <= B <= 9:
  print((A * B))
else:
  print((-1))

# Optimized solution
A, B = list(map(int, input().split()))

if A < 10 and B < 10:
  print((A * B))
else:
  print((-1))
# Original solution
a,b=list(map(int,input().split(' ')))

if a<10 and b<10:
  print((a*b))
else:
  print((-1))

# Optimized solution
a, b = list(map(int, input().split(' ')))

if 1<=a<=9 and 1<=b<=9:
  print((a*b))
else:
  print((-1))
# Original solution
s = input()
n1,  n2 = s.split()
n1 = int(n1)
n2 = int(n2)
flag = True
if n1 < 0 or n1 > 9:
	flag = False
if n2 < 0 or n2 > 9:
	flag = False
if flag:
	print(n1 * n2)
else:
	print(-1)

# Optimized solution
N = list(map(int, input().strip().split()))
state=-1
if(N[0]>=1 and N[0] <=9 and N[1]>=1 and N[1] <=9):
  state=N[0]*N[1]
print(state)
# Original solution
a,b=list(map(int,input().split()))
if 1<=a<=9 and 1<=b<=9:
    print((a*b))
else:
    print((-1))

# Optimized solution
a,b=list(map(int,input().split()))
if 1<=a<10 and 1<=b<10:
    print((a*b))
else:
    print((-1))
# Original solution
I = input().split()
print((-1 if int(I[0]) > 9 or int(I[1]) > 9 else int(I[0]) * int(I[1])))

# Optimized solution
I = input().split()
A = int(I[0])
B = int(I[1])
print((-1 if A > 9 or B > 9 else A * B))
# Original solution
a,b=list(map(int,input().split()))

if a<10 and b<10:
  print((a*b))
else:
  print((-1))

# Optimized solution
a,b=list(map(int,input().split()))
print(((-1,a*b)[a<10 and b<10]))
# Original solution
a,b,c=list(map(int,input().split()));print((' YNeos'[a<=c<=b::2].strip()))

# Optimized solution
a,b,c=list(map(int,input().split()));print((['No','Yes'][a<=c<=b]))
# Original solution
A, B, C = list(map(int, input().split()))
 
if (C >= A) & (C <= B):
  print("Yes")
else:
  print("No")

# Optimized solution
A, B, C = list(map(int, input().split()))
 
if C >= A and C <= B:
  print("Yes")
else:
  print("No")
# Original solution
import sys
def MI(): return list(map(int,sys.stdin.readline().rstrip().split()))

A,B,C = MI()
if A <= C <= B:
    print('Yes')
else:
    print('No')

# Optimized solution
import sys
def MI(): return list(map(int,sys.stdin.readline().rstrip().split()))

A,B,C = MI()
print(('Yes' if A <= C <= B else 'No'))
# Original solution
import functools

import os
import sys

sys.setrecursionlimit(10000)
INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


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


def inlf():
    return list(map(float, input().split()))


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


def inpm(line):
    return [inp() for _ in range(line)]


def inpfm(line):
    return [inpf() for _ in range(line)]


def inpsm(line):
    return [inps() for _ in range(line)]


def inlm(line):
    return [inl() for _ in range(line)]


def inlfm(line):
    return [inlf() for _ in range(line)]


def inlsm(line):
    return [inls() for _ in range(line)]


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        ret = fn(*args, **kwargs)
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        print(ret)
        return ret

    return wrapper



a, b, c = inl()
print("Yes" if a <= c <= b else "No")


# Optimized solution
import functools

import os
import sys

sys.setrecursionlimit(10000)
INF = float('inf')


def inp():
    return int(eval(input()))


def inpf():
    return float(eval(input()))


def inps():
    return eval(input())


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


def inlf():
    return list(map(float, input().split()))


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


def inpm(line):
    return [inp() for _ in range(line)]


def inpfm(line):
    return [inpf() for _ in range(line)]


def inpsm(line):
    return [inps() for _ in range(line)]


def inlm(line):
    return [inl() for _ in range(line)]


def inlfm(line):
    return [inlf() for _ in range(line)]


def inlsm(line):
    return [inls() for _ in range(line)]


def Yesif(cond):
    print(('Yes' if cond else 'No'))


def YESIF(cond):
    print(('YES' if cond else 'NO'))


def yesif(cond):
    print(('yes' if cond else 'no'))


a, b, c = inl()
Yesif(a <= c <= b)
# Original solution
N=int(eval(input()))
ans=0
val=2
for i in range(N):
    a=int(eval(input()))
    if i==0:
        ans+=a-1
        val=2
    else:
        if a!=val:
            ans+=(a-1)//val
        else:
            val+=1

print(ans)


# Optimized solution
import sys

input=sys.stdin.readline

N=int(eval(input()))
ans=0
val=2
for i in range(N):
    a=int(eval(input()))
    if i==0:
        ans+=a-1
        val=2
    else:
        if a!=val:
            ans+=(a-1)//val
        else:
            val+=1

print(ans)
# Original solution
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(eval(input()))
a = [None]*n
for i in range(n):
    a[i] = int(eval(input()))
ans = a[0]-1
prev = 1
for i,num in enumerate(a[1:]):
    if prev+1<num:
        while num-(prev+1)>0:
            num -= (prev+1)
            ans += 1
            if num==prev+1:
                num = prev
                break
    prev = max(prev, num)
print(ans)

# Optimized solution
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(eval(input()))
a = [None]*n
for i in range(n):
    a[i] = int(eval(input()))
ans = a[0]-1
prev = 1
for i,num in enumerate(a[1:]):
    if prev+1<num:
        while num-(prev+1)>0:
            v = (num-1)//(prev+1)
            num -= v*(prev+1)
            ans += v
            if num==prev+1:
                num = prev
                break
    prev = max(prev, num)
print(ans)
# Original solution
N=int(eval(input()))
a=[]
for i in range(N):
    a.append(int(eval(input())))

minimum=1
count=0
while a:
   if(minimum<a[0]):
       if a[0]%minimum:
           count+= a[0]//minimum
           a[0]-= a[0]//minimum*minimum
       else :
           count+= (a[0]//minimum-1)
           a[0]= 1
   else:
       minimum=max(minimum,a[0]+1)
       a.pop(0)
print(count)


# Optimized solution
N=int(eval(input()))
a=[0]*N
for i in range(N):
    a[i]=int(eval(input()))

minimum=2
count=a[0]-1
a.pop(0)
for i in  a:
   if(minimum<i):
       if i%minimum:
           count+= i//minimum
       else :
           count+= (i//minimum-1)
   else:
       minimum=max(minimum,i+1)
print(count)
# Original solution
n,*a=list(map(int,open(0).read().split()))
cur=1
ans=a[0]-1
a[0]=1
for x in a:
	if x<=cur:
		pass
	elif x==cur+1:
		cur=x
	else:
		ans+=0--(x-cur-1)//(cur+1)
print(ans)

# Optimized solution
def main():
	n, *a = list(map(int, open(0).read().split()))
	cur = 1
	ans = a[0] - 1
	a[0] = 1
	for x in a:
		if x <= cur:
			pass
		elif x == cur + 1:
			cur = x
		else:
			ans += 0 - -(x - cur - 1) // (cur + 1)
	print(ans)

if __name__=="__main__":
	main()
# Original solution
# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_5_B
# awesome answer: 

def merge(A, left, mid, right):
  cnt = 0
  n1 = mid - left
  n2 = right - mid
  L, R = [0]*(n1+1), [0]*(n2+1)
  for i in range(n1):
    L[i] = A[left + i]
  for i in range(n2):
    R[i] = A[mid + i]
  L[n1] = float("inf")
  R[n2] = float("inf")
  i = 0
  j = 0
  for k in range(left, right):
    cnt = cnt + 1
    if L[i] <= R[j]:
      A[k] = L[i]
      i = i + 1
    else:
      A[k] = R[j]
      j = j + 1
  return cnt

def mergeSort(A, left, right, cnt):
  if left+1 < right:
    mid = int((left + right)/2)
    mergeSort(A, left, mid, cnt)
    mergeSort(A, mid, right, cnt)
    cnt[0] = cnt[0] + merge(A, left, mid, right)

if __name__ == "__main__":
  n = int(eval(input()))
  S = list(map(int, input().split()))
  cnt = [0]
  mergeSort(S, 0, len(S), cnt)
  print((" ".join(map(str, S))))
  print((cnt[0]))

# Optimized solution
count = 0

def merge(A, left, mid, right):
  global count
  n1 = mid - left
  n2 = right - mid
  L = A[left:left+n1]
  R = A[mid:mid+n2]
  L.append(float("inf"))
  R.append(float("inf"))
  i = 0
  j = 0
  for k in range(left, right):
    count += 1
    if L[i] <= R[j]:
      A[k] = L[i]
      i += 1
    else:
      A[k] = R[j]
      j += 1

def mergeSort(A, left, right):
  if left + 1 < right:
    mid = int((left + right)/2)
    mergeSort(A, left, mid)
    mergeSort(A, mid, right)
    merge(A, left, mid, right)

if __name__ == "__main__":
  n = int(eval(input()))
  S = list(map(int, input().split()))
  mergeSort(S, 0, len(S))
  print((" ".join(map(str, S))))
  print(count)