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

n=int(input())
li=[]
for i in range(n):
  li.append(int(input()))
pl=[]
for i in range(2**n):
  point=0
  for j in range(n):
    if ((i>>j)&1):
      point+=li[j]
  pl.append(point)
pl.sort(reverse=True)
for i in pl:
  if i%10!=0:
    print(i)
    break
else:
  print(0)

### FIXED CODE ###

n=int(input())
li=[]
for i in range(n):
  li.append(int(input()))
out=sum(li)
if out%10!=0:
  print(out)
else:
  li.sort()
  for i in li:
    if i%10!=0:
      print(out-i)
      break
  else:
    print(0)
### BUGGY CODE ###

def main():
    import sys
    input = sys.stdin.readline
    
    from collections import defaultdict
    import itertools
    import copy
    one = [True, False]
    
    N,M = map(int,input().split())
    dp = []
    for i in range(M+1):
        dp.append(defaultdict(lambda : float("inf")))
    dp[0][(False,)*N] = 0
    
    for i in range(1,M+1):
        #print(dp[M][(True,)*N])
        a,b = map(int,input().split())
        c = list(map(int,input().split()))
        for j in itertools.product(one, repeat = N):
            now = list(copy.deepcopy(j))
            for k in c:
                now[k-1] = True
            now = tuple(now)
            dp[i][j] = dp[i-1][j]
            dp[i][now] = min(dp[i][now],dp[i-1][now], dp[i-1][j]+a)
    
    if dp[M][(True,)*N] == float("inf"):
        print(-1)
    else:
        print(dp[M][(True,)*N])
            
    
    
main()

### FIXED CODE ###

def main():
    import sys
    input = sys.stdin.readline
    
    from collections import defaultdict
    import itertools
    import copy
    
    N,M = map(int,input().split())
    dp = [[float("inf")]*(2**N) for i in range(M+1)]
    dp[0][0] = 0
    
    for i in range(1,M+1):
        #print(dp[M][(True,)*N])
        a,b = map(int,input().split())
        c = list(map(int,input().split()))
        tmp = 0
        for k in c:
            tmp += 2**(k-1)
        for j in range(2**N):
            now = j | tmp
            dp[i][j] = min(dp[i][j],dp[i-1][j])
            dp[i][now] = min(dp[i][now],dp[i-1][now], dp[i-1][j]+a)
            #print(dp[i][now],dp[i-1][now], dp[i-1][j]+a)
    
    if dp[M][2**N-1] == float("inf"):
        print(-1)
    else:
        print(dp[M][2**N-1])
            
    
    
main()
### BUGGY CODE ###

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

for i in range(a, b):
    temp = temp ^ (i + 1)

print(temp)


### FIXED CODE ###

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


def mod(n):
    return n % 4


def xor(num):
    if mod(num-1) == 0:
        return 0
    elif mod(num-1) == 1:
        return num
    elif mod(num-1) == 2:
        return 1
    elif mod(num-1) == 3:
        return num + 1


print(xor(a-1) ^ xor(b))
### BUGGY CODE ###

def main():
    import sys
    input = sys.stdin.buffer.readline
    from itertools import product
    N = int(input())
    T = [[int(i) for i in input().split()] for j in range(N)]
    pow_2 = [pow(2, i) for i in range(N+1)]
    X_dist = [[0]*N for _ in range(pow_2[N])]
    Y_dist = [[0]*N for _ in range(pow_2[N])]

    # bitという道路群を建設したときの，各集落の評価距離
    for bit in range(pow_2[N]):
        cur_x = [0]
        cur_y = [0]
        for i in range(N):
            if bit & (pow_2[i]):
                cur_x.append(T[i][0])
                cur_y.append(T[i][1])
        for i, (x, y, p) in enumerate(T):
            X_dist[bit][i] = p*min(abs(cx - x) for cx in cur_x)
            Y_dist[bit][i] = p*min(abs(cy - y) for cy in cur_y)

    answer = [100_000_000_000] * (N+1)
    for bit in product(range(3), repeat=N):
        x_bit = 0
        y_bit = 0
        x_set = set()
        y_set = set()
        for i in range(N):
            if bit[i] == 2:
                # x = a
                x_bit += pow_2[i]
                x_set.add(T[i][0])
            elif bit[i] == 1:
                # y = a
                y_bit += pow_2[i]
                y_set.add(T[i][1])
        cnt = len(x_set) + len(y_set)
        # 距離の評価
        cur_d = 0
        for i in range(N):
            cur_d += min(X_dist[x_bit][i], Y_dist[y_bit][i])
        answer[cnt] = min(answer[cnt], cur_d)

    for ans in answer:
        print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

