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

N,K = map(int, input().split())
# As = [N//i for i in range(1,int(N**0.5)+1)]
# Bs = [As[i]-As[i+1] for i in range(len(As)-1)]
# Bs[0] -= 1
# Bs = sorted(Bs) + [1]
As = [] 
for i in range(1,int(N**0.5)+1):
    As.append(i)
    if N//i != i:
        As.append(N//i)
As = sorted(As,reverse=False)
nums = []
for i in range(len(As)-1):
    nums.append(As[i+1]-As[i])
nums = [1] + nums
nums.reverse()
mod = 10**9 + 7
ans = 0
dp = [[0] * len(As) for i in range(K+1)]


from itertools import accumulate
# print(As,nums)
dp[0][0] = 1
for i in range(K):
    # 1だと全通り分が成り立つし、Nだと1通り。
    # それぞれ種別にまとまっているので、それらをかける
    acc = list(accumulate(dp[i]))
    for j in range(len(As)):
        dp[i+1][len(As)-j-1] = acc[j]*nums[j]%mod
print(sum(dp[K])%mod)


### FIXED CODE ###

from itertools import accumulate

N,K = map(int, input().split())
As = [] 
for i in range(1,int(N**0.5)+1):
    As.append(i)
    if N//i != i:
        As.append(N//i)
As = sorted(As,reverse=False)
nums = []
for i in range(len(As)-1):
    nums.append(As[i+1]-As[i])
nums = [1] + nums
nums.reverse()
mod = 10**9 + 7
ans = 0
dp = [[0] * len(As) for i in range(K+1)]


dp[0][0] = 1
for i in range(K):
    # 1だと全通り分が成り立つし、Nだと1通り。
    # それぞれ種別にまとまっているので、それらをかける
    acc = list(accumulate(dp[i]))
    for j in range(len(As)):
        dp[i+1][len(As)-j-1] = acc[j]*nums[j]%mod
print(sum(dp[K])%mod)
### BUGGY CODE ###

n = int(input())
a = [int(input()) for _ in range(n)]

for i in range(n):
    b = a[:i] + a[i+1:]
    print(max(b))

### FIXED CODE ###

n = int(input())
a = [int(input()) for _ in range(n)]

max_v1 = max(a)
max_i1 = a.index(max_v1)
a.remove(max_v1)
max_v2 = max(a)

for i in range(n):
    if i == max_i1:
        print(max_v2)
    else:
        print(max_v1)
### BUGGY CODE ###

def main():
    N, M = list(map(int, input().split(' ')))
    s = M // N
    r = M % N
    while True:
        if r%s == 0:
            print(s)
            break
        s -= 1
        r = M - s * N


if __name__ == '__main__':
    main()

### FIXED CODE ###

import math

def main():
    N, M = list(map(int, input().split(' ')))
    s = min(math.ceil(math.sqrt(M)), M//N)
    ret = []
    while s > 0:
        if M%s == 0:
            a = M//s
            ret.append(a)
            ret.append(s)
        s -= 1
    print(max([s for s in ret if s <= M//N]))



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

import math
from functools import reduce
from itertools import *
def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

K = int(input())
ans = 0
for i in product([i for i in range(1,K+1)], repeat = 3):
  ans += gcd(i[0],i[1],i[2])
print(ans)

### FIXED CODE ###

import math
from functools import reduce
from itertools import *
def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
 
K = int(input())
ans = 0
for i in product([i for i in range(1,K+1)], repeat = 3):
  ans += gcd(i[0],i[1],i[2])
print(ans)
### BUGGY CODE ###

s = list(input())
q = int(input())
for i in range(q):
  d = input()
  if len(d) == 5:
    a, b, c = list(d.split())
    a = int(a)
    b = int(b)
    if b == 1:
      s.insert(0, c)
    else:
      s.append(c)
  else:
    s.reverse()
print(*s,sep='')
    

### FIXED CODE ###

s = list(input())
q = int(input())
judge = 1
front = []
back = []
for i in range(q):
  a = list(map(str,input().split()))
  if int(a[0]) == 1:
    judge *= -1
  else:   
    if (int(a[1]) == 1 and judge == 1) or (int(a[1]) == 2 and judge == -1):
      front.append(a[2])
    else:
      back.append(a[2])
ans = front[::-1] + s + back
if judge == -1:
  ans.reverse()
print(*ans, sep='')
### BUGGY CODE ###

MOD = 10 ** 9 + 7

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

    max_bin_digits = len(bin(max(A))[2:])
    cnts = [[0, 0] for _ in range(max_bin_digits)]

    for a in A:
        bin_a = bin(a)[2:].zfill(max_bin_digits)
        bin_a = bin_a[::-1]
        for i, b in enumerate(bin_a):
            cnts[i][int(b)] += 1

    ans = 0
    for i in range(max_bin_digits):
        ans += cnts[i][0] * cnts[i][1] * 2 ** i
        ans %= MOD

    print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

MOD = 10 ** 9 + 7

def main():
    N = int(input())
    A = list(map(int, input().split()))
    
    max_bin_digits = len(bin(max(A))[2:])
    cnts = [0] * max_bin_digits

    for a in A:
        for i in range(max_bin_digits):
            if 1 << i & a:
                cnts[i] += 1

    ans = 0
    for i in range(max_bin_digits):
        ans += cnts[i] * (N - cnts[i]) * 2 ** i
        ans %= MOD

    print(ans)


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

from collections import deque


def main():
    N = int(input())
    A = [deque(map(lambda x: int(x)-1, input().split())) for _ in range(N)]
    ans = 1
    empty = 0
    while True:
        used = set()
        for i in range(N):
            if len(A[i]) == 0 or i in used:
                continue
            j = A[i][0]
            if len(A[j]) and A[j][0] == i and j not in used:
                used.add(i)
                used.add(j)
                A[i].popleft()
                A[j].popleft()
                if len(A[i]) == 0:
                    empty += 1
                if len(A[j]) == 0:
                    empty += 1
        if empty == N:
            break
        if len(used) == 0:
            ans = -1
            break
        ans += 1
    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

from collections import deque


def main():
    N = int(input())
    A = [deque(map(lambda x: int(x)-1, input().split())) for _ in range(N)]
    ans = 1
    empty = 0
    candidates = set(range(N))
    while True:
        used = set()
        for i in candidates:
            if len(A[i]) == 0 or i in used:
                continue
            j = A[i][0]
            if len(A[j]) and A[j][0] == i and j not in used:
                used.add(i)
                used.add(j)
                A[i].popleft()
                A[j].popleft()
                if len(A[i]) == 0:
                    empty += 1
                if len(A[j]) == 0:
                    empty += 1
        if empty == N:
            break
        if len(used) == 0:
            ans = -1
            break
        ans += 1
        candidates = used
    print(ans)


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

H,W = map(int,input().split())
height, width_max, ans = [0] * (W+1), [0] * (W+1), 0
for i in range(H):
    s = list(input()) + ['#']
    length = 0
    for j in range(W+1):
        if s[j] == '.':
            length += 1
            height[j] += 1
        else:
            if length > 0:
                for k in range(j-length, j):
                    if width_max[k] < length:
                        width_max[k] = length
                length = 0
            if height[j] > 0:
                temp = width_max[j] + height[j] - 1
                if ans < temp:
                    ans = temp
                width_max[j], height[j] = 0, 0
for j in range(W):
    if height[j] > 0:
        temp = width_max[j] + height[j] - 1
        if ans < temp:
            ans = temp
print(ans)


### FIXED CODE ###

H,W = map(int,input().split())
height, width_max, ans = [0] * (W+1), [0] * (W+1), 0
for i in range(H):
    s = input() + '#'
    length = 0
    for j in range(W+1):
        if s[j] == '.':
            length += 1
            height[j] += 1
        else:
            if length > 0:
                for k in range(j-length, j):
                    if width_max[k] < length:
                        width_max[k] = length
                length = 0
            if height[j] > 0:
                temp = width_max[j] + height[j] - 1
                if ans < temp:
                    ans = temp
                width_max[j], height[j] = 0, 0
for j in range(W):
    if height[j] > 0:
        temp = width_max[j] + height[j] - 1
        if ans < temp:
            ans = temp
print(ans)
### BUGGY CODE ###

N = int(input())
l = []
for i in range(N):
  Si = input()
  if not Si in l:
    l.append(Si)
print(len(l))

### FIXED CODE ###

N = int(input())
l = set()
for i in range(N):
  Si = input()
  if not Si in l:
    l.add(Si)
print(len(l))
### BUGGY CODE ###


from collections import deque
s = deque(input())
q = int(input())
r = 0
b = ""
c = ""
for i in range(q):
    A = list(input().split())
    if A[0] == '1':
        s.reverse()
    else:
        if (A[1] == '1'):
            s.appendleft(A[2])
        else:
            s.append(A[2])
print("".join(s))

### FIXED CODE ###

from collections import deque

s = deque(input())

q = int(input())
r = 0
for _ in range(q):
    A = list(input().split())
    if A[0] == '1':
        r = (r + 1)%2
    else:
        if (A[1] == '1' and r % 2 == 0) or (A[1] == '2' and r % 2 == 1):
            s.appendleft(A[2])
        else:
            s.append(A[2])

if r == 1:
    s.reverse()
print("".join(s))
### BUGGY CODE ###

def comb_mod(n,r,m):
    ans = 1
    for i in range(1,r+1):
        ans *= (n-i+1) % m
        ans *= pow(i,m-2,m) % m
        ans = ans % m
    return ans
n,k = map(int,input().split())
m = 10**9+7
for i in range(1,k+1):
    print(comb_mod(n-k+1, i, m)*comb_mod(k-1, i-1, m)%m)

### FIXED CODE ###

def factorial_mod(n,mod):
    ret = 1
    for i in range(1,n+1):
        ret *= i
        ret %= mod
    return ret
def comb_mod(n,r,mod):
    if r > n or r < 0:
        ret = 0
    else:
        fact_n  = factorial_mod(n, mod)
        fact_r  = factorial_mod(r, mod)
        fact_nr = factorial_mod(n-r, mod)
        ret = fact_n * pow(fact_r, mod-2, mod) * pow(fact_nr, mod-2, mod) % mod
    return ret

n,k = map(int,input().split())
m = 10**9+7
for i in range(1,k+1):
    print(comb_mod(n-k+1, i, m)*comb_mod(k-1, i-1, m)%m)
### BUGGY CODE ###

n = int(input()) 
a = list(map(int, input().split()))
ans = n
for i in range(len(a)):
  for j in range(len(a)):
    if i != j:
      if a[i] % a[j] == 0:
        ans -= 1
        break

print(ans)

### FIXED CODE ###

import collections

n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr)
s=set()
cnt=collections.Counter(arr)

for i in range(n):
 if arr[i] in s:
   continue
 if cnt[arr[i]]>=2:
   s.add(arr[i])
 for j in range(2,10**6//arr[i]+1):
   s.add(arr[i]*j)
ans=0
for i in range(n):
 if arr[i] in s:
   continue
 ans+=1

print(ans)
### BUGGY CODE ###

a,b,c,d,e,f=map(lambda x: int(x), input().split())

dic_w={}
i=0
while True:
    if (a*i*100)>f:
        break
    j=0
    while True:
        w=(a*i+b*j)*100
        if w==0:
            continue
        if w>f:
            break
        else:
            dic_w[w]=dic_w.get(w,0)+1
        j+=1
    i+=1
list_w=list(dic_w.keys())
list_w.sort()

dic_s={}
max_s=int(e*f/(100+e))
i=0
while True:
    if c*i>max_s:
        break
    j=0
    while True:
        s=c*i+d*j
        if s>max_s:
            break
        else:
            dic_s[s]=dic_s.get(s,0)+1
        j+=1
    i+=1
list_s=list(dic_s.keys())
list_s.sort()

max_per=0
flag=False
ans_w=0
ans_s=0
for w in list_w:
    if flag==True:
        break
    for s in list_s:
        if s/(w/100)==e and s+w<=f:
            ans_w=w
            ans_s=s
            flag=True
            break
        if s/(w/100)>e:
            break
        if s/(w/100)>max_per and s+w<=f:
            ans_w=w
            ans_s=s
print('{} {}'.format(ans_w+ans_s,ans_s))

### FIXED CODE ###

a,b,c,d,e,f=map(lambda x: int(x), input().split())

dic_w={}
i=0
while True:
    if (a*i*100)>f:
        break
    j=0
    while True:
        w=(a*i+b*j)*100
        if w==0:
            j+=1
            continue
        if w>f:
            break
        else:
            dic_w[w]=dic_w.get(w,0)+1
        j+=1
    i+=1
list_w=list(dic_w.keys())
list_w.sort()

dic_s={}
max_s=int(e*f/(100+e)+1)
i=0
while True:
    if c*i>max_s:
        break
    j=0
    while True:
        s=c*i+d*j
        if s>max_s:
            break
        else:
            dic_s[s]=dic_s.get(s,0)+1
        j+=1
    i+=1
list_s=list(dic_s.keys())
list_s.sort()

max_per=0
flag=False
ans_w=0
ans_s=0
for w in list_w:
    if flag==True:
        break
    for s in list_s:
        if s/(w/100)==e and s+w<=f:
            ans_w=w
            ans_s=s
            flag=True
            break
        if s/(w/100)>e:
            break
        if 100*s/(s+w)>=max_per and s+w<=f:
            ans_w=w
            ans_s=s
            max_per=100*s/(s+w)
print('{} {}'.format(ans_w+ans_s,ans_s))
### BUGGY CODE ###

#134
N=int(input())
a=[int(input()) for i in range(N) ]
a_M=[]
a_M.append( max(a[1:]) )
for i in range(1,N):
    if a[i]<max(a_M):
        a_M.append(max(a_M))
    else:
        s=a[i]
        a[i]=0
        a_M.append( max(a) )
        a[i]=s   
for x in a_M:
    print(x)

### FIXED CODE ###

#134
N=int(input())
a=[int(input()) for i in range(N) ]
a_M=[]
a_M1=sorted(a)[-1]
a_M2=sorted(a)[-2]
for i in range(N):
    if a[i]==a_M1:
        a_M.append(a_M2)
    else:
        a_M.append(a_M1)
for x in a_M:
    print(x)
### BUGGY CODE ###

a,b,c,d,e,f=map(int,input().split())
water=[]
suguar=[]
for i in range(f+1):
    for j in range(f+1):
        x=100*i*a+100*j*b
        if 1<=x<=f:
            water.append(x)
for i in range(f+1):
    for j in range(f+1):
        y=c*i+d*j
        if y<=f:
            suguar.append(y)
ans=0
for i in water:
    for j in suguar:
        total=i+j
        if total<=f:
            if j<=i//100*e:
                con=100*j/(i+j)
                if ans<=con:
                    ans=con
                    ans_2=total
                    ans_3=j
print(ans_2,ans_3)


### FIXED CODE ###

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

sugar = []
for i in range(f):
    for j in range(f):
        y = i*c + j*d
        if y <= f:
            sugar.append(y)

water = []
for i in range(0, f//100+1):
    for j in range(0, f//100+1):
        x = i*a*100 + j*b*100
        if x <= f:
            water.append(x)
max_concentration = 0
ans1, ans2 = 0, 0
for x in water:
    for y in sugar:
        if x == 0 and y == 0:
            continue
        elif e * (x // 100) < y:
            continue
        elif x + y > f:
            continue
        else:
            concentration = (100 * y) / (x+y)
            if max_concentration <= concentration:
                max_concentration = concentration
                ans1 = x+y
                ans2 = y
print("{} {}".format(ans1, ans2))
### BUGGY CODE ###

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

i = 0

list = [a.index(x)+1 for x in range(1, n+1)]

print(*list)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split(" ")))
dic = {}
i = 0
for a_s in a:
    dic.setdefault(i, a_s)
    i += 1
for k, v in sorted(dic.items(), key=lambda x: x[1]):
    print(k + 1)
### BUGGY CODE ###

import bisect 
n,m = map(int,input().split())
lst = sorted(list(map(int,input().split())))
for i in range(m):
    num = lst[-1] // 2
    pos = bisect.bisect_left(lst,num)
    lst = lst[:pos] + [num] + lst[pos:-1]
    if sum(lst) == 0:
        break
print(sum(lst))

### FIXED CODE ###

import heapq
import math
n,m = map(int,input().split())
lst = [int(x) * (-1) for x in input().split()]
heapq.heapify(lst)
for use_cnt in range(m):
    num = heapq.heappop(lst) * -1
    nxt_num = math.floor(num / 2)
    heapq.heappush(lst,nxt_num * -1)
print(sum(lst) * (-1))
### BUGGY CODE ###

import sys
import random

def judge(x, question, T, N):
    sum = 0
    for n in question:
        sum += int(x[n])
    if T == "Red":
        if sum > N/2:
            return True
        else:
            return False
    elif T == 'Blue':
        if sum < N/2:
            return True
        else:
            return False

def convert_color(nums):
    nums = nums.replace("1","R")
    nums = nums.replace("0","B")
    return nums

N = int(input())
Aestimated = ["1", "0"]
for _ in range(2*N - 1):
    X = list()
    for a in Aestimated:
        X.append(a + "1")
        X.append(a + "0")
    Aestimated = X

visited = list()
while True:
    question = random.sample(range(2*N),N)
    question.sort()
    if question in visited:
        continue
    visited.append(question)

    print("?", end=" ")
    [print(x+1, end=" ") for x in question]
    print(flush=True)

    T = input()
    if T == -1:
        sys.exit
    Aestimated = [x for x in Aestimated if judge(x, question, T, N)]
    
    if len(Aestimated) == 1:
        print("!", convert_color(Aestimated[0]))
        break


### FIXED CODE ###

import sys

def line(n, N):
    return list(range(2*N)[n:n+N])

def convert(T):
    if T == "Red":
        return "R"
    elif T == "Blue":
        return "B"
    else:
        sys.exit()
    
def ask(question):
    print("?", end=" ")
    [print(x+1, end=" ") for x in question]
    print(flush=True)

def run(X):
    question = line(X, N)
    ask(question)
    T = input()
    visited[X] = convert(T)


N = int(input())
visited = ["*"]*2*N
Aestimated = ["*"]*2*N
L = 0
R = N
run(L)
run(R)
while True:
    M = int((L+R)/2)
    run(M)
    if visited[L] == visited[M]:
        L = M
    elif visited[R] == visited[M]:
        R = M
    if R-L == 1:
        break

Aestimated[L] = visited[L]
Aestimated[R+N-1] = visited[R]

S2 = list(range(R,R+N-1))
S1 = list(set(range(2*N)) - set(S2) - {L} - {R+N-1}) 
for s1 in S1:
    S = S2 + [s1]
    ask(S)
    T = input()
    Aestimated[s1] = convert(T)

for s2 in S2:
    S = S1 + [s2]
    ask(S)
    T = input()
    Aestimated[s2] = convert(T)

print("!", "".join(Aestimated), flush=True)
### BUGGY CODE ###

N ,M = map(int, input().split())
H = [int(i) for i in input().split()]
Nlist = [int(i+1) for i in range(N)]

for i in range(M):
    A = [int(i) for i in input().split()]
    if H[A[0] - 1] < H[A[1] - 1]:
        Nlist = [0 if j == A[0] else j for j in Nlist]
    elif H[A[0] - 1] > H[A[1] - 1]:
        Nlist = [0 if j == A[1] else j for j in Nlist]
    else:
        Nlist = [0 if j == A[0] else j for j in Nlist]
        Nlist = [0 if j == A[1] else j for j in Nlist]

print(N - Nlist.count(0))

### FIXED CODE ###

N ,M = map(int, input().split())
H = [int(i) for i in input().split()]
X = []
cnt = 0

for i in range(M):
    A = [int(i) for i in input().split()]
    if H[A[0] - 1] < H[A[1] - 1]:
        X.append(A[0])
    elif H[A[0] - 1] > H[A[1] - 1]:
        X.append(A[1])
    else:
        X.append(A[0])
        X.append(A[1])
        
print(N - len(set(X)))
### BUGGY CODE ###

N = int(input())
A = [int(x) for x in input().split()]
for i in range(N):
    print(A.count(i+1))

### FIXED CODE ###


N = int(input())
A = [int(x) for x in input().split()]
d = {}
for i in range(N-1):
    try:
        d[A[i]] += 1
    except:
        d[A[i]] = 1
for i in range(N):
    try:
        print(d[i+1])
    except:
        print(0)
### BUGGY CODE ###

N,K = map(int, input().split())
if K==1:
    print(0)
    exit()
if K==2:
    if N%2==0:
        print(0)
        exit()
    else:
        print(1)
        exit()

def func(x,K):
    tmp=x-K
    if tmp<0:
        tmp*=(-1)
    return tmp
    
ans = N
while(True):
    N=func(N,K)
    if N<ans:
        ans=N
    else:
        break
print(ans)


### FIXED CODE ###

N,K = map(int, input().split())
if N==0:
    print(0)
    exit()
if K==1:
    print(0)
    exit()
if K==2:
    if N%2==0:
        print(0)
        exit()
    else:
        print(1)
        exit()

def func(x,K):
    tmp=x-K
    if tmp<0:
        tmp*=(-1)
    return tmp

if (N>K):
    y=int(N/K)
    N=func(N,K*y)

ans = N
while(True):
    N=func(N,K)
    if N<ans:
        ans=N
    else:
        break
print(ans)
### BUGGY CODE ###

# LCS: Longest common subsequence
# dp[i][j]: Sのi-1番目まで, Tのj-1番目まででの最長共通文字列
# dp[0][0] = 0 長さ0の文字列
# dp[0][1] = 0 長さ1の文字列と長さ0の文字列
# dp[1][0] = 0 長さ0の文字列と長さ1の文字列
# dp[i][j] = max(dp[i-1][j], dp[i][j-1]) (S[i] != T[j])
# dp[i][j] = max(
#                dp[i-1][j-1]+1  (共通文字列を利用する),
#                dp[i-1][j]        (共通文字列を利用しない),
#                dp[i][j-1]        (共通文字列を利用しない),
#            )



def main():
    S = input()
    T = input()

    result = solve(S, T)
    print(result[1])



def solve(S, T):
    dp = [[[0, ''] for _ in range(len(T)+1)] for _ in range(len(S)+1)]
    for i, s in enumerate(S, start=1):
        for j, t in enumerate(T, start=1):
            if s != t:
                dp[i][j] = max(dp[i-1][j], dp[i][j-1], key=lambda x: x[0])
            else:
                a = dp[i-1][j-1][0]
                b = dp[i-1][j][0]
                c = dp[i][j-1][0]
                if a >= b and a >= c:
                    dp[i][j] = [dp[i-1][j-1][0] + 1, dp[i-1][j-1][1] + s]
                elif b>=a and b>= c:
                    dp[i][j] = dp[i-1][j]
                else:
                    dp[i][j] = dp[i][j-1]
    return dp[len(S)][len(T)]


if __name__ == "__main__":
    main()


### FIXED CODE ###

# LCS: Longest common subsequence
# dp[i][j]: Sのi-1番目まで, Tのj-1番目まででの最長共通文字列
# dp[0][0] = 0 長さ0の文字列
# dp[0][1] = 0 長さ1の文字列と長さ0の文字列
# dp[1][0] = 0 長さ0の文字列と長さ1の文字列
# dp[i][j] = max(dp[i-1][j], dp[i][j-1]) (S[i] != T[j])
# dp[i][j] = max(
#                dp[i-1][j-1]+1  (共通文字列を利用する),
#                dp[i-1][j]        (共通文字列を利用しない),
#                dp[i][j-1]        (共通文字列を利用しない),
#            )


dp = [[0 for _ in range(3001)] for _ in range(3001)]


def main():
    S = input()
    T = input()

    result = solve(S, T)
    print(result)


def solve(S, T):
    for i in range(1, len(S) + 1):
        for j in range(1, len(T) + 1):
            if S[i - 1] != T[j - 1]:
                dp[i][j] = max(dp[i - 1][j], dp[i][j - 1], dp[i-1][j-1])
            else:
                dp[i][j] = max(dp[i - 1][j - 1] + 1, dp[i - 1][j], dp[i][j - 1])
    result = ""
    i = len(S)
    j = len(T)
    while dp[i][j] != 0:
        if dp[i][j] == dp[i-1][j]:
            i -= 1
        elif dp[i][j] == dp[i][j-1]:
            j -= 1
        else:
            result += S[i-1]
            i -= 1
            j -= 1
    return "".join(reversed(result))


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

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

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


import copy
calced = {}
def calc_main(x):
    arr = {}
    temp = x
    for i in range(2, int(-(-x**0.5//1))+1):
        if temp%i == 0:
            cnt = 0
            t_arr = calced[temp // i]
            t = t_arr.get(i, 0)
            arr = copy.deepcopy(t_arr)
            arr[i] = t + 1

    if temp!=1:
        arr[temp] = 2

    if arr == {}:
        if x == 1:
            arr[temp] = 1
        else:
            arr[temp] = 2

    calced[x] = arr

    return arr

def calc(x):
    arr = calc_main(x)
    ans = 1
    for i in arr.values():
        ans *= i

    return ans


def main():
    n = input_int()

    ans = 0
    for j in range(1, n + 1):
        ans += (n // j) * ((n // j) + 1) * j / 2
        # for i in range(j, n + 1, j):
        #     ans += i

    print(int(ans))


if __name__ == "__main__":
    main()


### FIXED CODE ###

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

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n = input_int()

    ans = 0
    for j in range(1, n + 1):
        temp = n // j
        ans += temp * (temp + 1) * j // 2
        # for i in range(j, n + 1, j):
        #     ans += i

    print(int(ans))


if __name__ == "__main__":
    main()