Harryxun/stf_run huggingface dataset:
# https://atcoder.jp/contests/agc011/tasks/agc011_a

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

schedule = []
for _ in range(n):
    t = int(input())
    schedule.append(t)
schedule.sort()
# schedule.append(float('inf'))

def check(num, schedule, c, k):
    bus = 0
    start = schedule[0]
    p = 0
    i = 0
    while i < len(schedule):
        s = schedule[i]
        if s <= start + k:
            p += 1
            i += 1
            if p == c:
                bus += 1
                p = 0
                start = schedule[i]
        else:
            start = schedule[i]
            bus += 1
            p = 1
            i += 1
    if p:
        bus += 1
    if bus <= num:
        return True
    return False

l = 0
r = 10 ** 10
ans = float('inf')
while l <= r:
    mid = (l + r) // 2
    if check(mid, schedule, c, k):
        r = mid - 1
        ans = min(ans, mid)
    else:
        l = mid + 1

print(ans)


### FIXED CODE ###

# https://atcoder.jp/contests/agc011/tasks/agc011_a

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

schedule = []
for _ in range(n):
    t = int(input())
    schedule.append(t)
schedule.sort()
# schedule.append(float('inf'))

def check(num, schedule, c, k):
    bus = 0
    start = schedule[0]
    p = 0
    i = 0
    while i < len(schedule):
        s = schedule[i]
        if s <= start + k:
            p += 1
            i += 1
            if p == c:
                bus += 1
                p = 0
                if i == len(schedule):
                    break
                start = schedule[i]
        else:
            start = schedule[i]
            bus += 1
            p = 1
            i += 1
    if p:
        bus += 1
    if bus <= num:
        return True
    return False

l = 0
r = 10 ** 10
ans = float('inf')
while l <= r:
    mid = (l + r) // 2
    if check(mid, schedule, c, k):
        r = mid - 1
        ans = min(ans, mid)
    else:
        l = mid + 1

print(ans)
a,b,c,d = map(int,input().split())
if a+b > c+d:
  print("Left")
elif a+b = c+d:
  print("Balanced")
else:
  print("Right")

### FIXED CODE ###

a,b,c,d = map(int,input().split())
if a+b > c+d:
  print("Left")
elif a+b == c+d:
  print("Balanced")
else:
  print("Right")
ss = input()

for i in range(3):
  if ss[i] = ss[i+1]:
    print("Good")
    break
else:
  print("Bad")

### FIXED CODE ###

ss = input()

for i in range(3):
  if ss[i] == ss[i+1]:
    print("Bad")
    break
else:
  print("Good")
from collections import defaultdict as de
h,w,n=map(int,input().split())
s=[0]*10
c=de(int)
d=[]
for i in range(n):
    a,b=map(int,input().split())
    c[(a,b)]=1
    d.append([a,b])
for e,f in d:
    for i in range(3):
        for j in range(3):
            if 0<=e-i and e+2-i<h:
                if 0<=f-j and f+2-j<w:
                    p=0
                    for t in range(e-i,e+3-i):
                        for u in range(f-j,f+3-j):
                            p+=c[(t,u)]
                    else:
                        s[p]+=1