# writer解(c++)を写経した．answerのfor文のところ何やってるかさっぱりわかりませんが…
# https://atcoder.jp/contests/m-solutions2020/submissions/15122924
import sys
input = sys.stdin.readline
INF = 10**13


def main():
    N = int(input())
    X = []
    Y = []
    P = []
    for _ in range(N):
        a, b, c = (int(i) for i in input().split())
        X.append(a)
        Y.append(b)
        P.append(c)
    X_dist = [[0]*N for _ in range(1 << N)]
    Y_dist = [[0]*N for _ in range(1 << N)]

    # bitという道路群を建設したときの，各集落の評価距離
    # bit 001001 とかの1が立っている集落に道を作る
    for bit in range(1 << N):
        for i in range(N):
            X_dist[bit][i] = P[i]*abs(X[i])
            Y_dist[bit][i] = P[i]*abs(Y[i])
            for k in range(N):
                if bit & (1 << k):
                    X_dist[bit][i] = \
                        min(X_dist[bit][i], P[i]*abs(X[i] - X[k]))
                    Y_dist[bit][i] = \
                        min(Y_dist[bit][i], P[i]*abs(Y[i] - Y[k]))

    # これはなに？
    answer = [INF] * (N+1)
    for i in range(1 << N):
        cnt = 0
        for j in range(N):
            if (i >> j) & 1:
                cnt += 1
        j = i
        while j >= 0:
            j &= i
            cost = 0
            for k in range(N):
                if not((i >> k) & 1):
                    cost += min(X_dist[j][k], Y_dist[i - j][k])
            answer[cnt] = min(answer[cnt], cost)
            j -= 1

    for ans in answer:
        print(ans)


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

N,K = map(int,input().split())
lit =  []
for i in range(N):
    a,b = map(int,input().split())
    lit.extend([a for x in range(b)])
lit.sort()
print(lit[K-1])

### FIXED CODE ###

n,k=[int(x) for x in input().split()]
s=[]
for i in [None]*n:
    a,b=[int(x) for x in input().split()]
    s.append((a,b))
s=sorted(s,key=lambda x : x[0])
for i in s:
    if i[1]>=k:
        print(i[0])
        break
    else:
        k-=i[1]
### BUGGY CODE ###

# D - Knapsack Queries on a tree

import bisect

n = int(input())

v = [0] * n
w = [0] * n
for i in range(n):
    v[i], w[i] = map(int, input().split())

# dp table (for some amount)
dp = [None] * min(n, 2 ** 12)

# dp[vertex] = list of (weight, value)
dp[0] = [(0, 0), (w[0], v[0])]

for u in range(1, len(dp)):
    parent = (u - 1) // 2
    dp[u] = dp[parent].copy()
    for ww, vv in dp[parent]:
        dp[u].append((ww + w[u], vv + v[u]))
    dp[u].sort()

    # remove unnecessary entries
    tail = 0
    for i in range(1, len(dp[u])):
        if dp[u][tail][1] < dp[u][i][1]:
            tail += 1
            dp[u][tail] = dp[u][i]
    del dp[u][tail + 1:]

dpkeys = [[ww for ww, vv in dp[u]] for u in range(len(dp))]

# memoization cache for each vertex
cache = [{} for _ in range(n)]

def solve(u, l):
    if u < len(dp):
        x = bisect.bisect_right(dpkeys[u], l) - 1
        return dp[u][x][1]

    if l in cache[u]:
        return cache[u][l]
    parent = (u - 1) // 2
    s = solve(parent, l) if u > 0 else 0
    if l >= w[u]:
        s = max(s, v[u] + (solve(parent, l - w[u]) if u > 0 else 0))
    cache[u][l] = s
    return s

q = int(input())
for i in range(q):
    u, l = map(int, input().split())
    print(solve(u - 1, l))


