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

import math

n,a,b = map(int,input().split())
k=math.factorial(n)
t=(n-1)//2
L=[1]*(n+1)
L2=[1]*(n+1)
s=1
NUM=10**9+7
for i in range(t):
    L[i+1]*=(n-i)*L[i]
    L2[i+1]*=L[i+1]
    L2[n-i-1]*=L[i+1]
if(n%2==0):
    L2[t+1]*=k
for i in range(t,n):
    L[i+1]*=(n-i)*L[i]
    L2[i+1]*=L[i+1]/k
    L2[n-i-1]*=L[i+1]/k
    L2[i+1]%=NUM
    L2[n-i-1]%=NUM

print(int(sum(L2)-L2[a]-L2[b]-1))

### FIXED CODE ###

import math

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

 
def comb(n,k,mod):
    """power_funcを用いて(nCk) mod p を求める"""
    if n<0 or k<0 or n<k: return 0
    if n==0 or k==0: return 1
    k=min(n-k,k)
    #分母
    deno=1
    #分子
    mole=1

    for i in range(1,k+1):
        mole=mole*(n-i+1)%mod
        deno=deno*i%mod

    return (mole*pow(deno,mod-2,mod))%mod


def power_func(a,b,p):
    """a^b mod p を求める"""
    if b==0: return 1
    if b%2==0:
        d=power_func(a,b//2,p)
    return d*d %p
    
    if b%2==1:
        return (a*power_func(a,b-1,p ))%p

mod=10**9+7
print((pow(2,n,mod)- 1 - comb(n,a,mod) - comb(n,b,mod))%mod)
#2**n - 1 -nCa -nCb
### BUGGY CODE ###

import math

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

def comb(x):
  if x <= 1:
    return 0
  return math.factorial(x) // (math.factorial(x - 2) * math.factorial(2))

dic = {}
#まず最初に、グルーピング(グルーピングの時点で辞書化が必要)
for a in A:
  if a in dic:
    dic[a][0] += 1
  else:
    dic[a] = [1]

#辞書にコンビネーションをvalueとして書き込んでいく
for v in dic.values():
  v.append(comb(v[0]))
  v.append(comb(v[0]-1))

#各グループのlen(g)C2を総計して変数grandとして保持しておく
grand = 0
for v in dic.values():
  grand += v[1]
  
for a in A:
  output = grand - dic[a][1] + dic[a][2]
  print(output)

### FIXED CODE ###

import math

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

def comb(n):
  r = 2
  if n <= 1:
    return 0
  if n - r < r: r = n - r
  if r == 0: return 1
  if r == 1: return n
  
  numerator = [n - r + k + 1 for k in range(r)]
  denominator = [k + 1 for k in range(r)]
  
  for p in range(2,r+1):
    pivot = denominator[p - 1]
    if pivot > 1:
      offset = (n - r) % p
      for k in range(p-1,r,p):
        numerator[k - offset] /= pivot
        denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result
dic = {}
#まず最初に、グルーピング(グルーピングの時点で辞書化が必要)
for a in A:
  if a in dic:
    dic[a][0] += 1
  else:
    dic[a] = [1]

#辞書にコンビネーションをvalueとして書き込んでいく
for v in dic.values():
  v.append(comb(v[0]))
  v.append(comb(v[0]-1))

#各グループのlen(g)C2を総計して変数grandとして保持しておく
grand = 0
for v in dic.values():
  grand += v[1]
  
for a in A:
  output = grand - dic[a][1] + dic[a][2]
  print(output)
### BUGGY CODE ###

n, m = map(int, input().split())
l = list(list(map(int, input().split())) for _ in range(m))
c = []
for i in range(m):
  if l[i][0] == n:
    c.append(l[i][1])
  elif l[i][1] == n:
    c.append(l[i][0])
d = 0
for i in l:
  for j in c:
    if i == [1, j] or i == [j, 1]:
      d = 1
print('POSSIBLE' if d == 1 else 'IMPOSSIBLE')

### FIXED CODE ###

n, m = map(int, input().split())
c = [[] for _ in range(n+1)]
for i in range(m):
  a, b = map(int, input().split())
  c[a].append(b)
  c[b].append(a)

for i in c[1]:
  if n in c[i]:
    print('POSSIBLE')
    exit()

print('IMPOSSIBLE')
### BUGGY CODE ###

from sys import stdin
import numpy as np

n,w = [int(x) for x in stdin.readline().rstrip().split()]
li = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)]
li = np.array(li)