else:
    s=s[0]+[s[i]//i for i in range(1,10)]
    s[0]=(h-8)*(w-8)-sum(s)
    for i in s:
        print(i)

### FIXED CODE ###

from collections import defaultdict as de
from collections import Counter as C
h,w,n=map(int,input().split())
s=[0]*10
c=de(int)
for i in range(n):
    a,b=map(int,input().split())
    for j in range(max(2,a-1),min(a+2,h)):
        for q in range(max(2,b-1),min(b+2,w)):
            c[(j,q)]+=1
a=C(c.values())
print((h-2)*(w-2)-sum(a.values()))
for i in range(1,10):
    print(a[i])
import math

n, m = map(int, input().split())
w = 10 ** 9 + 7
if n + 1 == m or m + 1 == n:
    print(math.factorial(min(n, m)) ** 2 * max(n, m) % w)
elif n == m:
    print(2 * math.factorial(n) ** 2 % w)
else:
    print(0)


### FIXED CODE ###

x,a,b=map(int,input().split())
if b<=a:
    print("delicious")
elif b-a<=x:
    print("safe")
else:
    print("dangerous")
n = int(input())

a = sorted(list(map(int, input().split())), reversed=True)
ans = sum(a[::2]) - sum(a[1::2])
print(ans)

### FIXED CODE ###

n = int(input())

a = sorted(list(map(int, input().split())), reverse=True)
ans = sum(a[::2]) - sum(a[1::2])
print(ans)
n = int(input())
ans = 0
for b in range(33):
  for p in range(2,10):
    if b**p > x:
      break
    ans = max(ans, b**p)
print(ans)    

### FIXED CODE ###

x = int(input())
ans = [b**p for b in range(1001) for p in range(2,10)
      if b**p <= x]
print(max(ans))
a,b = map(int,input().split())

cnt = 0
hole = a
if b<=a:
    cnt = 1
elif:
    for i in range(b/a + 10):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
            else:
                pass
print(cnt)


### FIXED CODE ###

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

cnt = 0
hole = a
if b==1:
    cnt = 0

elif b!=1 and a>=b:
    cnt = 1
else:
    for i in range(pow(2,10)):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
                break
            else:
                pass
print(cnt)
N, K = map(int, input().split())
h = [int(input()) for i in range(N)]

h.sort()

min_h = 1000000000

for i in range(K - 1, N):
    min_h = min(min_h, h[i] - h[i - K + 1])

print(min_h)


### FIXED CODE ###

D = int(input())

if D == 25:
    print('Christmas')
elif D == 24:
    print('Christmas Eve')
elif D == 23:
    print('Christmas Eve Eve')
else:
    print('Christmas Eve Eve Eve')
n, m = map(int, input().split())
li = [list(map(int, input().split())) for i in range(m)]

left = 0
right = n

for i in li):
  left = max(i[0], left)
  right = min(i[1], right)
  
print(right - left + 1)

### FIXED CODE ###

n, m = map(int, input().split())
li = [list(map(int, input().split())) for i in range(m)]

left = 0
right = n

for i in li:
  left = max(i[0], left)
  right = min(i[1], right)
  
if right < left:
  print(0)
else:
  print(right - left + 1)
n = input()

#3桁なのでとても簡単

if n[0] == n[2]:
  print("Yes"):
else:
  print("No")

### FIXED CODE ###

n = list(input())

for i in range(len(n)):
  if n[i] != n[len(n)-i-1]:
    print("No")
    exit()
print("Yes")
x,y,z,k=map(int,input().split())
a=tuple(map(int,input().split()))
b=tuple(map(int,input().split()))
c=tuple(map(int,input().split()))
 
def f(p,q):
    return sorted([i+j for j in q for i in p])[::-1][:k]
 
if x+y<y+z:
    for i in sorted(f(c,f(a,b)))[::-1][:k]:
        print(i)
elif x+z<y+z:
    for i in sorted(f(b,f(a,c)))[::-1][:k]:
        print(i)
else:
    for i in sorted(f(a,f(b,c)))[::-1][:k]:
        print(i)

### FIXED CODE ###

from itertools import*
a,b,c,d,e,k=map(int,open(0).read().split())
x=[a,b,c,d,e]
for i in combinations(x,2):
    p,q=list(i)
    if abs(p-q)>k:
        print(":(")
        exit()