### FIXED CODE ###

# D - Knapsack Queries on a tree

from sys import stdin
import bisect

readline = stdin.readline
bisect_right = bisect.bisect_right

n = int(readline())

v = [0] * n
w = [0] * n
for i in range(n):
    v[i], w[i] = map(int, readline().split())

max_l = 10 ** 5
vshift = 21
mask = (1 << vshift) - 1

# dp table (for some amount)
dp = [None] * min(n, 2 ** 12)

# dp[vertex] = list of (weight, value)
dp[0] = [(0 << vshift) + 0, (w[0] << vshift) + v[0]]

for u in range(1, len(dp)):
    parent = (u - 1) // 2

    ls = dp[parent][:]
    ls.extend(x + (w[u] << vshift) + v[u] for x in dp[parent]
              if (x >> vshift) + w[u] <= max_l)
    ls.sort()

    # remove unnecessary entries
    tail = 0
    for i in range(1, len(ls)):
        if (ls[tail] >> vshift) == (ls[i] >> vshift):
            ls[tail] = ls[i]
        elif (ls[tail] & mask) < (ls[i] & mask):
            tail += 1
            ls[tail] = ls[i]
    del ls[tail + 1:]
    dp[u] = ls

def solve(u, l):
    if u < len(dp):
        x = bisect_right(dp[u], (l << vshift) + mask) - 1
        return dp[u][x] & mask

    parent = (u - 1) // 2
    s = solve(parent, l)
    if l >= w[u]:
        s = max(s, v[u] + solve(parent, l - w[u]))
    return s

q = int(readline())
for i in range(q):
    u, l = map(int, readline().split())
    print(solve(u - 1, l))
### BUGGY CODE ###

import numpy as np
from numba import njit, i8, u1, void, b1
import heapq
import math

@njit(void(i8,i8,i8,i8,b1[:,:]),cache=True)
def solve(ch,cw,dh,dw,road_map):

    h,w = road_map.shape

    queue = [[0,ch,cw]]
    used_map = np.full((h,w),-1,dtype=np.int64)

    #move walk
    while used_map[dh][dw] == -1 and len(queue) != 0:
        dot = heapq.heappop(queue)
        if used_map[dot[1]][dot[2]] > -1 and used_map[dot[1]][dot[2]] <= dot[0]:
            continue
        used_map[dot[1]][dot[2]] = dot[0]

        for x in range(-2,3,1):
            for y in range(-2,3,1):
                if not(dot[1]+ x < 0 or dot[2]+y < 0 or dot[1]+x >= h or dot[2]+y >= w):
                    if used_map[dot[1]+x][dot[2]+y] == -1 and road_map[dot[1]+x][dot[2]+y] == False:
                        if x == y == 0:
                            continue
                        if abs(x)+abs(y) <= 1:
                            heapq.heappush(queue,[dot[0],dot[1]+x,dot[2]+y])
                        else:
                            heapq.heappush(queue,[dot[0]+1,dot[1]+x,dot[2]+y])

    print(used_map[dh,dw])

h,w = map(int,input().split())
ch,cw = map(int,input().split())
ch,cw = ch-1,cw-1
dh,dw = map(int,input().split())
dh,dw = dh-1,dw-1
road_map = np.array([[c=="#" for c in input()] for _ in range(h)])

solve(ch,cw,dh,dw,road_map)



### FIXED CODE ###

#shotoyooさんのコードをお借りしてテスト

import numpy as np
from numba import njit, b1, i4, i8, f8
from heapq import heappop as hpp, heappush as hp

@njit((b1[:, :],i8,i8,i8,i8), cache=True)
def main(ss,ch,cw,dh,dw):
    inf = 1<<30
    h,w = ss.shape
    start = ch*w+cw
    goal = dh*w+dw
    n = h*w
    seen = np.full(n, inf, np.int64)
    seen[start] = 0
    q = [(0, start)] # ワープ回数, 現在位置, 最後の道の位置
    while q:
        pnum,pu = hpp(q)
        ux,uy = divmod(pu,w)
        if pu==goal:
            break
        for xx in range(-2, 3):
            for yy in range(-2, 3):
                if xx==yy==0:
                    continue
                if abs(xx)+abs(yy)<=1:
                    vv = 0
                else:
                    vv = 1
                x,y = ux+xx, uy+yy
                u = x*w + y
                num = pnum+vv
                if x<0 or y<0 or x>=h or y>=w or ss[x][y]:
                    continue
        #         print(x,y)
                if seen[u]>num:
                    seen[u] = num
                    hp(q,(num, u))
                
    val = seen[goal]
    if val==inf:
        return -1
    else:
        return val
      

