Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

import copy
List = []
N, M = (int(x) for x in input().split())
for i in range(N):
    a, b = (int(x) for x in input().split())
    List.append([a, b])

def merge(list):
    mid = len(list)
    if mid > 1:
        left = merge(list[:(mid//2)])
        right = merge(list[(mid//2):])
        list = []
        while len(left) != 0 and len(right) != 0:
            if left[0][0] < right[0][0]:
                list.append(left.pop(0))
            else:
                list.append(right.pop(0))
        if len(left) != 0:
            list.extend(left)
        elif len(right) != 0:
            list.extend(right)
    return list

num_of_drink, total_fee = 0, 0
List = copy.copy(merge(List))

temp_M = M
list_of_num = []
for i in range(N):
    if temp_M <= List[i][1]:
        list_of_num.append(temp_M)
        break
    else:
        list_of_num.append(List[i][1])
        temp_M += -List[i][1]
index = 0
for x in list_of_num:
    total_fee += List[index][0] * x
    index += 1
print(total_fee)

### FIXED CODE ###

List = []
N, M = (int(x) for x in input().split())
for i in range(N):
    a, b = (int(x) for x in input().split())
    List.append([a, b])

num_of_drink, total_fee = 0, 0
List = sorted(List, key=lambda x:x[0])

temp_M = M
list_of_num = []
for i in range(N):
    if temp_M <= List[i][1]:
        list_of_num.append(temp_M)
        break
    else:
        list_of_num.append(List[i][1])
        temp_M += -List[i][1]
index = 0
for x in list_of_num:
    total_fee += List[index][0] * x
    index += 1
print(total_fee)
### BUGGY CODE ###

n = int(input())
diclst = [{} for i in range(n)]
for i in range(n):
  s = input()
  for j in s:
    diclst[i].setdefault(j, 0)
    diclst[i][j] += 1
res = 0
for i in range(n - 1):
  for j in range(i + 1, n):
    if diclst[i] == diclst[j]:
      res += 1
print(res)

### FIXED CODE ###

n = int(input())
dic = {}
for i in range(n):
  temp = 0
  s = input()
  for j in s:
    temp += (12 ** (ord(j) - ord('a') + 1))
  dic.setdefault(temp, 0)
  dic[temp] += 1
#print(dic)
res = 0
for i in dic:
  if dic[i] >= 2:
    res += ((dic[i] * (dic[i] - 1)) // 2)
print(res)
### BUGGY CODE ###

MOD = 10 ** 9 + 7
K = int(input())
M = len(input())
N = M + K

pow25 = [1] * (N + 1)
fac = [1] * (N + 1)
inv = [1] * (N + 1)
for x in range(1, N + 1):
    fac[x] = fac[x - 1] * x % MOD
    pow25[x] = pow25[x - 1] * 25 % MOD
inv[N] = pow(fac[N], MOD-2, MOD)
for x in range(N - 1, -1, -1):
    inv[x] = inv[x + 1] * (x + 1) % MOD

def binom(n, k):
    return fac[n] * inv[n - k] % MOD * inv[k] % MOD

ans = 0
for k in range(M, N + 1):
    ans += binom(N, k) * pow25[N - k] % MOD
    ans %= MOD
print(ans)

### FIXED CODE ###

K = int(input())
S = input()
N = len(S)
mod = int(1e9+7)


wk = pow(26,K,mod)
inv26 = pow(26,-1,mod)

ans = wk
for i in range(1,K+1):
  wk = (wk * 25 * inv26) % mod
  wk = (wk * (N-1+i) * pow(i,-1,mod) % mod)
  ans = (ans + wk)%mod
    
print(ans)
### BUGGY CODE ###

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

L = [x + y + z
    for z in range(K+1)
    for y in range(K+1)
    for x in range(K+1)
    ]
print (L.count(S))

### FIXED CODE ###

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

L = [1 for z in range(K+1) for y in range(K+1) if 0 <= S-y-z <= K]
print (L.count(1))
### BUGGY CODE ###

def gcd(a, b):
    while b:
            a,b=b,a%b
    return a


def lcm(x,y):
    return (x * y) // gcd(x, y)

def atwo(n,m,s,t):
    l=lcm(n,m)
    a=l/n
    b=l/m
    for i in range(n):
        for j in range(m):
            if a*i==b*j:
                if s[i]==t[j]:
                    pass
                else:
                    l=-1

    return l

n,m=map(int,input().split())
print(atwo(n,m,input(),input()))

### FIXED CODE ###

def gcd(a, b):
    while b:
            a,b = b,a%b
    return a

def lcm(x,y):
    return (x * y) // gcd(x, y)

def atwo(n,m,s,t):
    l=lcm(n,m)
    gc=gcd(n,m)
    if s[0::n//gc]==t[0::m//gc]:
        print(l)
        exit()
    else:
        print(-1)
        exit()

n,m=map(int,input().split())
print(atwo(n,m,input(),input()))
### BUGGY CODE ###

N = int(input())
A, T = [0 for i in range(N)], [0 for i in range(N)]
T[0], A[0] = map(int, input().split())

for i in range(1, N):
  dt, da = map(int, input().split())
  for j in range(max(A[i-1]//da, T[i-1]//dt)+3):
    if A[i-1] <= j * da and T[i-1] <= j * dt:
      n = j
      break
      
  T[i], A[i] = dt * n, da * n

print(A[N-1] + T[N-1])

### FIXED CODE ###

import math

N = int(input())
A, T = [0 for i in range(N)], [0 for i in range(N)]
T[0], A[0] = map(int, input().split())

for i in range(1, N):
  dt, da = map(int, input().split())
  for j in range(max(A[i-1]//da, T[i-1]//dt)-1, max(A[i-1]//da, T[i-1]//dt)+3):
    if A[i-1] <= j * da and T[i-1] <= j * dt:
      n = j
      break
      
  T[i], A[i] = dt * n, da * n

print(A[N-1] + T[N-1])
### BUGGY CODE ###

#!/usr/bin/env python3.4
# -*- coding: utf-8 -*-

# abc123_d
import itertools
import math

# input
X, Y, Z, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
# A = range(1000)
# B = range(1000)
# C = range(1000)
# getans
A = sorted(A, reverse=True)
B = sorted(B, reverse=True)
C = sorted(C, reverse=True)
arr = []
for i in range(X):
    for j in range(Y):
        for k in range(Z):
            if i*j*k > K:
                break
            arr.append(A[i]+B[j]+C[k])
#print(len(arr))
arr = sorted(arr, reverse=True)[:K]
# output
ans = '\n'.join(map(str, arr))
print(ans)


### FIXED CODE ###

#!/usr/bin/env python3.4
# -*- coding: utf-8 -*-

# abc123_d
import itertools
import math

# input
X, Y, Z, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
# A = range(1000)
# B = range(1000)
# C = range(1000)
# getans
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)
arr = []
for i in range(X):
    for j in range(Y):
        for k in range(Z):
            if (i+1)*(j+1)*(k+1) > K:
                break
            arr.append(A[i]+B[j]+C[k])
#print(len(arr))
arr.sort(reverse=True)
# output
ans = '\n'.join(map(str, arr[:K]))
print(ans)
### BUGGY CODE ###

import sys
input = sys.stdin.readline
import itertools

def is_saidan(parts):
    tmp = 0
    for j in parts:
        if j > tmp:
            tmp = j
        else:
            break
    else:
        return True
    return False

def snuke_festival(a,b,c):
    comb = list(itertools.product(a,b,c))
    count = 0
    for i in comb:
        if is_saidan(i):
            count += 1
    return count
        
if __name__ == "__main__":
    n = int(input())
    a = list(map(int,input().split()))
    b = list(map(int,input().split()))
    c = list(map(int,input().split()))

    print(snuke_festival(a,b,c))


### FIXED CODE ###

import sys
input = sys.stdin.readline
import bisect
    
def snuke_festival(a,b,c):
    count = 0
    a_sorted = sorted(a)
    b_sorted = sorted(b)
    c_sorted = sorted(c)
    maxlen=len(b)

    for target in b_sorted:
        #mid_a = binary_search_left(a_sorted,target)
        #mid_c = binary_search_right(c_sorted,target)
        mid_a = bisect.bisect_left(a_sorted,target)
        mid_c = bisect.bisect_right(c_sorted,target)
        count += mid_a * (maxlen - mid_c)
        #print("mid_a %d, mid_c %d, count %d" %(mid_a,maxlen - mid_c,count))
    return count

if __name__ == "__main__":
    n = int(input())
    a = list(map(int,input().split()))
    b = list(map(int,input().split()))
    c = list(map(int,input().split()))

    print(snuke_festival(a,b,c))
### BUGGY CODE ###

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

ans = []
for i in range(1,n+1):
    tmp = a.index(i)
    ans.append(tmp+1)
    
print(*ans)

### FIXED CODE ###

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

ans = [0 for _ in range(n)]

for i in range(n):
    ans[a[i] - 1] = i + 1
print(*ans)
### BUGGY CODE ###

import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
s=input()
def Z_algo(S):
    n = len(S)
    LCP = [0]*n
    c = 0#最も末尾側までLCPを求めたインデックス
    for i in range(1, n):
        #i番目からのLCPが以前計算したcからのLCPに含まれている場合
        if i+LCP[i-c] < c+LCP[c]:
            LCP[i] = LCP[i-c]
        else:
            j = max(0, c+LCP[c]-i)
            while i+j < n and S[j] == S[i+j]: j+=1
            LCP[i] = j
            c = i
    LCP[0] = n
    return LCP
ans=0
for i in range(n):
    lcp=Z_algo(s[i:])
    for j in range(len(lcp)):
        tmp=min(j,lcp[j])
        ans=max(ans,tmp)
print(ans)
        

### FIXED CODE ###

import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
s=input()
def Z_algo(S):
    n = len(S)
    LCP = [0]*n
    c = 0#最も末尾側までLCPを求めたインデックス
    for i in range(1, n):
        #i番目からのLCPが以前計算したcからのLCPに含まれている場合
        if i+LCP[i-c] < c+LCP[c]:
            LCP[i] = LCP[i-c]
        else:
            j = max(0, c+LCP[c]-i)
            while i+j < n and S[j] == S[i+j]: j+=1
            LCP[i] = j
            c = i
    LCP[0] = n
    return LCP
ans=0
for i in range(n):
    lcp=Z_algo(s[i:])
    for j in range(len(lcp)):
        tmp=min(j,lcp[j])
        ans=max(ans,tmp)
print(ans)
### BUGGY CODE ###

s = input()
slen = len(s)
ans = 0

while(1):
  s = s.replace("01",'').strip()
  s = s.replace("10",'').strip()
  if not("01" in s or "10" in s):
    break
  

print(slen-len(s))



### FIXED CODE ###

s = input()
print(2*min(s.count("0"),s.count("1")))
### BUGGY CODE ###

from itertools import*
n, *a = map(int, open(0).read().split())
print(min(abs(2*c - sum(a)) for c in list(accumulate(a))))

### FIXED CODE ###

from numpy import*
n, *a = map(int, open(0).read().split())
a = array(a)
print(int(min(abs(cumsum(a)-(sum(a)/2)))*2))
### BUGGY CODE ###

import itertools

x,y,z,K = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))

a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)

r = [i+j for i,j in list(itertools.product(a, b))]
r.sort(reverse=True)

r = [i+j for i,j in list(itertools.product(r[0:K], c))]
r.sort(reverse=True)

for i in range(K):
    print(r[i])


### FIXED CODE ###

x,y,z,k = map(int,input().split())
lisa = list(map(int,input().split()))
lisb = list(map(int,input().split()))
lisc = list(map(int,input().split()))
lisa.sort(reverse=True)
lisb.sort(reverse=True)
lisc.sort(reverse=True)
an = []
ans = []
for num in lisb:
    for nu in lisa:
        an.append(num+nu)
an.sort(reverse=True)
an = an[:min(3001,x*y*z+1)]
for num in lisc:
    for nu in an:
        ans.append(num+nu)
ans.sort(reverse=True)
for i in range(k):
    print(ans[i])
### BUGGY CODE ###

from collections import defaultdict
MAX_A = 10**6

sieve = [[] for _ in range(MAX_A+1)]
# sieve[i] = True if i is prime
# sieve[i] = prime factors of i

for f in range(2, MAX_A + 1):
  if not sieve[f]:
    c = f
    while c <= MAX_A:
      sieve[c].append(f)
      c += f

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

cnt = defaultdict(int)
for a in A:
  for s in sieve[a]:
    cnt[s] += 1

def is_pairwise_coprime():
  return all(v == 1 for v in cnt.values())

def is_setwise_coprime():
  return all(v < N for v in cnt.values())

if is_pairwise_coprime():
  print('pairwise coprime')
elif is_setwise_coprime():
  print('setwise coprime')
else:
  print('not coprime')

### FIXED CODE ###

from collections import defaultdict
MAX_A = 10**6

sieve = [[] for _ in range(MAX_A+1)]
# sieve[i] = True if i is prime
# sieve[i] = prime factors of i

for f in range(2, MAX_A + 1):
  if not sieve[f]:
    c = f
    while c <= MAX_A:
      sieve[c].append(f)
      c += f

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

cnt = defaultdict(int)
for a in A:
  for s in sieve[a]:
    cnt[s] += 1

def is_pairwise_coprime():
  return all(v == 1 for v in cnt.values())

def is_setwise_coprime():
  return all(v < N for v in cnt.values())

if is_pairwise_coprime():
  print('pairwise coprime')
elif is_setwise_coprime():
  print('setwise coprime')
else:
  print('not coprime')
### BUGGY CODE ###

n,m=map(int,input().split())
a=[[[i-1,0]]for i in range(n+1)]
a[0]=[]
for i in range(m):
    l,r,c=map(int,input().split())
    a[l].append([r,c])
q=[float("INF")]*(n+1)
q[1]=0
c=[[1,0]]
while c:
    s,t=c.pop(0)
    for i,j in a[s]:
        if q[i]>t+j:
            q[i]=t+j
            c.append([i,t+j])
print(-1 if q[-1]==float("INF") else q[-1])

### FIXED CODE ###

from heapq import heappush,heappop
n,m=map(int,input().split())
a=[[[i-1,0]]for i in range(n+1)]
a[0]=[]
for i in range(m):
    l,r,c=map(int,input().split())
    a[l].append([r,c])
q=[float("INF")]*(n+1)
q[1]=0
c=[]
heappush(c,[0,1])
while c:
    s,t=heappop(c)
    if t==n:
        print(s)
        break
    for i,j in a[t]:
        if q[i]>s+j:
            q[i]=s+j
            heappush(c,[s+j,i])
else:
    print(-1)
### BUGGY CODE ###

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

ans = 1
for i in range(1,N):
  if P[i] <= min(P[:i]):
    ans +=1

print(ans)

### FIXED CODE ###

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

ans = 0
m_P = P[0]
for i in range(N):
  if P[i] <= m_P:
    ans += 1
    m_P = P[i]
print(ans)
### BUGGY CODE ###

# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""

#f = open("C:/Users/naoki/Desktop/Atcoder/input.txt")
N = int(input())
A = list(map(int, input().split()))
A.insert(0, 0)

select_num = N//2

Dp_f = [[-9999]*(N+1) for _ in range(N+1)]
Dp_s = [[-9999]*(N+1) for _ in range(N+1)]

for i in range(1,N+1):
    Start = (i-1)//2
    End = (i+1)//2

    for j in range(Start,End+1):
        Dp_f[i][j] = max(Dp_s[i-1][j], Dp_f[i-1][j])   
        # [0] in 3rd dimension  not chosen at last num
        # must be transfered from [i-1]
    for j in range(Start,End+1):
        if Dp_f[i-1][j-1] == -9999 and j == 1:
            Dp_s[i][j] = 0 + A[i]
        else:
            Dp_s[i][j] = Dp_f[i-1][j-1]+A[i]

print(max(Dp_f[-1][select_num], Dp_s[-1][select_num]))


### FIXED CODE ###


#f = open("C:/Users/naoki/Desktop/Atcoder/input.txt")
N = int(input())
A = list(map(int, input().split()))
A.insert(0, 0)

select_num = N//2
inf = -10e+100

Dp_f = [[inf] * (3) for _ in range(N+1)]
Dp_s = [[inf] * (3) for _ in range(N+1)]
# 3　次元はそれぞれStart~3つに該当

pre_margin = 0
for i in range(1,N+1):
    Start = (i-1)//2
    End = (i+1)//2
    
    cur_margin = Start
    
    for j in range(Start,End+1):
        Dp_f[i][j-cur_margin] = max(Dp_s[i-1][j-pre_margin], Dp_f[i-1][j-pre_margin])   
        # [0] in 3rd dimension  not chosen at last num
        # must be transfered from [i-1]
    for j in range(Start,End+1):
        if j-1 == 0:
            Dp_s[i][j-cur_margin] = 0 + A[i]
        else:
            Dp_s[i][j-cur_margin] = Dp_f[i-1][j-1-pre_margin]+A[i]
    
    pre_margin = cur_margin
print(max(Dp_f[-1][select_num - cur_margin], Dp_s[-1][select_num - cur_margin]))
### BUGGY CODE ###

import sys
from itertools import accumulate

def main():
  input = sys.stdin.readline
  N, C = map(int, input().split())
  X = []
  V = []
  for _ in range(N):
    x, v = map(int, input().split())
    X.append(x)
    V.append(v)
  Vr = V[::-1]
  Xr = X[::-1]

  F = list(accumulate(V))
  for i in range(N):
    F[i] = F[i] - X[i]

  R = list(accumulate(Vr))
  for i in range(N):
    R[i] = R[i] - (C - Xr[i])

  val = 0
  for i in range(N-1):
    v1 = F[i] + max(R[:-(i+1)]) - X[i]
    v2 = R[i] + max(F[:-(i+1)]) - (C - Xr[i])
    val = max(val, v1, v2)
  
  ans = max(0, val, max(F), max(R))
  print(ans)


if __name__ == '__main__':
  main()

### FIXED CODE ###

import sys
from itertools import accumulate

def main():
  input = sys.stdin.readline
  N, C = map(int, input().split())
  X = []
  V = []
  for _ in range(N):
    x, v = map(int, input().split())
    X.append(x)
    V.append(v)
  Vr = V[::-1]
  Xr = X[::-1]

  F = list(accumulate(V))
  R = list(accumulate(Vr))
  F[0], R[0] = F[0] - X[0], R[0] - (C - Xr[0])
  for i in range(1, N):
    F[i] = max(F[i-1], F[i] - X[i])
    R[i] = max(R[i-1], R[i] - (C - Xr[i]))

  val = 0
  for i in range(N-1):
    v1 = F[i] + R[N-(i+2)] - X[i]
    v2 = R[i] + F[N-(i+2)] - (C - Xr[i])
    val = max(val, v1, v2)
  
  ans = max(0, val, max(F), max(R))
  print(ans)


if __name__ == '__main__':
  main()
### BUGGY CODE ###

N = int(input())
list = [int(i) for i in input().split()]
a = 0

for i in range(N):
  if min(list[:i+1]) >= list[i]:
    a += 1
    
print(a)

### FIXED CODE ###

N = int(input())
list = list(map(int,input().split()))
a = 0
min = list[0]

for i in range(N):
  if min >= list[i]:
    min = list[i]
    a += 1
    
print(a)
### BUGGY CODE ###

# 入力
N = int(input())
p = [float(x) for x in input().split()]

# DPテーブルを初期化
dp = [[0 for x in range(N+1)] for n in range(N+1)]
dp[0][0] = 1

# ループを回す
for i in range(N):
    for x in range(N):
        dp[i+1][x+1] += dp[i][x]*p[i]
        dp[i+1][x] += dp[i][x]*(1-p[i])

# 答えを得て出力
print(sum(dp[N][N//2+1:]))


### FIXED CODE ###

# 入力
N = int(input())
p = [float(x) for x in input().split()]

# DPテーブルを初期化
dp = [[0 for x in range(N+1)] for n in range(N+1)]
dp[0][0] = 1

# ループを回す
for i in range(N):
    for x in range(N):
        dp[i+1][x+1] += dp[i][x]*p[i]
        dp[i+1][x] += dp[i][x]*(1-p[i])

# 答えを得て出力
print(sum(dp[N][N//2+1:]))
### BUGGY CODE ###

N, x = map(int, input().split())
A = [int(a) for a in input().split()]

Ans = float("inf")
minA = [[None for i in range(N)] for j in range(N)]
minA[0] = A
Ans = sum(A) #全て直接捕まえる場合

for i in range(1, N): #i回魔法を唱える
    minA[i][0] = min(minA[i-1][0], A[-i])
    minAsum = minA[i][0]
    for j in range(1, N): #j番目のスライム用に捕まえるスライムの最小時間
        minA[i][j] = min(minA[i-1][j], A[j-i])
        minAsum += minA[i][j]
    Ans = min(Ans, i*x + minAsum)
print(Ans)

### FIXED CODE ###

from copy import deepcopy
N, x = map(int, input().split())
A = [int(a) for a in input().split()]

minA = deepcopy(A)
Ans = sum(minA) #全て直接捕まえる場合
for i in range(1, N): #i回魔法を唱える
    for j in range(N):
        minA[j] = min(minA[j], A[j-i])
    Ans = min(Ans, x * i + sum(minA))
print(Ans)
### BUGGY CODE ###

N = int(input())
As = [[]]
for i in range(N):
    As.append(list(map(int, input().split())))

Cs = [0] * (N + 1)
Ks = [False] * (N + 1)
d = 1
ms = 0
msMax = N * (N - 1) // 2
sw = True
tab = set()
while sw:
    c = 0
    wa = []
    for i in range(1, N + 1):
        if Ks[i]:
            continue
        if Cs[i] == N - 1:
            continue
        a = 0
        b = 0
        if i > As[i][Cs[i]]:
            a = As[i][Cs[i]]
            b = i
        else:
            a = i
            b = As[i][Cs[i]]
        T = a * 10000 + b
        if T in tab:
            ms = ms + 1
            c = c + 1
            if ms == msMax:
                sw = False
                print(d)
                break
            Cs[a] += 1
            Cs[b] += 1
            tab.remove(T)
            wa.append(a)
            wa.append(b)
        else:
            tab.add(T)
            Ks[i] = True
    for i in wa:
        Ks[i] = False
    d += 1
    if c == 0:
        print(-1)
        break

### FIXED CODE ###

import sys

input = sys.stdin.readline
N = int(input())
As = [list(map(int, input().split())) + [-1] for _ in range(N)]

import collections

que = collections.deque([i for i in range(N)])
counters = [0] * N
days = [0] * N
while que:
    player = que.popleft()
    opponent = As[player][counters[player]] - 1
    if As[opponent][counters[opponent]] - 1 == player:
        days[player] = max(days[player], days[opponent]) + 1
        days[opponent] = days[player]
        counters[player] += 1
        counters[opponent] += 1
        que.append(player)
        que.append(opponent)
for c in counters:
    if c < N - 1:
        print(-1)
        break
else:
    print(max(days))
### BUGGY CODE ###

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

for i in range(n):
  if i == 0:
    b = c[i]
  else:
    b = b*c[i]
    


if b>10**18:
  b = -1
print(b)

### FIXED CODE ###

n,*a=map(int,open(0).read().split())
if min(a)==0:
    print(0)
else:
    s=1
    for i in range(len(a)):
       s=s*a[i]
       if s>10**18:
           print(-1)
           break
    else:
        print(s)
### BUGGY CODE ###

def foo(x,y,z):
    return x*(x+y) + y*(y+z) + z*(z+x)

N = int(input())

F = []
for i in range(1,N//6+1):
    for j in range(1,N//6+1):
        for k in range(1,N//6+1):
            X = foo(i,j,k)
            F.append(X)

for i in range(1,N+1):
    print(F.count(i))


### FIXED CODE ###

def foo(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x

N = int(input())

A = [0 for i in range(10050)]

for i in range(1,105):
    for j in range(1,105):
        for k in range(1,105):
            tmp = foo(i,j,k)
            if tmp < 10050:
                A[tmp] += 1

for i in range(1,N+1):
    print(A[i])
### BUGGY CODE ###

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

while c + b > 0 and a + b > 0:
	# print(a, b, c, counter)
	counter += 1
	if c > 0:
		c -= 1
		if b > 0:
			counter += 1
			b -= 1
		else:
			a -= 1
	elif b > 0:
		b -= 1

if c > 0:
	counter += 1
else:
	counter += b

print(counter)

### FIXED CODE ###

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

tmp_eatable = min(b, c)

counter += tmp_eatable * 2
b -= tmp_eatable
c -=tmp_eatable
# print(a, b, c, counter)
if c > 0 :
	tmp_eatable = min(a, c)
	counter += tmp_eatable
	c -= tmp_eatable
	# print(a, b, c, counter)
	if c > 0 :
		counter += 1

else :
	counter += b

print(counter)
### BUGGY CODE ###

N,M = map(int,input().split())
A,B = [],[]
for i in range(N):
    A.append(input())
for i in range(M):
    B.append(input())

for i in range(N-M+1):
    ind = -1
    while B[0] in A[i][ind+1:]:
        ind = A[i].find(B[0])
        ch = 0
        for j in range(1,M-1):
            if A[i][ind:ind+M+1] == B[j]:
                ch = 0
                continue
            else:
                ch = 1
                break
        if ch == 0:
            print('Yes')
            exit()
print('No')


### FIXED CODE ###

N,M = map(int,input().split())
A = [input() for _ in range(N)]
B = [input() for _ in range(M)]
cnt = 0
for i in range(N-M+1):
    for j in range(N-M+1):
        cnt = 0
        for k in range(M):
            if B[k] == A[i+k][j:j+M]:
                cnt += 1
        if cnt == M:
            print('Yes')
            exit()
print('No')
### BUGGY CODE ###

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

A.insert(0,0)
A.append(0)
_A = []
for i in range(1,N+1):
  _A.append(abs(A[i] - A[i-1]))
_A.append(abs(0-A[N]))
allS = sum(_A)


for i in range(0,N):
  allS = sum(_A)
  allS -= _A[i]
  allS -= _A[i+1]
  allS += abs(A[i+2]-A[i])
  print(allS)

### FIXED CODE ###

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

A.insert(0,0)
A.append(0)
_A = []

for i in range(1,N+1):
  _A.append(abs(A[i] - A[i-1]))
_A.append(abs(0-A[N]))
S = sum(_A)


for i in range(0,N):
  allS = S
  allS -= (_A[i]+_A[i+1]-abs(A[i+2]-A[i]))
  print(allS)
### BUGGY CODE ###

#!/usr/bin/env python3
import sys


def solve(N: int):
    n = 0
    for c in range(1, N):
        a = 1
        # print("c",c)
        while a*a < N-c:
            # print("a",a)
            if (N-c) % a == 0:
                n += 2
            a += 1
        if a*a == N-c:
            n += 1
    print(n)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(N: int):
    n = 0
    for c in range(1, N):
        if N % c == 0:
            n += N // c - 1
        else:
            n += N // c
    print(n)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()