Harryxun/stf_run huggingface dataset:
from itertools import product
# h, w, k = map(int, input().split())
# CHOCO = [list(map(int, input())) for _ in range(h)]
h, w, k = map(int, input().split())
CHOCO = [list(map(int, input())) for _ in range(h)]
INF = 10**5

it = ["01"]*(h-1)
ans = INF
for x in product(*it):
    cnt = sum(map(int, x))
    agg = [[0]*(w) for _ in range(cnt+1)]
    *ls, = map(int, x+('1',))
    for i in range(w):
        prev = c = 0
        for j, split in enumerate(ls):
            if split:
                agg[c][i] = prev+CHOCO[j][i]
                prev = 0
                c += 1
            else:
                prev += CHOCO[j][i]

    tmp = [0]*(cnt+1)
    cannot_split = False

    start = time.time()
    for xyz in zip(*agg):
        cannot_split = False
        can_continue = True
        for i, x in enumerate(xyz):
            if x > k:
                cannot_split = True
                break
            if x+tmp[i] > k:
                can_continue = False
                break

        if cannot_split:
            break

        if can_continue:
            for i, x in enumerate(xyz):
                tmp[i] += x
                continue
        else:
            for i, x in enumerate(xyz):
                tmp[i] = x
            cnt += 1

    if cannot_split:
        continue

    ans = min(ans, cnt)
print(ans)


### FIXED CODE ###

from itertools import product
h, w, k = map(int, input().split())
CHOCO = [list(map(int, input())) for _ in range(h)]
INF = 10**5

it = ["01"]*(h-1)
ans = INF
for x in product(*it):
    cnt = sum(map(int, x))
    agg = [[0]*(w) for _ in range(cnt+1)]
    *ls, = map(int, x+('1',))
    for i in range(w):
        prev = c = 0
        for j, split in enumerate(ls):
            if split:
                agg[c][i] = prev+CHOCO[j][i]
                prev = 0
                c += 1
            else:
                prev += CHOCO[j][i]

    tmp = [0]*(cnt+1)
    cannot_split = False

    for xyz in zip(*agg):
        cannot_split = False
        can_continue = True
        for i, x in enumerate(xyz):
            if x > k:
                cannot_split = True
                break
            if x+tmp[i] > k:
                can_continue = False
                break

        if cannot_split:
            break

        if can_continue:
            for i, x in enumerate(xyz):
                tmp[i] += x
                continue
        else:
            for i, x in enumerate(xyz):
                tmp[i] = x
            cnt += 1

    if cannot_split:
        continue

    ans = min(ans, cnt)
print(ans)
N, M, K = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

A = [0]
B = [0]
for i in range(N):
  A.append(A[i] + a[i])
for i in range(M):
  B.append(B[i] + b[i])
  
ans = 0
j = M
for n in range(N + 1):
  while B[j] > K - A[n]:
      j -= 1
  ans = max(ans, n + j)
print(ans)

### FIXED CODE ###

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

A = [0]
B = [0]
for i in range(N):
  A.append(A[i] + a[i])
for i in range(M):
  B.append(B[i] + b[i])
  
ans = 0
j = M
for n in range(N + 1):
  if A[n] > K:
    break
  while B[j] > K - A[n]:
      j -= 1
  ans = max(ans, n + j)
print(ans)
a, b = map(int, raw???input() ,split())

if a<b :
   print a<b
elif a>b :
   print a>b
elif a == b :
   print a=b

### FIXED CODE ###

a, b = map(int, raw_input().split())
  
if a>b:
  print 'a > b'
elif a<b:
  print 'a < b'
elif a==b:
  print 'a == b'
from sys import stdin
dx = (1, 0, -1, 0)
dy = (0, 1, 0, -1)
H, W = [int(_) for _ in stdin.readline().rstrip().split()]
field = [list(stdin.readline().rstrip()) for _ in range(H)]
seen = [[False for i in range(400)] for j in range(400)]
num_b, num_w = 0, 0
ans = 0