h,w = map(int, input().split())
ch,cw = map(int, input().split())
dh,dw = map(int, input().split())
ch -= 1
cw -= 1
dh -= 1
dw -= 1
ss = np.array([[c=="#" for c in input()] for _ in range(h)])

print(main(ss,ch,cw,dh,dw))
### BUGGY CODE ###

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

for i in range(n):
    answer = a[i] * answer
    if a[i] == 0:
        print(answer)
        break
    elif answer > 1000000000000000000 and n == i+1:
        print(-1)
        break
    elif n == i+1:
        print(answer)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
answer = 1
zero_check = 0 in a

for i in range(n):
    answer = a[i] * answer
    if zero_check:
        print(0)
        break
    elif answer > 1000000000000000000:
        print(-1)
        break
else:
    print(answer)
### BUGGY CODE ###

import math
A,B,N=map(int,input().split())
han=0
kot=0
i=0
if B-1>=N:
    print(math.floor(A*N/B)-A*math.floor(N/B))
    i=1
else:
    for a in range(B-1,N,B):
        if han<(math.floor(A*a/B)-A*math.floor(a/B)):
            han=(math.floor(A*a/B)-A*math.floor(a/B))
            kot=a

if i==0:
    print(han)

### FIXED CODE ###

import math
A,B,N=map(int,input().split())
han=0
kot=0
i=0
if B==1:
    print(0)
    exit()
if B-1>=N:
    print(math.floor(A*N/B)-A*math.floor(N/B))
    i=1
else:
    for a in range(B-1,N,B):
        if han<(math.floor(A*a/B)-A*math.floor(a/B)):
            han=(math.floor(A*a/B)-A*math.floor(a/B))
            kot=a

if i==0:
    print(han)
### BUGGY CODE ###

from sys import stdin
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) #再帰定義
N,K=list(map(int,(stdin.readline().strip().split())))
if N%K==0:print(0)
else:
    M=10**19
    while(True):
        M = N
        N-=K
        if N<=0:
            if abs(N)<abs(M):
                print(abs(N))
                break
            else:
                print(abs(M))
                break

### FIXED CODE ###

from sys import stdin
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) #再帰定義
N,K=list(map(int,(stdin.readline().strip().split())))
if N%K==0:print(0)
else:
    M=10**19
    while(True):
        M = N
        N=N%K
        if M==N:
            M = N
            N-=K
            if N<=0:
                if abs(N)<abs(M):
                    print(abs(N))
                    break
                else:
                    print(abs(M))
                    break
### BUGGY CODE ###

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

ans = [0 for i in range(N+1)]

for i in range(1,N):
    checking = i

    #まずスタート地点から幅優先探索を実装
    queue = [[i,0]]
    # checked = list(range(1,i+1)) #マス、距離
    # checked = [i]

    if i <= X:
        checked = list(range(1,i+1))
    else:
        checked = list(range(1,X))
        checked.append(i)

    while(True):
        now = queue[0]

        #ショートカット確認
        if now[0] == X:
            if Y not in checked:
                queue.append([Y,now[1]+1])
                checked.append(Y)
                if not(checking > Y):
                    ans[now[1]+1] += 1
                    # print(now[0],Y,now[1]+1)

        if now[0] == Y:
            if X not in checked:
                queue.append([X,now[1]+1])
                checked.append(X)
                if not(checking > X):
                    ans[now[1]+1] += 1
                    # print(now[0],X,now[1]+1)

        #左
        if now[0]-1 >= 1 and now[0]-1 not in checked:
            queue.append([now[0]-1,now[1]+1])
            checked.append(now[0]-1)
            if not(checking > now[0]-1):
                ans[now[1]+1] += 1
                # print(now[0],now[0]-1,now[1]+1)

        #右
        if now[0]+1 <= N and now[0]+1 not in checked:
            queue.append([now[0]+1,now[1]+1])
            checked.append(now[0]+1)
            if not(checking > now[0]+1):
                ans[now[1]+1] += 1
                # print(now[0],now[0]+1,now[1]+1)

        queue.pop(0)

        if len(checked) == N or len(queue) == 0:
            break