def knapsack(n,w,li):
    #li[i][0]が重さ,li[i][1]が価値
    dp = np.array([[0 for i in range(w+1)]for j in range(n+1)])
    #dp[i][total_w]はi-1回目までの商品を加えた時に重さがtotal_wを超えないような値の最大値
    for i in range(n):
        for total_w in range(li[i][0]-1,w+1):
            if total_w - li[i][0] >= 0:
                dp[i+1][total_w] = max(dp[i][total_w],dp[i][total_w-li[i][0]]+li[i][1])
            else:
                dp[i+1][total_w] = dp[i][total_w]
    return dp[-1][-1]
print(knapsack(n,w,li))

### FIXED CODE ###

from sys import stdin
n,w = [int(x) for x in stdin.readline().rstrip().split()]
li = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)]
def knapsack(n,w,li):
    #li[i][0]が重さ,li[i][1]が価値
    dp = [[0 for i in range(w+1)]for j in range(n+1)]
    #dp[i][total_w]はi-1回目までの商品を加えた時に重さがtotal_wを超えないような値の最大値
    for i in range(n):
        for total_w in range(w+1):
            if total_w - li[i][0] >= 0:
                dp[i+1][total_w] = max(dp[i][total_w],dp[i][total_w-li[i][0]]+li[i][1])
            else:
                dp[i+1][total_w] = dp[i][total_w]
    return max(dp[-1])
print(knapsack(n,w,li))
### BUGGY CODE ###

# -*- coding: utf-8 -*-
import sys

N = int(input().strip())
A_list = list(map(int, input().rstrip().split()))
#-----

A_list.sort()
check = [1]*len(A_list)


for i in range(len(A_list)-1):
    
    for j in range(i+1, len(A_list)):
        if check[j] == 0:
            continue
        
        if A_list[j] == A_list[i]:
            check[i] = 0
            check[j] = 0
        
        if A_list[j] % A_list[i] == 0:
            check[j] = 0
        

print(check.count(1))


### FIXED CODE ###

# -*- coding: utf-8 -*-
from collections import Counter

N = int(input().strip())
A_list = list(map(int, input().rstrip().split()))
#-----

cnt_A = Counter(A_list)
max_num = max(A_list)