def dfs(h, w):
    print('h: %d, w: %d' % (h, w))
    seen[h][w] = True
    if field[h][w] == '#':
        global num_b
        num_b += 1
    else:
        global num_w
        num_w += 1
    print('b: %d, w: %d' % (num_b, num_w))

    for direction in range(4):
        nh = h + dx[direction]
        nw = w + dy[direction]

        if nh < 0 or nh >= H or nw < 0 or nw >= W:
            continue
        if field[nh][nw] == field[h][w]:
            continue
        if seen[nh][nw]:
            continue

        dfs(nh, nw)

for i in range(H):
    for j in range(W):
        print('i: %d, j: %d' % (i, j))
        if field[i][j] == '.':
            continue
        if seen[i][j]:
            continue
        num_b, num_w = 0, 0
        dfs(i, j)
        ans += num_b * num_w 

print(ans)

### FIXED CODE ###

import sys
from sys import stdin
sys.setrecursionlimit(10**7)
dx = (1, 0, -1, 0)
dy = (0, 1, 0, -1)
H, W = [int(_) for _ in stdin.readline().rstrip().split()]
field = [list(stdin.readline().rstrip()) for _ in range(H)]
seen = [[False for i in range(400)] for j in range(400)]
num_b, num_w = 0, 0
ans = 0

def dfs(h, w):
    seen[h][w] = True
    if field[h][w] == '#':
        global num_b
        num_b += 1
    else:
        global num_w
        num_w += 1

    for direction in range(4):
        nh = h + dx[direction]
        nw = w + dy[direction]

        if nh < 0 or nh >= H or nw < 0 or nw >= W:
            continue
        if field[nh][nw] == field[h][w]:
            continue
        if seen[nh][nw]:
            continue

        dfs(nh, nw)

for i in range(H):
    for j in range(W):
        if field[i][j] == '.':
            continue
        if seen[i][j]:
            continue
        num_b, num_w = 0, 0
        dfs(i, j)
        ans += num_b * num_w 

print(ans)
ABpizza = C*2
cost = 0
if ABpizza <= A+B:
    tmp = min(X,Y)
    cost = cost + ABpizza * tmp
    X = X - tmp
    Y = Y - tmp

    if (cost + X*A + Y*B) >= (cost + (max(X,Y)*ABpizza)):
        cost = cost + ((max(X,Y)*ABpizza))
    else:
        cost = (cost + X*A + Y*B)
else:
    cost = (A*X) + (B*Y)

print(cost)

### FIXED CODE ###

A,B,C,X,Y = map(int, input().split())

ABpizza = C*2
cost = 0
if ABpizza <= A+B:
    tmp = min(X,Y)
    cost = cost + ABpizza * tmp
    X = X - tmp
    Y = Y - tmp

    if (cost + X*A + Y*B) >= (cost + (max(X,Y)*ABpizza)):
        cost = cost + ((max(X,Y)*ABpizza))
    else:
        cost = (cost + X*A + Y*B)
else:
    cost = (A*X) + (B*Y)

print(cost)
K=int(input())

c=K%2

if(c==0):
    print((K/2)^2)
else:
    print(int(K/2)*(int(K/2)+1))


### FIXED CODE ###

K=int(input())

c=K%2

if(c==0):
    print(int((K/2)*(K/2)))
else:
    print(int(K/2)*(int(K/2)+1))
# -*- coding:utf-8 -*-

if __name__ == "__main__":
    A, B = list(map(int, input().split()))
    ans = 0
    for i in range(A, B+1)
        c = str(i)
        if len(c)%2 == 0:
            continue
        J = len(c)
        for j in range(J):
            if c[j] == c[J-1-j]:
                if j == J-1-j:
                    ans += 1
                    break
            else:
                break
        print(ans)


### FIXED CODE ###

# -*- coding:utf-8 -*-

if __name__ == "__main__":
    A, B = list(map(int, list(map(float, input().split()))))
    ans = 0
    for i in range(A, B+1):
        c = str(i)
        length = len(c)
        if length%2 == 0:
            continue
        for j in range(length):
            if c[j] == c[length-1-j]:
                if j == length-1-j:
                    ans += 1
                    break
                continue
            else:
                break
    print(ans)