#回答を出力
for i in range(1,N):
    print(ans[i])


### FIXED CODE ###

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

ans = [0 for i in range(N+1)]

def calc_goal(start,goal):
    if goal <= X:
        return goal-start
    if goal <= Y:
        if X >= start:
            return min(goal-start,X-start+Y-goal+1)
        else:
            return min(start-X+Y-goal+1,goal-start)
    else:
        if X >= start:
            return X-start+goal-Y+1
        else:
            return min(start-X+goal-Y+1,goal-start)

for i in range(1,N):
    for j in range(i+1,N+1):
        ans[calc_goal(i,j)] += 1

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

n = int(input())
s = input()

ans = 0
for num in range(1000):
    num_s = str(num).zfill(3)
    f = False
    for i in range(n):
        if f :
            break
        if s[i] == num_s[0]:
            for j in range(i+1,n):
                if s[j] == num_s[1]:
                    for k in range(j+1,n):
                        if s[k] == num_s[2]:
                            f = True
    if f:
        ans +=1
    
print(ans)


### FIXED CODE ###

n = int(input())
s = input()

ans = 0
for num in range(1000):
    num_s = str(num).zfill(3)
    
    s_index_0 = s.find(num_s[0])
    if s_index_0 == -1 :
        continue
    s_index_1 = s.find(num_s[1],s_index_0+1)
    if s_index_1 == -1 :
        continue

    s_index_2 = s.find(num_s[2],s_index_1+1)
    if s_index_2 == -1:
        continue

    ans +=1 

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

import sys

input=sys.stdin.readline
s=input()
t=input()
n,m=len(s),len(t)

dp=[[0]*(m+1) for i in range(n+1)]
ans=[]

for i in range(n):
  for j in range(m):
    if s[i]!=t[j]:
      dp[i+1][j+1]=max(dp[i+1][j],dp[i][j+1])
    else:
      dp[i+1][j+1]=dp[i][j]+1
      
i,j=n,m      
while i>0 and j>0:
  if s[i-1]==t[j-1]:
    ans.append(s[i-1])
    i-=1
    j-=1
  elif dp[i][j]==dp[i-1][j]:
    i-=1
  else:
    j-=1
print(''.join(ans[::-1]))

### FIXED CODE ###

import sys

input=sys.stdin.readline
s=input()
t=input()
n,m=len(s),len(t)

dp=[[0]*(m+1) for i in range(n+1)]
ans=[]

for i in range(n):
  for j in range(m):
    if s[i]!=t[j]:
      dp[i+1][j+1]=max(dp[i+1][j],dp[i][j+1])
    else:
      dp[i+1][j+1]=dp[i][j]+1
      
i,j=n,m      
while i>0 and j>0:
  if s[i-1]==t[j-1]:
    ans.append(s[i-1])
    i-=1
    j-=1
  elif dp[i][j]==dp[i-1][j]:
    i-=1
  else:
    j-=1
print(''.join(ans[::-1]))
### BUGGY CODE ###

n = int(input())
a = input().split()
x = 0
for i in a:
    b = a.pop(0)
    if b in a:
        x += 1
        break
if x == 0:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

n = int(input())
a = input().split()
d = dict()
for i in a:
    d[i] = 0
if len(d) == len(a):
    print("YES")
else:
    print("NO")
### BUGGY CODE ###

import sys
def main():
    input = sys.stdin.readline
    H, W = map(int, input().split())
    A = []
    B = []
    M = 80 * (H + W)
    for _ in range(H):
        a = tuple(map(int, input().split()))
        A.append(a)
    for _ in range(H):
        b = tuple(map(int, input().split()))
        B.append(b)
    AB = [[0] * W for _ in range(H)]
    for i in range(H):
        for j in range(W):
            AB[i][j] = abs(A[i][j] - B[i][j])
    l = [[set([]) for _ in range(M) for _ in range(W)] for _ in range(H)]
    for i in range(H):
        for j in range(W):
            if i == 0 and j == 0:
                l[i][j].add(AB[0][0])
            else:
                t = AB[i][j]
                if i > 0:
                    for k in l[i-1][j]:
                        l[i][j].add(k+t)
                        l[i][j].add(abs(k-t))
                if j > 0:
                    for k in l[i][j-1]:
                        l[i][j].add(k+t)
                        l[i][j].add(abs(k-t))
    return min(l[i][j])