print("Yay!")
S = input()
s = list(map(int, S)
t = s.copy()
x = 0
y = 1

if t[0] == 0:
    t[0]=1
else:
    t[0]=0

for i in s:
    if s[i+1]==0 and s[i+1] == s[i]:
    	s[i+1]=1
    	x +=1
    elif s[i+1]==1 and s[i+1]==s[i]:
    	s[i+1]=0
    	x +=1

for i in t:
    if t[i+1]==0 and t[i+1] == t[i]:
    	t[i+1]=1
    	y +=1
    elif t[i+1]==1 and t[i+1]==t[i]:
    	t[i+1]=0
    	y +=1

print(min([x,y]))


### FIXED CODE ###

S = input()
s = list(map(int, S))
t = s.copy()
n = len(s)
x = 0
y = 1

if t[0] == 0:
    t[0]=1
else:
    t[0]=0

for i in range(n-1):
    if s[i+1]==0 and s[i+1] == s[i]:
    	s[i+1]=1
    	x +=1
    elif s[i+1]==1 and s[i+1]==s[i]:
    	s[i+1]=0
    	x +=1
    
for i in range(n-1):
    if t[i+1]==0 and t[i+1] == t[i]:
    	t[i+1]=1
    	y +=1
    elif t[i+1]==1 and t[i+1]==t[i]:
    	t[i+1]=0
    	y +=1

print(min([x,y]))
s = input()
print(s[0] + len(s[:-2]) + s[-1])

### FIXED CODE ###

s = input()
print(s[0] + str(len(s[:-2])) + s[-1])
#escape_ck_ans
c=[]
for i in range(3):
    c.append(list(map(int,input().split())))
a=[0]*3
b=[0]*3
a[0]=0#一つ固定する
a[1]=c[1][1]-c[0][1]
a[2]=c[2][2]-c[0][2]
b[0]=c[0][0]
b[1]=c[0][1]
b[2]=c[0][2]
flag=True
for i in range(3):
    for j in range(3):
        if c[i][j]!=a[i]+b[i]:
            flag=False
if flag=True:
    print("Yes")
else:
    print("No")
""" 
print("Yes") if flag(is true) else print("No")
"""

### FIXED CODE ###

#escape_ck_ans
c=[]
for i in range(3):
    c.append(list(map(int,input().split())))
a=[0]*3
b=[0]*3
a[0]=0#一つ固定する
a[1]=c[1][1]-c[0][1]
a[2]=c[2][2]-c[0][2]
b[0]=c[0][0]
b[1]=c[0][1]
b[2]=c[0][2]
flag=True
for i in range(3):
    for j in range(3):
        if c[i][j]!=a[i]+b[j]:
            flag=False
if flag==True:
    print("Yes")
else:
    print("No")
""" 
print("Yes") if flag(is true) else print("No")
"""
b = ["the", "this", "that"]
while 1:
        try:
                a = raw_input()
        except IndexError:
                break
        for y in range(26):
                for x in b:
                        if x in a:
                                print a
                                break
                a = list(a)
                print a
                for x in range(len(a)):
                        if a[x] == "z":
                                a[x] = "a"
                        elif "a" <= a[x] < "z":
                                a[x] = chr(ord(a[x])+1)
                a = "".join(a)

### FIXED CODE ###

b = ["the", "this", "that"]
while 1:
        try:
                a = raw_input()
        except EOFError:
                break
        for y in range(26):
                for x in b:
                        if x in a:
                                print a
                                break
                a = list(a)
                for x in range(len(a)):
                        if a[x] == "z":
                                a[x] = "a"
                        elif "a" <= a[x] < "z":
                                a[x] = chr(ord(a[x])+1)
                a = "".join(a)
a, b, c = input()
if a == b == c:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

a, b, c = input().split()
if a == b == c:
    print("Yes")
else:
    print("No")
def resolve():
    N,A,B = map(int,input().split())
    div,mod = divmod(N,A+B)
    pattern = "b"*A+"r"*B
    array = ''
    array+= pattern*div + pattern[:mod]
    print(array.count("b"))
resolve()

### FIXED CODE ###

N,A,B = map(int,input().split())
div,mod = divmod(N,A+B)
print(div*A+min(mod,A))
a,b=map(int,input().split());print(["Even","Odd"][a*b%2]

### FIXED CODE ###

a,b=map(int,input().split())
if a*b%2==0:
    print ("Even")
else :
    print ("Odd")
from collections import deque
n = int(input())
l = deque([int(input()) for _ in range(n)][::-1])
m = l.copy()

for i in range(len(l)):
    num = m.pop()
    print(max(m))
    m.appendleft(num)

### FIXED CODE ###

n = int(input())
l = [int(input()) for _ in range(n)]
max_num = max(l)
second_num = sorted(l)[-2]

for i in range(n):
   if l[i] == max_num:
       print(second_num)
   else:
       print(max_num)
S = list(input())
i = 0
while i < len(S)-2:
    j = i+1
    if S[i] == S[j]:
        print(i, j)
        break
    else:
        k = i+2
        if S[i] == S[k] or S[j] == S[k]:
            print(i, k)
            break
        else:
            i += 3
else:
    if i == len(S) - 2:
        if S[i] == S[i+1]:
            print(i, i+1)
        elif S[i] == S[i+2]:
            print(i, i+2)
        elif S[i+1] == S[i+2]:
            print(i+1, i+2)
        else:
            print(-1, -1)
    elif i == len(S) - 1 and S[i] == S[i+1]:
        print(i, i+1)
    else:
        print(-1, -1)

### FIXED CODE ###

S = list(input())
i = 0
while i <= len(S)-3:
    if S[i] == S[i+1]:
        print(i+1, i+2)
        break
    elif S[i] == S[i+2]:
        print(i+1, i+3)
        break
    i += 1
else:
    if S[i] == S[i+1]:
        print(i+1, i+2)
    else:
        print(-1, -1)
n,k=int(input().split())
s=input()
print(s[:k-1]+s.replace(s[k-1], s[k-1].lower())+s[k:])

### FIXED CODE ###

n,k=map(int,input().split())
s=input()
new=s[k-1:k]
news=new.lower()
print(s[:k-1]+news+s[k:])
A,B=map(int,input().split())
if (A==2 or B==2:
    print("No")
else:
    print("Yes")

### FIXED CODE ###


A,B=map(int,input().split())
if A==2 or B==2:
    print("No")
else:
    print("Yes")
while True:
 x,y =map(int,raw_input.split())
 if(x==y==0):
   break
 elif(x>y):
  print x y  
 elif(x<=y):
  print y x

### FIXED CODE ###

while True:
 x,y =map(int, raw_input().split())
 if(x==0 and y==0):
   break
 elif(x>y):
  print y,x  
 elif(x<=y):
  print x,y
N = int(input())
sum = 0
for k in range(N):
  for j in range(k):
  	if k % j == 0：
    	sum += k
print(sum)

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1, n + 1):
    y = n // i
    ans += y * (y + 1) * i // 2
print(ans)
import fractions

def lcm(a, b):
    return a * b / fractions.gcd(a, b)

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

d_N = {}

for n in range(N):
    d = fractions.gcd(n, N)
    d_N[(n // d, N // d)] = n

for m in range(M):
    d = fractions.gcd(m, M)
    k = (m // d, M // d)
    if k in d_N:
        if S[d_N[k]] != T[m]:
            print(-1)
            exit()

L = int(lcm(N, M))
i = 1
while True:
    flag = True
    L_ = L * i
    a = ['0'] * L_
    for j in range(N):
        a[L_ // N * j] = S[j]
    
    for j in range(M):
        if (a[L_ // M * j] != '0') and (a[L_ // M * j] != T[j]):
            flag = False
            break

    if flag:
        print(L_)
        exit()

    i += 1
            







### FIXED CODE ###

import fractions

def lcm(a, b):
    return a * b / fractions.gcd(a, b)

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

d_N = {}

for n in range(N):
    d = fractions.gcd(n, N)
    d_N[(n // d, N // d)] = n

for m in range(M):
    d = fractions.gcd(m, M)
    k = (m // d, M // d)
    if k in d_N:
        if S[d_N[k]] != T[m]:
            print(-1)
            exit()

L = int(lcm(N, M))
print(L)
n, m = map(int, input().split())
py = []
mli = [0]*m
li = [""]*m

for i in range(m):
    p,y = map(int, input().split())
    py.append([p,y,i])

py.sort(key=lambda x: x[1])

for p,y,i in py:
    mli[p] += 1
    pi = '{0:05d}'.format(p)
    yi = '{0:05d}'.format(mli[p])
    li[i] = str(pi)+str(yi)

for i in li:
    print(i)

### FIXED CODE ###

n, m = map(int, input().split())
py = []
mli = [0]*n
li = [""]*m

for i in range(m):
    p,y = map(int, input().split())
    py.append([p,y,i])

py.sort(key=lambda x: x[1])

for p,y,i in py:
    mli[p-1] += 1
    pi = str(p).zfill(6)
    yi = str(mli[p-1]).zfill(6)
    li[i] = pi+yi

for i in li:
    print(i)
import sys
input = sys.stdin.readline

X, Y, A, B, C = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))
p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)
l = p[:X]+q[:Y]
l.sort()
s = sum(l)
ans = s

for i in range(C):
    ans = max(ans, s-l[i]+r[i])

print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline
from heapq import *

X, Y, A, B, C = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))
p.sort(reverse=True)
q.sort(reverse=True)
pq = []
ans = 0

for i in range(X):
    heappush(pq, p[i])
    ans += p[i]

for i in range(Y):
    heappush(pq, q[i])
    ans += q[i]

r.sort(reverse=True)
now = ans

for i in range(C):
    now -= heappop(pq)
    heappush(pq, r[i])
    now += r[i]
    ans = max(ans, now)

print(ans)
#!/usr/bin/env python3

def dist(x, y):
    assert 0 <= y <= x
    return min(y, x - y)

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

    x = ai[-1]
    y = ai[0]
    for i in range(n - 1):
        if dist(x, ai[i]) > dist(x, y):
            y = ai[i]

    print(f"{x} {y}")

main()


### FIXED CODE ###

#!/usr/bin/env python3

def dist(x, y):
    assert 0 <= y <= x
    return min(y, x - y)

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

    x = ai[-1]
    y = ai[0]
    for i in range(n - 1):
        if dist(x, ai[i]) > dist(x, y):
            y = ai[i]

    print("%d %d" % (x, y))

main()
from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

def main():
    N, M = map(int, input().split())
    A = [-1] + [int(input()) for i in range(M)] + [N + 1]

    d = [0] * (len(A) - 1)
    for i in range(len(A) - 1):
        if A[i+1] - A[i] == 1:
            print(0)
            exit(0)
        d[i] = A[i+1] - 1 - (A[i] + 1)
        if d[i] == 0:
            d[i] = 1

    ans = 1
    for dd in d:
        tmp = 0
        for j in range(round(dd/2) + 1):
            tmp += cmb(dd - j, j)
        ans *= tmp

    print(ans%1000000007)

if __name__ == '__main__':
    main()


### FIXED CODE ###

import math
def cmb(n, r, mod, g1, g2):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

def main():
    N, M = map(int, input().split())
    A = [-1] + [int(input()) for i in range(M)] + [N + 1]

    mod = 10**9+7 #出力の制限
    N = 10**5
    g1 = [1, 1] # 元テーブル
    g2 = [1, 1] #逆元テーブル
    inverse = [0, 1] #逆元テーブル計算用テーブル
    for i in range( 2, N + 1 ):
        g1.append( ( g1[-1] * i ) % mod )
        inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
        g2.append( (g2[-1] * inverse[-1]) % mod )

    d = [0] * (len(A) - 1)
    for i in range(len(A) - 1):
        if A[i+1] - A[i] == 1:
            print(0)
            exit(0)
        d[i] = A[i+1] - 1 - (A[i] + 1)

    ans = 1
    for dd in d:
        if dd > 1:
            tmp = 0
            for j in range(dd//2 + 1):
                tmp += cmb(dd - j, j, mod, g1, g2)
            ans *= tmp

    print(ans % 1000000007)

if __name__ == '__main__':
    main()
D, N = map(int, input().split())
a = np.arange(100**D, 100**D*(N+1), 100**D)
print(a[-1])

### FIXED CODE ###

D, N = map(int, input().split())
print(100**D*N) if N!=100 else print(100**D*(N+1))
x=int(input())
y=int(input())
print(int(y/x) if (y%x)==0 else int(y/x)+1)

### FIXED CODE ###

A,B=map(int,input().split())
M=A
a=1
if B==1:
  print(0)
else:
  for i in range(19):
    if M>=B:
      print(a)
      break
    a+=1
    M+=A-1
import math
N, K = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse = True)

ans_l = 0
ans_h = A[0]
while ans_l != ans_h:
    ans_m = (ans_l + ans_h) // 2
    tmp_n = 0
    for a in A:
        tmp_n += math.ceil(a / ans_m) - 1
    if tmp_n > K:
        ans_l = ans_m + 1
    else:
        ans_h = ans_m

print(ans_h)

### FIXED CODE ###

X = int(input())

print("Yes") if X >= 30 else print("No")
import sys

for line in sys.stdin.readline():
	a, b = map(int, line.split())
	print a + b

### FIXED CODE ###

import sys

for line in sys.stdin.readlines():
	a, b = map(int, line.split())
	print a + b
n = int(input())
a = [int(i) for i in input().split()]

j_Aj = [0]
i_Ai = [0] * (max(j_Aj)+1)

for j, aj in enumerate(a):
    j_Aj.append(j + 1 - aj)
ans = 0
for j, j_aj in enumerate(j_Aj):
    if j == 0:
        continue
    if j_aj >= 2:
        ans += i_Ai[j_aj]
    if j + a[j - 1]<=max(j_Aj):
        i_Ai[j + a[j - 1]] += 1
print(ans)

### FIXED CODE ###

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

j_Aj = [0]

for j, aj in enumerate(a):
    j_Aj.append(j + 1 - aj)
maxj=max(j_Aj)
i_Ai = [0] * (maxj+1)
ans = 0
for j, j_aj in enumerate(j_Aj):
    if j == 0:
        continue
    if j_aj >= 2:
        ans += i_Ai[j_aj]
    if j + a[j - 1]<=maxj:
        i_Ai[j + a[j - 1]] += 1
print(ans)
import sys
d={' ':'101',"'":'000000',',':'000011','-':'10010001','.':'010001','?':'000001','A':'100101','B':'10011010','C':'0101','D':'0001','E':'110',
'F':'01001','G':'10011011','H':'010000','I':'0111','J':'10011000','K':'0110','L':'00100','M':'10011001','N':'10011110','O':'00101','P':'111',
'Q':'10011111','R':'1000','S':'00110','T':'00111','U':'10011100','V':'10011101','W':'000010','X':'10010010','Y':'10010011','Z':'10010000'}
for e in sys.stdin:
 a=''.join(d[c]for c in e.strip())
 l=len(a)+4
 b=a.ljust(l//5*5,'0')
 print(''.join("ABCDEFGHIJKLMNOPQRSTUVWXYZ .,-'?"[int(b[i:i+5],2)]for i in range(0,l,5)))


### FIXED CODE ###

import sys
d={' ':'101',"'":'000000',',':'000011','-':'10010001','.':'010001','?':'000001','A':'100101','B':'10011010','C':'0101','D':'0001','E':'110',
'F':'01001','G':'10011011','H':'010000','I':'0111','J':'10011000','K':'0110','L':'00100','M':'10011001','N':'10011110','O':'00101','P':'111',
'Q':'10011111','R':'1000','S':'00110','T':'00111','U':'10011100','V':'10011101','W':'000010','X':'10010010','Y':'10010011','Z':'10010000'}
for e in sys.stdin:
 a=''.join(d[c]for c in e[:-1])
 a+='0'*(-len(a)%5)
 print(''.join("ABCDEFGHIJKLMNOPQRSTUVWXYZ .,-'?"[int(a[i*5:i*5+5],2)]for i in range(len(a)//5)))
N = int(input())
a = list(map(int,input().split()))
cnt = 0
ind = 1
while A != []:
  A = list(map(lambda x: x - 1, A))
  if(0 in A):
    zero = A.count(0)
    if(zero > ind):
      cnt += abs(zero - ind)
    elif(zero < ind):
      cnt += zero
    A = filter(lambda n: n != 0, A)
  ind += 1
print(cnt)

### FIXED CODE ###

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

d = {}
for i in range(N):
  if(a[i] not in d):
    d[a[i]] = 1
  else:
    d[a[i]] += 1
cnt = 0
for k, v in d.items():
  if(k > v):
    cnt += v
  elif(k < v):
    cnt += v - k
print(cnt)
n, q = map(int, input().split())
t = [[] for i in range(n)]
for i in range(n-1):
    a, b = map(int, input().split())
    t[a - 1].append(b -1)
    t[b - 1].append(a -1)

v = [0] * (n)
for j in  range(q):
    a, b = map(int, input().split())
    v[a-1] += b


def csum(now, bef):
    for nxt in t[now]:
        if nxt != bef:
            v[nxt] += v[now]
            dfs(nxt, now)

csum(0, -1)
print(*v)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
input=sys.stdin.readline

n, q = map(int, input().split())
t = [[] for i in range(n)]# 空の2次元配列を作る
for i in range(n-1):
    a, b = map(int, input().split())
    t[a - 1].append(b -1)
    t[b - 1].append(a -1)
# 配列は０から始まるから１、２、３、４の木を０、１、２、３として扱ってる
# 配列の０番目（つまり頂点０）が持つ値がその頂点が持つリンクとなる

v = [0] * (n) #空の配列を作る
for j in  range(q):# 0からqまで
    a, b = map(int, input().split())
    v[a-1] += b


def csum(now, bef):  # 累積和
    for nxt in t[now]:
        if nxt != bef:
            v[nxt] += v[now]
            csum(nxt, now)

csum(0, -1)
print(*v)
N,x = list(map(int,input().split()))
a=list(map(int,input().split()))

eat=0

if a[0]>x:
  eat+=a[0]-x
  a[0]=x

if a[N-1]>x:
  eat+=a[N-1]-x
  a[N-1]=x
  
for i in range(N-1):
  print(eat,a)
  if a[i]+a[i+1]>x:
    eat+=a[i+1]-x+a[i]
    a[i+1]=x-a[i]
    
print(eat)

### FIXED CODE ###

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

eat=0

if a[0]>x:
  eat+=a[0]-x
  a[0]=x

if a[N-1]>x:
  eat+=a[N-1]-x
  a[N-1]=x
  
for i in range(N-1):
  if a[i]+a[i+1]>x:
    eat+=a[i+1]-x+a[i]
    a[i+1]=x-a[i]
    
print(eat)
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    N=ii()
    j = math.ceil((N+1)**0.5)

    ans = [0] * (N+1)
    for x in range(1,j+1):
        for y in range(1,j+1):
            for z in range(1,j+1):
                n = x**2+y**2+z**2+x*y+y*z+z*x
                if 1<=n<=N:
                    ans[n] += 1
            
        
    print(*ans[1:],sep="\n")

                


if __name__ == "__main__":
    main()


### FIXED CODE ###

import math
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    N=ii()
    j = math.ceil((N+1)**0.5)

    ans = [0] * (N+1)
    for x in range(1,j+1):
        for y in range(1,j+1):
            for z in range(1,j+1):
                n = x**2+y**2+z**2+x*y+y*z+z*x
                if 1<=n<=N:
                    ans[n] += 1
            
        
    print(*ans[1:],sep="\n")

                


if __name__ == "__main__":
    main()