N = int(input())
A = list(map(int, input().split()))

import numpy as np

ans = 0
for i in range(N):
    if len(A_re) == 0:
        ans = 0
        break
        break
    c = [j for j in A[i]/np.array(A) if j.is_integer() ]
    print(c)
    if len(c) == 1:
        ans += 1
print(ans)

### FIXED CODE ###

from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
p = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    t = x * 2
    while t <= 10 ** 6:
        p[t] = False
        t += x
ans = 0
for x in a:
    if c[x] == 1 and p[x] == True:
        ans += 1
print(ans)
# Fast IO (only use in integer input) or take care about string

import os,io
input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

N = int(input())

ans = 0
for i in range(N):
  ans += (N-i) * (i+1)
for _ in range(N-1):
  a,b = map(int,input().split())
  if a > b:
    c = a
    a = b
    b = c
  ans -= a * (n - b + 1)
print(ans)


### FIXED CODE ###

# Fast IO (only use in integer input) or take care about string
 
import os,io
input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
 
N = int(input())
 
ans = 0
for i in range(N):
  ans += (N-i) * (i+1)
for _ in range(N-1):
  a,b = map(int,input().split())
  if a > b:
    c = a
    a = b
    b = c
  ans -= a * (N - b + 1)
print(ans)
from collections import Counter

s = input()

c = Counter(s)

for i in c:
  if i%2!=0:
    print("No")
    exit()
print("Yes")

### FIXED CODE ###

from collections import Counter

s = list(input())

c = Counter(s)

for i in c.values():
  if i%2!=0:
    print("No")
    exit()
print("Yes")
n = int(raw_input())
minv =  R[0]
maxv = (-1)*10**9

  for j in range(0, n-1):
    if minv >= R[j]:
       minv = R[j]
    if maxv <= R[i+1] - minv:
       maxv = R[i+1] - minv

### FIXED CODE ###

n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9  

for j in range(n-1):
    a = int(raw_input())
    b = a- minv
    if maxv < b:
       maxv = b 
    if minv > a:
       minv = a

print maxv
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = np.int64(input())
    #ans = np.int64((1 + (N - 1)) / 2 * (N - 1))
    ans = np.sum(np.arange(start=1, step=1, stop=N))
    print(ans)
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = np.int64(input())
    #print(N)
    #ans = np.int64((1 + (N - 1)) / 2 * (N - 1))
    ans = (1 + (N - 1)) * (N - 1) // 2
    print(int(ans))
if __name__ == '__main__':
    main()
conv_map = {}
str_result = ""
 
while True:
    conv_map = {}
    str_result = ""
    n=input()
    if n==0:
        break
 
    for idx in range(0, n):
        lst = raw_input().split()
        conv_map[lst[0]] = lst[1]
 
    m=input()
    tmp=""
    for idx in range(0, m):
        tmp=raw_input()
        str_result += conv_map.get(tmp, tmp)
 
    print str_result

### FIXED CODE ###

while True:
    conv_map = {}
    s = ""
    n=input()
    if n==0:
        break

    for x in xrange(n):
        lst = raw_input().split()
        conv_map[lst[0]] = lst[1]

    m=input()
    tmp=""
    for x in xrange(m):
        tmp=raw_input()[0]
        s += conv_map.get(tmp, tmp)

    print s
from operator import itemgetter
from itertools import accumulate
 