print(main())



### FIXED CODE ###

import sys
def main():
    input = sys.stdin.readline
    H, W = map(int, input().split())
    A = []
    B = []
    M = 80 * (H + W)
    for _ in range(H):
        a = tuple(map(int, input().split()))
        A.append(a)
    for _ in range(H):
        b = tuple(map(int, input().split()))
        B.append(b)
    AB = [[0] * W for _ in range(H)]
    for i in range(H):
        for j in range(W):
            AB[i][j] = abs(A[i][j] - B[i][j])
    l = [set([]) for _ in range(W)]
    lt = [set([]) for _ in range(W)]
    for i in range(H):
        for j in range(W):
            if i == 0 and j == 0:
                lt[j].add(AB[0][0])
            else:
                t = AB[i][j]
                if i > 0:
                    for k in l[j]:
                        lt[j].add(k+t)
                        lt[j].add(abs(k-t))
                if j > 0:
                    for k in lt[j-1]:
                        lt[j].add(k+t)
                        lt[j].add(abs(k-t))
        l = lt
        lt = [set([]) for _ in range(W)]
    return min(l[-1])
print(main())
### BUGGY CODE ###

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

B = []
C = [0]*n
ans = 0
pna = 0
for i in range(m):
    a,b= map(str,input().split())
    if ans == n:
        break
    if b=="AC":
        if a not in B :
            B.append(a)
            ans += 1
            pna += C[int(a)-1]
    else:
        C[int(a)-1] += 1 
print(ans,pna)

### FIXED CODE ###

N,M = [int(x) for x in input().split()]
count = [0]*N
ac = 0
wa = 0
ireta = []
for i in range(M):
    a,b = input().split()
    a = int(a)
    if b == "AC" and count[a-1] == 0:
        count[a-1] = 1
        ac += 1
    elif count[a-1] == 0:
        ireta.append(a)
        wa += 1
for i in range(len(ireta)):
    if count[ireta[i]-1] == 0:
        wa -= 1
print(ac,wa)
### BUGGY CODE ###

n,m = map(int,input().split())
a_to = []
a_from = []
for i in range(m):
    a,b = map(int,input().split())
    if a==1:
        a_to.append(b)
    if b==1:
        a_to.append(a)
    if a==n:
        a_from.append(b)
    if b==n:
        a_from.append(a)
isOK = False
for j in range(len(a_to)):
    if a_to[j] in a_from:
        isOK = True
        break
#print(a_to)
#print(a_from)
if isOK:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')


### FIXED CODE ###

n,m = map(int,input().split())
#a_to = []
#a_from = []
dic = {}
isOK = False
for i in range(m):
    a,b = map(int,input().split())
    if a in [1,n]:
        dic.setdefault(b,0)
        dic[b] += 1
        if dic[b]==2:
            isOK = True
            break
    elif b in [1,n]:
        dic.setdefault(a,0)
        dic[a] += 1
        if dic[a]==2:
            isOK = True
            break
#    if a==1:
#        a_to.append(b)
#    if b==1:
#        a_to.append(a)
#    if a==n:
#        a_from.append(b)
#    if b==n:
#        a_from.append(a)

#for j in range(len(a_to)):
#    if a_to[j] in a_from:
#        isOK = True
#        break
#print(a_to)
#print(a_from)
if isOK:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
### BUGGY CODE ###

N = int(input())
ans = 0

for a in range(1, N):
    for b in range(1, N):
        c = N - a * b
        if c <= 0:
            break
        ans += 1  # 打ち切り判定より先に足すと、おかしくなります

print(ans)

### FIXED CODE ###

import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N = int(readline())
    ans = 0

    for a in range(1, N):
        for b in range(1, N):
            x = a * b
            if x >= N:
                break
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()