for i in range(len(A_list)):
    if A_list[i] not in cnt_A:
        continue
    
    for j in range( 2, max_num // A_list[i] + 1 ):
        n = A_list[i] * j
        
        if n in cnt_A:
            del cnt_A[n]


ans = [ k for k,v in cnt_A.items() if v == 1 ]
print( len(ans) if ans else 0 )
### BUGGY CODE ###

#Problem C

N,K = map(int, input().split())
a = list(map(int,input().split()))
p = []
p1 = 1

for i in range(K):
    p1 *= a[i]
p.append(p1)
for i in range(N-K):
    pn = p[i]/a[i]*a[K+i]
    p.append(pn)


for i in range(N-K):
    if p[i+1] > p[i]:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

#Problem C

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

for i in range(N-K):
    
    if a[i] < a[i+K]:
        print("Yes")
    else:
        print("No")
### BUGGY CODE ###

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

p = [int(x) for x in input().split()]

p_kitaiti=[]

for i in p:
    goukei=(i*(i+1))/2
    p_kitaiti.append(goukei/i)

ans=0

for i in range(len(p_kitaiti)-k+1):
    zantei=sum(p_kitaiti[i:i+k])
    ans=max(ans,zantei)

print(ans)

### FIXED CODE ###

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

p = [int(x) for x in input().split()]
p_kitaiti=[float((x+1)/2) for x in p]

ruisekiwa=[p_kitaiti[0]]

for i in range(1,len(p_kitaiti)):
    ruisekiwa.append(ruisekiwa[-1]+p_kitaiti[i])

ans=ruisekiwa[k-1]

for i in range(1,len(ruisekiwa)-k+1):
    ans=max(ans,ruisekiwa[i+k-1]-ruisekiwa[i-1])

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

from bisect import bisect_left
from decimal import Decimal

N, *A = map(Decimal, open(0).read().split())
N = int(N)
A.sort()

c = {}
intc = 0
ints = []
decs = []
for d in A:
    if d in c:
        c[d] += 1
        if d == int(d):
            intc += 1
    else:
        c[d] = 1
        if d == int(d):
            intc += 1
            ints.append(d)
        else:
            decs.append(d)

result = intc * (intc - 1) // 2
for i in range(len(decs)):
    a = decs[i]
    f = a - int(a)
    t = max(bisect_left(decs, 1 / f), i + 1)
    for j in range(t, len(decs)):
        b = decs[j]
        t = a * b
        if t == int(t):
            result += c[a] * c[b]

fras = sorted(set(d - int(d) for d in decs))
frac = {}
for d in decs:
    t = d - int(d)
    frac.setdefault(t, 0)
    frac[t] += c[d]

for i in range(len(fras)):
    a = fras[i]
    t = bisect_left(ints, 1 / a)
    for j in range(t, len(ints)):
        b = ints[j]
        t = a * b
        if t == int(t):
            result += frac[a] * c[b]

print(result)


### FIXED CODE ###

def conv(s):
    if s.find('.') == -1:
        s += '.'
    s = s.rstrip('0')
    t = len(s) - s.find('.') - 1
    a = int(s.replace('.', ''))
    if a == 0:
        return (0, 0)
    x, y = -t, -t
    while a % 5 == 0:
        x += 1
        a //= 5
    while a % 2 == 0:
        y += 1
        a //= 2
    return (x, y)


N, *A = open(0).read().split()
N = int(N)

d = {}
for a in A:
    t = conv(a)
    d.setdefault(t, 0)
    d[t] += 1

result = 0
xs = list(d.keys())
for i in range(len(xs)):
    x, y = xs[i]
    t = d[xs[i]]
    if x >= 0 and y >= 0:
        result += t * (t - 1) // 2
    for j in range(i + 1, len(xs)):
        m, n = xs[j]
        if x + m >= 0 and y + n >= 0:
            result += t * d[xs[j]]
print(result)
### BUGGY CODE ###

from fractions import gcd
import time
n = int(input())
a = list(map(int, input().split()))
t1 = time.time()
mod = 10**9+7
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)
g = 1
flag = 1
for i in range(n):
    g = a[i] * g // gcd(a[i], g)
    #g %= mod
    t2 = time.time()
    if t2 - t1 > 0.8:
        flag = 0
        break

if flag == 1:
    ans = 0
    for i in range(n):
        ans += g * modinv(a[i])
        ans %= mod
    print(ans)

else:
    ans = 0

    for i in range(n):
        g = 1
        for j in range(n):
            if i == j:
                continue
            else:
                g *= a[j]
                g %= mod
        ans += g
    print(ans%mod)


### FIXED CODE ###

from fractions import gcd #直して
n = int(input())
a = list(map(int, input().split()))

mod = 10**9+7
l = 1
for i in range(n):
    l = a[i] // gcd(l, a[i]) * l
    

def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

d = 0
for i in range(n):
    d += modinv(a[i])

print((l*d) % mod)
### BUGGY CODE ###

N = int(input())

A = input().split()
result = 1

for i in A:
    result *= int(i)

if result > 10**18:
    print(-1)
else:
    print(result)

### FIXED CODE ###

N = int(input())

A = input().split()
result = 1

A.sort()
fl = True

if int(A[0]) == 0:
    print(0)
else:
    for i in A:
        result *= int(i)
        if result > 10**18:
            fl = False   
            break                
    if fl:
        print(result)
    else:
        print(-1)
### BUGGY CODE ###

import sys
sys.setrecursionlimit(4100000)
import math




N = int(input())





import fractions
a = list(map(int, input().split()))
koubai = a[0]
for i in range(1, N):
    koubai = koubai * a[i] // fractions.gcd(koubai, a[i])

ans = int(0)
for i in range(N):
    ans += koubai // a[i]
    