n = int(input())
a = (tuple(map(int, input().split())) for _ in range(n))
c, d = (map(itemgetter(i), sorted(a, key=itemgetter(1)) for i in (0, 1))
print('YNeos'[any(x > y for x, y in zip(accumulate(c), d))::2])

### FIXED CODE ###

from itertools import accumulate

n = int(input())
a = sorted(tuple(map(int, input().split()))[::-1] for _ in range(n))
c, d = zip(*a)
print('YNeos'[any(x < y for x, y in zip(c, accumulate(d)))::2])
import bisect
N,M = map(int,input().split())
L_list,M_list = [],[]
for i in range(M):
    l,m = map(int,input().split())
    L_list.append(l)
    M_list.append(m)

L_list.sort()
M_list.sort()
lmax = L_list[-1]
mmin = M_list[0]
min = bisect.bisect_left(n,lmax)
max = bisect.bisect_left(n,mmin)
if min == max:
    ans = 1
else:
    ans = max - min
    ans += 1
print(ans)


### FIXED CODE ###

N,M = map(int,input().split())
lmax,mmin = 0,1000000
for i in range(M):
    l,m = map(int,input().split())
    if lmax < l:
        lmax = l
    if mmin > m:
        mmin = m

if lmax > mmin:
    ans = 0
elif lmax == mmin:
    ans = 1
else:
    ans = mmin-lmax
    ans += 1
print(ans)
TN=input()
list=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]
if TN not in list:
  print("A")
else:
  print("a")


### FIXED CODE ###

a = input()
print('a' if a.islower() else 'A')
N = int(input)

return N^3

### FIXED CODE ###

N = int(input())

print(N**3)
N,W = map(int,input().split())
w = []
v = []
for i in range(N):
    x,y = map(int,input().split())
    w.append(x)
    v.append(y)

dp = [[0]*(W+1) for j in range(N)]

for i in range(N-1,-1,-1):
    for j in range(W+1):
        if j < w[i]:
            dp[i][j] = dp[i+1][j]
        else:
            dp[i][j] = max(dp[i+1][j],dp[i+1][j-w[i]]+v[i])
print(dp[0][W])

### FIXED CODE ###

n,W = map(int,input().split())
w = []
v = []
for i in range(n):
    x,y = map(int,input().split())
    w.append(x)
    v.append(y)

dp = [[0]*(W+1) for j in range(n+1)]

for i in range(n-1,-1,-1):
    for j in range(W+1):
        if j < w[i]:
            dp[i][j] = dp[i+1][j]
        else:
            dp[i][j] = max(dp[i+1][j],dp[i+1][j-w[i]]+v[i])
print(dp[0][W])
import math
n,x=map(int,input().split())
s=list(map(int,input().split()))
b=s[0]
t=abs(s[0]-x)
for i in range(1,n):
    t=math.gcd(t,abs(s[i]-x))   
print(t)    

### FIXED CODE ###

from fractions import gcd 
n,x=map(int,input().split())
s=list(map(int,input().split()))
b=s[0]
t=abs(b-x)
for i in range(1,n):
    t=gcd(t,abs(s[i]-x))   
print(t)
N = int(input())
A = list(map(int, input().split()))
for i in A:
    if i % 2 == 0:
        even_num.append(i)
for j in range(len(even_num)):
    if even_num[j] % 3 != 0 and even_num[j] % 5 != 0:
        print('DENIED')
        exit()
print('APPROVED')

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
even_num = []
for i in A:
    if i % 2 == 0:
        even_num.append(i)
for j in range(len(even_num)):
    if even_num[j] % 3 != 0 and even_num[j] % 5 != 0:
        print('DENIED')
        exit()
print('APPROVED')
n,k = (int(i) for i in input().split())
s = input()
x,y,f,num,ans = [],[],1,0,0
for i in range(n):
    if f and s[i]=="1":
        f = 0
        x.append(i)
    elif 1-f and s[i]=="0":
        f,num = 1,num+1
        y.append(i-1)
if x[0]: num+=1
if int(s[-1]): y.append(n-1)
if num<=k: print(n)
else:
    if x[0]: ans = y[k-1]+1
    for i in range(len(y)-k):
        if x[i]+1: ans = max(y[i+k]-x[i]+1,ans)
        else: ans = max(y[i+k]-x[i],ans)
    print(ans)

### FIXED CODE ###

n,k = (int(i) for i in input().split())
s = input()
x,y,f,num,ans = [],[],1,0,0
for i in range(n):
    if f and s[i]=="1":
        f = 0
        x.append(i)
    elif 1-f and s[i]=="0":
        f,num = 1,num+1
        y.append(i-1)