ans %= 1000000007

print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(4100000)
import math




N = int(input())


import fractions
a = list(map(int, input().split()))
koubai = a[0]
small = []
for i in range(0, N//2):
    small.append(a[2*i + 1] * a[2*i] // fractions.gcd(a[2*i + 1], a[2*i]))

small.append(a[-1])
for i in range(len(small)):
    koubai = koubai * small[i] // fractions.gcd(koubai, small[i])


ans = int(0)
for i in range(N):
    ans += koubai // a[i]
    
ans %= 1000000007

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

import collections
import math

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

    Cou = collections.Counter(A)
    ans = 0
    for k in range(1, N+1):
        tmp = Cou.copy()
        tmp[A[k-1]] -= 1
        ans = 0
        for c in tmp.values():
            ans += c * (c-1) // 2
        print(ans)


    return 0


if __name__ == '__main__':
    main()

### FIXED CODE ###

import collections
import math

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

    Cou = collections.Counter(A)
    ans = 0

    oo = 0
    for c in Cou.values():
        oo += c * (c-1) // 2
    #print(Cou)
    for k in range(1, N+1):
        c = Cou[A[k-1]] - 1
        print(oo - c)
    return 0


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

A,B,N = map(int,input().split())
ans = 0

for i in range(max(0,N//B*B-1),N+1):
    cur = A*i/B//1 - A*(i/B//1)
    ans = max(ans, cur)
print(int(ans))

### FIXED CODE ###

A,B,N = map(int,input().split())
x = max(0,N//B*B-1)
cur1 = A*x/B//1 - A*(x/B//1)
cur2 = A*N/B//1 - A*(N/B//1)
print(int(max(cur1,cur2)))
### BUGGY CODE ###

import sys

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

MOD = 10 ** 9 + 7
# Tを固定して、後で2**N倍する
N = ir()
C = lr()
C.sort(reverse=True)
diff = 0
answer = 0
base = 2 ** N
for i in range(N):
    answer += (diff//2 + base//2) * C[i]
    diff += base // 2
    answer %= MOD

for i in range(N):
    answer *= 2
    answer %= MOD

print(answer%MOD)
# 51

### FIXED CODE ###

import sys
import numpy as np

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

# Ciの値でsortする、Tを0000で固定した後、最後に2**N倍
N = ir()
C = np.array(lr())
MOD = 10 ** 9 + 7
C.sort()
two_power = np.array([(1+N-i) * pow(2, (N-2), MOD) % MOD if i < N-1 else pow(2, i, MOD) for i in range(N)])
answer = (C * two_power % MOD).sum() * 2**N
print(answer%MOD)
### BUGGY CODE ###

N = int(input())
As = list(map(int,input().split()))
As.sort()

import math
def get_prime(search_list):
    prime_list = []
    while len(search_list) != 0:
        head_num = search_list.pop(0)
        if head_num not in search_list:
            prime_list.append(head_num)
        search_list = [num for num in search_list if num % head_num != 0]
    prime_list.extend(search_list)
    return prime_list

print(len(get_prime(As)))


### FIXED CODE ###

N = int(input())
As = list(map(int,input().split()))
As.sort()
M = 1000001
array = [0]*M
for a in As:
    if array[a] != 0:
        array[a] = 2
        continue
    for i in range(a,M,a):
        array[i] += 1

ans = 0
for a in As:
    if array[a] == 1:
        ans += 1
print(ans)
### BUGGY CODE ###

h, w = map(int, input().split())
g = [[True]*(w+2)]
bp = []
for i in range(h):
    A = input()
    b = [False]*w
    for j, a in enumerate(A):
        if a == '#':
            bp += [[i+1, j+1]]
            b[j] = True
    g += [[True] + b + [True]]
g += [[True]*(w+2)]

cnt = 0
while bp:
    p = []
    for i, j in bp:
        if not g[i+1][j]:
            g[i+1][j] = True
            p += [[i+1, j]]
        if not g[i-1][j]:
            g[i-1][j] = True
            p += [[i-1, j]]        
        if not g[i][j+1]:
            g[i][j+1] = True
            p += [[i, j+1]]
        if not g[i][j-1]:
            g[i][j-1] = True
            p += [[i, j-1]]
    cnt += 1
    bp = p
print(cnt-1)

### FIXED CODE ###

h, w = map(int, input().split())
g = [[True]*(w+2)]
for i in range(h):
    g.append([True] + [a == '#' for a in input()] + [True])
g.append([True]*(w+2))

bp = []
for i in range(1, h+1):
    for j in range(1, w+1):
        if g[i][j]:
            bp.append((i, j))

cnt = 0
while bp:
    p = []
    for i, j in bp:
        if not g[i+1][j]:
            g[i+1][j] = True
            p.append((i+1, j))
        if not g[i-1][j]:
            g[i-1][j] = True
            p.append((i-1, j))       
        if not g[i][j+1]:
            g[i][j+1] = True
            p.append((i, j+1))
        if not g[i][j-1]:
            g[i][j-1] = True
            p.append((i, j-1))
    cnt += 1
    bp = p
print(cnt-1)
### BUGGY CODE ###

n = int(input())
s = list(input())
ans = 0

for i in range(0,n-2):
    for j in range(i,n-1):
        if s[i] ==s[j]:
            continue
        for k in range(j,n):
            if s[i] == s[k] or s[j] == s[k]:
                continue
            if j-i == k-j:
                continue
            ans += 1
print(ans)

### FIXED CODE ###

n = int(input())
s = list(input())
ans = 0
R = []
G = []
B = []


for i in range(n):
    if s[i] == "R":
        R.append(i)
    elif s[i] == "G":
        G.append(i)
    else:
        B.append(i)

ans = len(R) * len(G) * len(B)


for i in range(0,n-2):
    for j in range(i+1,n-1):
        k = j + ( j -i )
        if k < n:
            if s[i] != s[j] and s[k] != s[j] and s[i] != s[k]:
                ans -= 1


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

n, m, q = map(int, input().split())
train = []
question = []
for i in range(m):
    temp = [int(i) for i in input().split()]
    train.append(temp)
ans = []
for j in range(q):
    temp = [int(i) for i in input().split()]
    count = 0
    for t in train:
        if (t[0] >= temp[0]) & (t[1] <= temp[1]):
            count += 1
    ans.append(count)
for i in ans:
    print(i)

### FIXED CODE ###

n, m, q = map(int, input().split())
train = []
for _ in range(m):
    l, r = map(int, input().split())
    train.append((l, r))
dp = [[0 for _ in range(n + 1)] for _ in range(n + 1)]
for [l, r] in train:
    dp[l][r] += 1
for i in range(n):
    for j in range(n):
        dp[i + 1][j + 1] += dp[i + 1][j]
for i in range(n):
    for j in range(n):
        dp[i + 1][j + 1] += dp[i][j + 1]
for i in range(q):
    l, r = map(int, input().split())
    print(dp[r][r] - dp[l - 1][r] - dp[r][l - 1] + dp[l - 1][l - 1])
### BUGGY CODE ###

n,ma,mb=map(int,input().split())
dpn=400001
dp=[10**6]*dpn
dp[0]=0
for i in range(n):
    a,b,c=map(int,input().split())
    for j in range(dpn-1,-1,-1):
        if j==0 or dp[j]!=10**6:
            dp[j+a*1000+b]=min(dp[j+a*1000+b],dp[j]+c)
ans=10**6
s=1000*ma+mb
p=1
while s*p<dpn:
    ans=min(ans,dp[s*p])
    p+=1
if ans==10**6:
    print(-1)
else:
    print(ans)


### FIXED CODE ###

n,ma,mb=map(int,input().split())
dpn=400001
dp=[10**6]*dpn
dp[0]=0
for i in range(n):
    a,b,c=map(int,input().split())
    for j in range(dpn-1,-1,-1):
        if j==0 or dp[j]!=10**6:
            dp[j+a*1000+b]=min(dp[j+a*1000+b],dp[j]+c)
ans=10**6
s=1000*ma+mb
p=1
while s*p<dpn:
    ans=min(ans,dp[s*p])
    p+=1
if ans==10**6:
    print(-1)
else:
    print(ans)
### BUGGY CODE ###

n = int(input())
a = list(map(int, input().split()))
mod = 10**9+7
from fractions import gcd

l = a[0]
for i in range(1,n):
  l = l*a[i]//gcd(l,a[i])

b = [0]*n
ans = 0
for i in range(n):
  b[i] = l//a[i]
  ans += b[i]%mod

print(ans%mod)

### FIXED CODE ###

import sys
input = sys.stdin.buffer.readline

n = int(input())
a = list(map(int, input().split()))
mod = 10**9+7
from fractions import gcd

l = a[0]
for i in range(1,n):
  l = l*a[i]//gcd(l,a[i])

ans = 0
for i in range(n):
  ans += l//a[i]

print(ans%mod)
### BUGGY CODE ###

n = int(input())
s = [input() for _ in range(n)]
lists = sorted(list(set(s)))
num = list()
for i in lists:
    num.append(s.count(i))
maxnum = max(num)
for j in range(len(lists)):
    if num[j] == maxnum:
        print(lists[j])

### FIXED CODE ###

n = int(input())
s = [input() for _ in range(n)]
ss = sorted(s)
t = ss
x = 0
maxx = 0
for i in range(n-1):
    if ss[i] == ss[i+1]:
        x += 1
        if x == maxx:
            maxx = x
            t.append(ss[i])
        elif x > maxx:
            maxx = x
            t = [ss[i]]
    else:
        x = 0
for j in t:
    print(j)
### BUGGY CODE ###

n=int(input())
s = [input() for i in range(n)]
c=0
a=["" for i in range(n)]
for i in range(n):
   b=(sorted([s[i][j] for j in range(10)]))
   a[i]=''.join(b)

for i in range(n-1):
    for j in range(i+1,n):
        if a[i]==a[j]:
            c+=1
print(c)

### FIXED CODE ###

N = int(input())
S = [''.join(sorted(input().rstrip())) for _ in range(N)]
 
from collections import Counter
counter = Counter(S)
 
answer = sum(x*(x-1)//2 for x in counter.values())
print(answer)
### BUGGY CODE ###

from sys import stdin
import sys
import math
from functools import reduce
import itertools

a,b,n = [int(x) for x in stdin.readline().rstrip().split()]

maxc = -10**5
for i in range(n+1):
    c = int(a*i/b) - a*int(i/b)
    maxc = max([maxc, c])

print(maxc)

### FIXED CODE ###

from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

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

if N >= B-1:
    print(A*(B-1)//B)
else:
    print(A*N//B)
### BUGGY CODE ###

N, M = map(int, input().split())
XYZ = [list(map(int, input().split())) for i in range(N)]
X = [XYZ[i][0] for i in range(N)]
Y = [XYZ[i][1] for i in range(N)]
Z = [XYZ[i][2] for i in range(N)]
ans = 0

for i in range(2**M - 1, 2**N - 2**(N - M) + 1):
    b = bin(i)[2:]
    if len(b) != N:
        f = [0 for i in range(N-len(b))] + [int(a) for a in b]
    else:
        f = [int(a) for a in b]
    if sum(f) == M:
        ans_x = abs(sum([x * y for x, y in zip(X, f)]))
        ans_y = abs(sum([x * y for x, y in zip(Y, f)]))
        ans_z = abs(sum([x * y for x, y in zip(Z, f)]))
        ans = max(ans, (ans_x + ans_y + ans_z))

print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
cakes = []
for i in range(N):
    x, y, z = map(int, input().split())
    cakes.append([x, y, z])


if M == 0:
    print(0)
    quit()
score = [0]*8
s = sorted(map(lambda c: c[0]+c[1]+c[2], cakes))
score[0] = sum(s[-M:])
score[1] = -sum(s[:M])
s = sorted(map(lambda c: c[0]+c[1]-c[2], cakes))
score[2] = sum(s[-M:])
score[3] = -sum(s[:M])
s = sorted(map(lambda c: c[0]-c[1]+c[2], cakes))
score[4] = sum(s[-M:])
score[5] = -sum(s[:M])
s = sorted(map(lambda c: c[0]-c[1]-c[2], cakes))
score[6] = sum(s[-M:])
score[7] = -sum(s[:M])
print(max(score))
### BUGGY CODE ###

import sys

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

for i in range(m//1000+1):
    for j in range((m-1000*i)//5000+1):
        if i % 1 == 0 and j % 1 == 0:
            if n-(i+j) >= 0 and i*1000 + j* 5000 + (n-(i+j))*10000 == m:
                print(n-(i+j), j, i)
                sys.exit()
print(-1, -1, -1)


### FIXED CODE ###

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

flag = False

for z in range(N + 1)[::-1]:
    rem1 = N - z + 1
    for y in range(rem1)[::-1]:
        x = N - z - y
        val = 10000 * x + 5000 * y + 1000 * z
        if val == Y:
            flag = True
            break
    if flag:
        break

if not flag:
    x = -1
    y = -1
    z = -1

print(x, y, z)
### BUGGY CODE ###

L, R = list(map(int, input().split()))
ans = 2020
if abs(L-R)>=2019:
    while 1:
        pass
    print(0)
else:
    for i in range(L, R):
        for j in range(L, R+1):
            if i==j:
                continue
            else:
                ans = min(ans, (i*j)%2019)

print(ans)

### FIXED CODE ###

L, R = list(map(int, input().split()))
ans = 2020
if abs(L-R)>=2020:
    print(0)
else:
    for i in range(L, R):
        for j in range(L, R+1):
            if i==j:
                continue
            else:
                ans = min(ans, (i*j)%2019)
    print(ans)
### BUGGY CODE ###

H, W = list(map(int,input().split()))
ans = H*W
h = H
w = W
for i in range(1,h//2+1):
    p1 = i*w
    for j in range(1,(h-i)//2+1):
        p2 = (h-i-j)*W
        ans = min(ans, max(p1,p2,h*w-p1-p2)-min(p1,p2,h*w-p1-p2))
    for j in range(1,w//2+1):
        p2 = (h-i)*(w-j)
        ans = min(ans, max(p1,p2,h*w-p1-p2)-min(p1,p2,h*w-p1-p2))
h = W
w = H
for i in range(1,h//2+1):
    p1 = i*w
    for j in range(1,(h-i)//2+1):
        p2 = (h-i-j)*W
        ans = min(ans, max(p1,p2,h*w-p1-p2)-min(p1,p2,h*w-p1-p2))
    for j in range(1,w//2+1):
        p2 = (h-i)*(w-j)
        ans = min(ans, max(p1,p2,h*w-p1-p2)-min(p1,p2,h*w-p1-p2))
print(ans)

### FIXED CODE ###

H, W = list(map(int,input().split()))
ans = H*W
h = H
w = W
for i in range(h//3,h//2+1):
    p1 = i*w
    for j in range((h-i)//2-1,(h-i)//2+1):
        p2 = (h-i-j)*W
        ans = min(ans, max(p1,p2,h*w-p1-p2)-min(p1,p2,h*w-p1-p2))
    for j in range(w//2-1,w//2+1):
        p2 = (h-i)*(w-j)
        ans = min(ans, max(p1,p2,h*w-p1-p2)-min(p1,p2,h*w-p1-p2))
h = W
w = H
for i in range(h//3,h//2+1):
    p1 = i*w
    for j in range((h-i)//2-1,(h-i)//2+1):
        p2 = (h-i-j)*H
        ans = min(ans, max(p1,p2,h*w-p1-p2)-min(p1,p2,h*w-p1-p2))
    for j in range(w//2-1,w//2+1):
        p2 = (h-i)*(w-j)
        ans = min(ans, max(p1,p2,h*w-p1-p2)-min(p1,p2,h*w-p1-p2))
print(ans)
### BUGGY CODE ###

n = int(input())
f = [1] * (n + 1)
for i in range(2, n + 1):
    for j in range(i, n + 1, i):
        f[j] += 1
ans = 0
for i in range(1, n + 1):
    ans += i * f[i]
print(ans)


### FIXED CODE ###

n = int(input())
f = [1] * (n + 1)
for i in range(2, n + 1):
    for j in range(i, n + 1, i):
        f[j] += 1
ans = 0
for i in range(1, n + 1):
    ans += i * f[i]
print(ans)