if x and x[0]: num+=1
if int(s[-1]): y.append(n-1)
if num<=k: print(n)
else:
    if x[0]: ans = y[k-1]+1
    if s[-1]=="0": ans = max(ans,n-x[-k])
    for i in range(len(y)-k): ans = max(y[i+k]-x[i]+1,ans)
    print(ans)
n,k=map(int,input().split())
arr=list(map(int,input().split()))
flag=format(k,'b')[::-1]
l=len(flag)
if k==0:
  print(sum(arr))
elif k==1:
  ans1=sum(arr)
  ans2=0
  for j in arr:
    ans2+=j^1
  print(max(ans1,ans2)
else:
  xor1=0
  cnt=0
  for i in range(l-2,-1,-1):
    for j in arr:
      if j&(2**i)!=0:
        cnt+=1
    if cnt<=n//2:
      xor1+=2**i
  ans1=0
  for i in arr:
    ans1+=i^xor1
  xor2=0
  cnt=0
  for i in range(l-1,-1,-1):
    if flag[i]=='0':
      continue
    for j in arr:
      if j&(2**i)!=0:
        cnt+=1
    if cnt<=n//2:
      xor2+=2**i
    cnt=0
  ans2=0
  for i in arr:
    ans2+=i^xor2
  print(max(ans1,ans2))

### FIXED CODE ###

n,k=map(int,input().split())
arr=list(map(int,input().split()))
flag=format(k,'b')[::-1]
l=len(flag)
xor1=0
cnt=0
for i in range(l-2,-1,-1):
  for j in arr:
    if j&(2**i)!=0:
      cnt+=1
  if cnt<=n//2:
    xor1+=2**i
  cnt=0
ans1=0
for i in arr:
  ans1+=i^xor1
xor2=0
cnt=0
check=False
for i in range(l-1,-1,-1):
  if check==False and flag[i]=='0':
    continue
  for j in arr:
    if j&(2**i)!=0:
      cnt+=1
  if cnt<=n//2:
    if check==True or flag[i]=='1':
      xor2+=2**i
  else:
    if flag[i]=='1':
      check=True
  cnt=0
ans2=0
for i in arr:
  ans2+=i^xor2
print(max(ans1,ans2))
def solv():
    n = int(input())
    A = list(map(int,input().split()))
    B = list(map(int,input().split()))
    ans = 0

    for i in range(n+1):
        x = A[i] + A[i+1]
        ans += min(x,B[i])
        A[i+1] = min(A[i+1],max(x-B[i+1],0))
    return print(ans)

solve()

### FIXED CODE ###

def solv():
    n = int(input())
    A = list(map(int,input().split()))
    B = list(map(int,input().split()))
    ans = 0

    for i in range(n):
        x = A[i] + A[i+1]
        ans += min(x,B[i])
        A[i+1] = min(A[i+1],max(x-B[i],0))
    return print(ans)

solv()
while True:
    h,w = map(int,input().split())
    if h == 0 and w == 0:
        break
    for i in range(h)
        print("#"*w)
    print()

### FIXED CODE ###

while True:
    h,w = map(int,input().split())
    if h == 0 and w == 0:
        break
    for i in range(h):
        print("#"*w)
    print("")
N = int(input())
st = input().split()
a = [int(i) for i in input().split()]
A = sum(a)
b = [int(i) for i in input().split()]
B = sum(b)
def cost(n):
    if n == 0:
        return [0, 0]
    elif n < 0:
        return [0, -n]
    elif n > 0 and n % 2 == 0:
        return [n//2, 0]
    else:
        return [(n+1)//2, 1]

K = B - A
PC = 0
MC = 0
for i in range(N):
    c = cost(b[i] - a[i])
    PC += c[0]
    MC += c[1]
if PC <= K and MC <= K and ((K-PC)*2 == (K-MC)):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

N = int(input())
st = input().split()
a = [0 for i in range(N)]
A = 0
for i in range(N):
    a[i] = int(st[i])
    A += a[i]
st = input().split()
b = [0 for i in range(N)]
B = 0
for i in range(N):
    b[i] = int(st[i])
    B += b[i]
def cost(n):
    if n == 0:
        return [0, 0]
    elif n < 0:
        return [0, -n]
    elif n > 0 and n % 2 == 0:
        return [n//2, 0]
    else:
        return [(n+1)//2, 1]

K = B - A
PC = 0
MC = 0
for i in range(N):
    c = cost(b[i] - a[i])
    PC += c[0]
    MC += c[1]
if PC <= K and MC <= K and ((K-PC)*2 == (K-MC)):
    print("Yes")
else:
    print("No")
from collections import Counter
def solve():
    n = int(input())
    a = list(map(int, input().split()))

    l = Counter(a)
    tw = []
    fo = []
    for i,j in l.items():
        if j >= 2:
            tw.append(i)
        if j >= 4:
            fo.append(i)

    if len(tw) >= 2 or len(fo) >= 1:
        tw.sort()
        fo.sort()
        return max(tw[-1]*tw[-2], fo[-1]**2)
    else:
        return 0
    

print(solve())


### FIXED CODE ###

from collections import Counter
def solve():
    n = int(input())
    a = list(map(int, input().split()))

    l = Counter(a)
    tw = []
    fo = []
    for i,j in l.items():
        if j >= 2:
            tw.append(i)
        if j >= 4:
            fo.append(i)
    ans = 0
    if len(tw) >= 2:
        tw.sort()
        ans = max(ans, tw[-1]*tw[-2])
    if fo:
        fo.sort()
        ans = max(ans, fo[-1]**2)
    
    return ans
    

print(solve())
from sys import stdin
import math
A, B, C, D, E, F = [int(x) for x in stdin.readline().rstrip().split()]

water = set()
for i in range(0, F//(100*A)+1):
    for j in range(0, F//(100*B)+1):
        water.add(A*i*100+B*j*100)

sugar = set()
capa = math.ceil(F/100)*E
for k in range(0, capa//C+1):
    for l in range(0, capa//D+1):
        sugar.add(C*k+D*l)

W = 0
S = 0
conc = 0
#print(water)
#print(sugar)
for w in water:
    for s in sugar:
        if w + s > F:
            continue
        if w+s == 0:
            continue
        if s > (w / 100)*E:
            continue
        tmp = (100*s)/(w+s)
        if tmp >= conc:
            conc = tmp
            W = w
            S = s
        #print(conc,w,s)
print(W+S,S)


### FIXED CODE ###

N = int(input())
A = int(input())

print(N * N - A)
import sys
N = int(input())
A = []
for _ in range(N):
    A.append(int(input())) 

checklis = [0]*max(A)

for i in A:
    lisnumber = i-1
    if checklis[lisnumber] == 0:
        checklis[lisnumber] = 1
    elif checklis[lisnumber] == 1:
        checklis[lisnumber] = 0

print(sum(checklis))

### FIXED CODE ###

import sys
N = int(input())
A = []
for _ in range(N):
    A.append(int(input())) 

# 0の時と、全部が同じ数の時の場合分け。

if N == 1:
    print(1)
    sys.exit()

if set(A) == 1:
    print(0)
    sys.exit()

A = sorted(A)


count = 1
ans = 0
firstnum = A[0] 
for i in range(1,N):
    if firstnum == A[i]:
        count = count + 1
    else:
        if count % 2 == 0:
            count = 1
        else:
            ans = ans + 1
            count = 1

    firstnum = A[i]  

if count%2 == 0:
  ans = ans +0
else:
  ans = ans + 1
print(ans)
N = int(input())
list = [0]*1000000000

for i in range(N):
  A = int(input())
  if list[A-1] == 0:
    list[A-1] = 1
  else:
    list[A-1] = 0
print(sum(list))

### FIXED CODE ###

N = int(input())
A = [int(input()) for i in range(N)]

A.sort()

odd = 0
count = 1
a = A[0]
for i in A[1:]:
  if i == a:
    count += 1
  else:
    a = i
    if count % 2 == 1:
      odd += 1
    count = 1
if count % 2 == 1:
      odd += 1
print(odd)
MOD = 10 ** 9 + 7

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

broken = [False for _ in range(N+1)]
for _ in range(M):
	broken[int(input())] = True

dp = [0 for _ in range(N + 1)]
dp[0] = 1

for i in range(1, N+1):
	if broken[i]:
		continue
  elif i == 1:
    dp[i] = dp[i-1]
	else:
		dp[i] = dp[i-1] + dp[i-2]
		dp[i] %= MOD
print(dp[N])


### FIXED CODE ###

MOD = 10 ** 9 + 7

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

broken = [False for _ in range(N+1)]
for _ in range(M):
	broken[int(input())] = True

dp = [0 for _ in range(N + 1)]
dp[0] = 1
if(broken[1] == False):
  dp[1] = 1

for i in range(2, N+1):
	if broken[i]:
		continue
	else:
		dp[i] = dp[i-1] + dp[i-2]
		dp[i] %= MOD
print(dp[N])
N = int(input())
xy = [list(map(int,input().split())) for i in range(N)]
cst = 1
xy.sort(key = lambda x:x[0])
keep = xy[0]
p = xy[1][0]-xy[0][0]
q = xy[1][1]-xy[0][1]
if N != 1:
    for i in range(1,N-1):
        if not(xy[i][0] == keep[0]+p and xy[i][1] == keep[1]+q):
            cst += 1
            p = xy[i+1][0] - xy[i][0]
            q = xy[i+1][1] - xy[i][1]
            keep = xy[i+1]
else:
    print(1)

print(cst)

### FIXED CODE ###

N = int(input())
xy = [list(map(int,input().split())) for i in range(N)]
x = [xy[i][0] for i in range(N)]
y = [xy[i][1] for i in range(N)]
if N == 1:
    print(1)
    exit()
else:
    ans = N
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            dx,dy = x[j]-x[i],y[j]-y[i]
            cnt = 0
            for k in range(N):
                for l in range(N):
                    if k == l:
                        continue
                    if dx == x[k]-x[l] and dy == y[k]-y[l]:
                        cnt += 1
            ans = min(ans,N-cnt)

print(ans)
#n,a,b,c,d=map(int,input().split())
n=int(input())
a=[int(i) for i in input().split()]
ans=False
c=[]

t=sum(a)//((n*(n+1))//2)

if sum(a)%((n*(n+1))//2)!=0:
    ans=False
else:
    for i in range(n):
        if i==0:
            d=a[0]-a[-1]
        else:
            d=a[i]-a[i-1]
        if (t-d)%n!=0:
            ans=False
            break
        s=(t-d)//n
        c.append(s)
    if sum(c)==t:
        #ans=True
if n==1:
    ans=True
print('YES' if ans else 'NO')

### FIXED CODE ###

#n,a,b,c,d=map(int,input().split())
n=int(input())
a=[int(i) for i in input().split()]
ans=True
c=[]

t=sum(a)//((n*(n+1))//2)

if sum(a)%((n*(n+1))//2)!=0:
    ans=False
else:
    for i in range(n):
        if i==0:
            d=a[0]-a[-1]
        else:
            d=a[i]-a[i-1]
        if (t-d)%n!=0 or d-t>0:
            ans=False
            break
        s=(t-d)//n
        c.append(s)
    #if sum(c)==t:
        #ans=True
if n==1:
    ans=True
print('YES' if ans else 'NO')
import sympy

N = int(input())
total =  0
for i in range(1,N+1):
    a = i * sympy.divisor_count(i)
    total += a
print(total)

### FIXED CODE ###

n=int(input())
ans=0
for i in range(1,n+1): #各iについて、i*(1～n//iまでの総和)を足し合わせればよい
 k=n//i
 ans+=i*(k*(k+1)//2)
print(ans)