Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2])

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

right = []
left = []
for i in range(N):
    if i % 2 == 0:
        right.append(A[i])
    else:
        left.append(A[i])
answer = left[::-1]
answer += right
if N%2 == 1:
  answer = answer[::-1]
print(*answer)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

right = []
left = []
for i in range(N):
    if i % 2 == 0:
        right.append(A[i])
    else:
        left.append(A[i])
answer = left[::-1]
answer += right
print(*answer if N%2 == 0 else *answer[::-1])
                

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

right = []
left = []
for i in range(N):
    if i % 2 == 0:
        right.append(A[i])
    else:
        left.append(A[i])
answer = left[::-1]
answer += right
if N%2 == 1:
  answer = answer[::-1]
print(*answer)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

print(max(A) - max(B))

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

print(max(A) - min(A))
Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

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

H, W = lr()
if H%3==0 or W%3==0:
    answer = 0
else:
    answer = min(H, W)
# さらに小さくするには縦と横で割る
def cal(H, W):
    h = H // 3
    area = [h * W, (H-h) * (W//2), (H-h) * ((W+1)//2)]
    answer = min(answer, max(area)-min(area))
    h += 1
    area = [h * W, (H-h) * (W//2), (H-h) * ((W+1)//2)]
    answer = min(answer, max(area)-min(area))

cal(H, W)
cal(W, H)
print(answer)
# 13

Fixed submission:
import sys

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

H, W = lr()
if H%3==0 or W%3==0:
    answer = 0
else:
    answer = min(H, W)
# さらに小さくするには縦と横で割る
h = H // 3
area = [h * W, (H-h) * (W//2), (H-h) * ((W+1)//2)]
answer = min(answer, max(area)-min(area))
h += 1
area = [h * W, (H-h) * (W//2), (H-h) * ((W+1)//2)]
answer = min(answer, max(area)-min(area))
w = W // 3
area = [w * H, (W-w) * (H//2), (W-w) * ((H+1)//2)]
answer = min(answer, max(area)-min(area))
w += 1
area = [w * H, (W-w) * (H//2), (W-w) * ((H+1)//2)]
answer = min(answer, max(area)-min(area))
print(answer)

# 13
Buggy python submission (verdict: Time Limit Exceeded):
import sys
from heapq import heapify, heappop, heappush

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

# 左側A[:k] (N<=k<=2*N)までの最大値を求める
# 同様に右側も求める
N = ir()
A = lr()
left_sum = [0] * (N+1)
right_sum = [0] * (N+1)
left = A[:N]; heapify(left)
right = A[-N:]
right = [-x for x in right]
heapify(right)
left_sum[0] = sum(left)
center = A[N:-N]
for i in range(N):
    heappush(left, center[i])
    heappop(left)
    left_sum[i+1] = sum(left)

right_sum[N] = sum(right)
for i in range(N):
    heappush(right, -center[N-1-i])
    heappop(right)
    right_sum[N-1-i] = sum(right)

answer = -10 ** 15
for i in range(N+1):
    temp = left_sum[i] + right_sum[i]
    if temp > answer:
        answer = temp

print(answer)
# 05


Fixed submission:
import sys
from heapq import heapify, heappop, heappush

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

# 左側A[:k] (N<=k<=2*N)までの最大値を求める
# 同様に右側も求める
N = ir()
A = lr()
left_sum = [0] * (N+1)
right_sum = [0] * (N+1)
left = A[:N]; heapify(left)
right = A[-N:]
right = [-x for x in right]
heapify(right)
cur = sum(left)
left_sum[0] = cur
center = A[N:-N]
for i in range(N):
    heappush(left, center[i])
    l = heappop(left)
    cur = cur - l + center[i]
    left_sum[i+1] = cur

cur = sum(right)
right_sum[N] = cur
for i in range(N):
    heappush(right, -center[N-1-i])
    r = heappop(right)
    cur = cur - r + (-center[N-1-i])
    right_sum[N-1-i] = cur

answer = -10 ** 15
for i in range(N+1):
    temp = left_sum[i] + right_sum[i]
    if temp > answer:
        answer = temp

print(answer)
# 05
Buggy python submission (verdict: Runtime Error):
N, K = list(map(int, input().split()))
l = [0] * 10 ** 5
for i in range(N):
    a, b = map(int, input().split())
    l[a] += b
count = 0
for j in range(10**5):
    count += l[j]
    if count >= K:
        print(j)
        break


Fixed submission:
N, K = list(map(int, input().split()))
l = [0] * 10 ** 5
for i in range(N):
    a, b = map(int, input().split())
    l[a-1] += b
count = 0
for j in range(10**5):
    count += l[j]
    if count >= K:
        print(j+1)
        break

Buggy python submission (verdict: Time Limit Exceeded):
N, K = list(map(int, input().split()))
l = []
for i in range(N):
    a, b = map(int, input().split())
    l.extend([a] * b)
print(sorted(l)[K-1])

Fixed submission:
N, K = list(map(int, input().split()))
l = [0] * 10 ** 5
for i in range(N):
    a, b = map(int, input().split())
    l[a-1] += b
count = 0
for j in range(10**5):
    count += l[j]
    if count >= K:
        print(j+1)
        break
Buggy python submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

A, B, C = rl()
bool = A[-1] == B[0] and B[-1] == C[0]
print('YES' if bool else 'NO')

Fixed submission:
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

A, B, C = rs().split()
bool = A[-1] == B[0] and B[-1] == C[0]
print('YES' if bool else 'NO')
Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

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

MOD = 10 ** 9 + 7
n, m = lr()
X = np.array(lr())
Y = np.array(lr())
x_len = X[1:] - X[:-1]
y_len = Y[1:] - Y[:-1]

square = x_len[:, None] * y_len[None, :]
answer = 0
for i in range(n-1):
    answer += (square[i] % MOD).sum()
    answer %= MOD

answer *= (n-1) * (m-1)
print(answer%MOD)
# 43

Fixed submission:
import sys
import numpy as np

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

MOD = 10 ** 9 + 7
n, m = lr()
X = np.array(lr())
Y = np.array(lr())
coef_x = np.arange(n)*2 - (n-1)
X *= coef_x
xsum = (X%MOD).sum() % MOD
coef_y = np.arange(m)*2 - (m-1)
Y *= coef_y
ysum = (Y%MOD).sum() % MOD
answer = xsum * ysum % MOD
print(answer % MOD)

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

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

MOD = 10 ** 9 + 7
n, m = lr()
X = np.array(lr())
Y = np.array(lr())
x_len = X[1:] - X[:-1]
y_len = Y[1:] - Y[:-1]

square = x_len[:, None] * y_len[None, :] % MOD
answer = (n-1) * (m-1) * square.sum() % MOD
print(answer%MOD)
# 43

Fixed submission:
import sys
import numpy as np

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

MOD = 10 ** 9 + 7
n, m = lr()
X = np.array(lr())
Y = np.array(lr())
coef_x = np.arange(n)*2 - (n-1)
X *= coef_x
xsum = (X%MOD).sum() % MOD
coef_y = np.arange(m)*2 - (m-1)
Y *= coef_y
ysum = (Y%MOD).sum() % MOD
answer = xsum * ysum % MOD
print(answer % MOD)
Buggy python submission (verdict: Runtime Error):
a,b=input(),split()
print('HD'[a!=b])

Fixed submission:
a,b=input().split()
print('HD'[a!=b])
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = [input() for _ in range(N)]
B = [input() for _ in range(M)]

flag = 'No'
for i in range(N-M):
    for j in range(N-M):
        check = []
        for k in range(M):
            if A[i+k][j:j+M] == B[i+k]:
                check.append(1)
            else:
                check.append(-1)
        if sum(check) == M:
            flag = 'Yes'
print(flag)			


Fixed submission:
N, M = map(int, input().split())
A = [input() for _ in range(N)]
B = [input() for _ in range(M)]

flag = 'No'
for i in range(N-M+1):
    for j in range(N-M+1):
        check = []
        for k in range(M):
            if A[i+k][j:j+M] == B[k]:
                check.append(1)
            else:
                check.append(-1)
        if sum(check) == M:
            flag = 'Yes'
print(flag)
Buggy python submission (verdict: Time Limit Exceeded):
import sys

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

# 行列のDPを持つ　縦軸がa
N, Ma, Mb = lr()
INF = 5000
limit = N * 10 + 1
dp = [[INF] * limit for _ in range(limit)]
dp[0][0] = 0
for _ in range(N):
    a, b, c = lr()
    used = set()
    for i in range(limit):
        if i < a:
            continue
        for j in range(limit):
            if j < b:
                continue
            # 商品は１個しか買えない            
            if (i-a, j-b) not in used:
                if dp[i][j] > dp[i-a][j-b] + c:
                    used.add((i, j))
                    dp[i][j] = dp[i-a][j-b] + c

answer = INF
for i in range(1, limit):
    if i % Ma != 0:
        continue
    for j in range(1, limit):
        if j % Mb != 0:
            continue
        if i // Ma == j // Mb:
            if dp[i][j] < answer:
                answer = dp[i][j]

print(answer if answer != INF else -1)
# 10

Fixed submission:
import sys

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

# 行列のDPを持つ　縦軸がa
N, Ma, Mb = lr()
INF = 5000
limit = N * 10 + 1
dp = [[INF] * limit for _ in range(limit)]
dp[0][0] = 0
for _ in range(N):
    a, b, c = lr()
    used = set()
    for i in range(limit):
        if i < a:
            continue
        for j in range(limit):
            if j < b:
                continue
            # 商品は１個しか買えない            
            if (i-a, j-b) not in used:
                if dp[i][j] > dp[i-a][j-b] + c:
                    used.add((i, j))
                    dp[i][j] = dp[i-a][j-b] + c

answer = INF
for i in range(1, limit):
    if i % Ma != 0:
        continue
    for j in range(1, limit):
        if j % Mb != 0:
            continue
        if i // Ma == j // Mb:
            if dp[i][j] < answer:
                answer = dp[i][j]

print(answer if answer != INF else -1)
# 10
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())
import itertools
count = 0
for pattern in list(itertools.product(range(K+1), repeat=2)):
    #print(pattern)
    if S-K <= sum(pattern) <= S:
        
        count += 1

print(count)

Fixed submission:
K, S = map(int, input().split())
import itertools
count = 0
for pattern in itertools.product(range(K+1), repeat=2):
    #print(pattern)
    if S-K <= sum(pattern) <= S:
        
        count += 1

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())
import itertools
count = 0
for pattern in list(itertools.product(range(K+1), repeat=3)):
    #print(pattern)
    if sum(pattern) == S:
        
        count += 1

print(count)

Fixed submission:
K, S = map(int, input().split())
import itertools
count = 0
for pattern in itertools.product(range(K+1), repeat=2):
    #print(pattern)
    if S-K <= sum(pattern) <= S:
        
        count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
S = input()
while S:
    print(S)
    for x in ['dreamer', 'eraser', 'dream', 'erase']:
        if S.endswith(x):
            S = S[:-len(x)]
            break
    else:
        print('NO')
        exit()
print('YES')
        

Fixed submission:
S = input()
while S:
    for x in ['dreamer', 'eraser', 'dream', 'erase']:
        if S.endswith(x):
            S = S[:-len(x)]
            break
    else:
        print('NO')
        exit()
print('YES')
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import numpy as np

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  # applies to only numbers
rs = lambda: stdin.readline().rstrip()  # ignores trailing space

N = ri()
A = np.arange(1, N+1, dtype=np.int64)
A_cum = A.cumsum()
i = np.nonzero(A>=N)[0][0]
diff = A_cum[i] - N
s = set(range(1, i+1))
for j in range(i+1, 0, -1):
    if j <= diff:
        s -= {j}
        diff -= j
    else:
        print(j)
# 57


Fixed submission:
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  # applies to only numbers
rs = lambda: stdin.readline().rstrip()  # ignores trailing space

N = ri()
x = int((2*N) ** .5)
if x * (x+1) < 2 * N:
    x += 1
diff = x * (x+1) * .5 - N
for i in range(x, 0, -1):
    if i <= diff:
        diff -= i
    else:
        print(i)
# 57
Buggy python submission (verdict: Runtime Error):
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  # applies to numbers only
rs = lambda: stdin.readline().rstrip()  # ignores trailing space

#人は0からN-1,言語は1からMまで
N, M = rl()
KL = [rl() for _ in range(N)]
speak_lan = [[] for _ in range(M+1)] #0は使わない
for i, x in enumerate(KL):
    k, *lan = x
    for l in lan:
        speak_lan[l].append(i)

communicate = set()

def dfs(person):
    global communicate
    lan = KL[person][1:]
    for l in lan:
        for p in speak_lan[l]:
            if p not in communicate:
                communicate.add(p)
                dfs(p)

dfs(0)
if len(communicate) == N:
    print('YES')
else:
    print('NO')



Fixed submission:
import sys
sys.setrecursionlimit(10 ** 7)

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  # applies to numbers only
rs = lambda: stdin.readline().rstrip()  # ignores trailing space

#人は0からN-1,言語は1からMまで
N, M = rl()
KL = [rl() for _ in range(N)]
speak_lan = [[] for _ in range(M+1)] #0は使わない
for i, x in enumerate(KL):
    k, *lan = x
    for l in lan:
        speak_lan[l].append(i)

communicate = set()
used_language = set()
def dfs(person):
    global communicate
    global used_language
    lan = KL[person][1:]
    for l in lan:
        if l in used_language:
            continue
        used_language.add(l)
        for p in speak_lan[l]:
            if p not in communicate:
                communicate.add(p)
                dfs(p)

dfs(0)
if len(communicate) == N:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
import sys

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

N = ir()
A = [ir() for _ in range(N)]
answer = A[0] - 1
cur_limit = 2
for a in A[1:]:
    if a == cur_limit:
        cur_limit += 1
        continue
    answer += (a-cur_limit) // cur_limit)

print(answer)
# 44


Fixed submission:
import sys

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

N = ir()
A = [ir() for _ in range(N)]
answer = A[0] - 1
cur_limit = 2
for a in A[1:]:
    if a == cur_limit:
        cur_limit += 1
        continue
    answer += -((-(a-cur_limit)) // cur_limit)

print(answer)
# 44
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
D = set(map(int, input().split()))
safe = set(range(10)) - D

def test(N):
    return set((int(x) for x in str(N))) <= safe

def F(N):
    while N % 10:
        if text(N):
            return N
        N += 1
    N //= 10
    x = F(N)
    y = min(safe)
    return 10 * x + y

answer = F(N)
print(answer)



Fixed submission:
N, K = map(int, input().split())
D = set(input().split())

while True:
    l = list(str(N))
    for x in l:
        if x in D:
            N += 1
            break
    else:
        print(N)
        exit()
Buggy python submission (verdict: Runtime Error):
def ab(a,b,c):
	if((a+b>c) and (a+c>b) and (b+c>a)):
		return 1
	else:
		return 0
n=input()
n=int(n)
l=get_array()
c=0
for i in range(n):
	for j in range(i+1,n):
		for k in range(j+1,n):
			if(l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i]):
				if(ab(l[i],l[j],l[k])):
					#print(i,j,k)
					c+=1
print(c)	

Fixed submission:
def get_array():
    l=list(map(int, input().split()))
    return l
def ab(a,b,c):
	if((a+b>c) and (a+c>b) and (b+c>a)):
		return 1
	else:
		return 0
n=input()
n=int(n)
l=get_array()
c=0
for i in range(n):
	for j in range(i+1,n):
		for k in range(j+1,n):
			if(l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i]):
				if(ab(l[i],l[j],l[k])):
					#print(i,j,k)
					c+=1
print(c)
Buggy python submission (verdict: Runtime Error):
n=int(input())
print(a+a*a+a*a*a)

Fixed submission:
a=int(input())
print(a+a*a+a*a*a)
Buggy python submission (verdict: Runtime Error):
n,m=int(input().split())
for i in range(0,m):
  if n-2*i-1>n/2:
    print(i+1,n-i)
  else:
    print(i+1,n-i-1)

Fixed submission:
n,m=map(int,input().split())
for i in range(0,m):
  if n-2*i-1>n/2 or n%2==1 :
    print(i+1,n-i)
  else:
    print(i+1,n-i-1)
Buggy python submission (verdict: Runtime Error):
a = ["Sunny", "cloudy", "Rainy"]
s = input()
for i in range(0, 3):
  if s == a[i]:
    print(a[(i+1)/3])


Fixed submission:
a = ["Sunny", "Cloudy", "Rainy"]
s = input()
for i in range(0, 3):
  if s == a[i]:
    print(a[(i+1)%3])
Buggy python submission (verdict: Runtime Error):
n = int(input())
v = list(map(int, input().split()))
t = [0]
s = 2000000000
for i in range(0, n):
  t.append(t[i]+v[i])
for i in range(0, n-1):
  s = min(s, abs(t[n]-t[i+1])
print(s)

Fixed submission:
n = int(input())
v = list(map(int, input().split()))
t = [0]
s = 2000000000
for i in range(0, n):
  t.append(t[i]+v[i])
for i in range(0, n-1):
  s = min(s, abs(t[n]-2*t[i+1]))
print(s)

Buggy python submission (verdict: Runtime Error):
n = int(input())
v = list(map(int, input().split()))
t = [0]
s = 2000000000
for i in range(0, n):
  t.append(t[i]+v[i])
for i in range(0, n-1):
  s = min(s, abs(s-t[i+1])
print(s)

Fixed submission:
n = int(input())
v = list(map(int, input().split()))
t = [0]
s = 2000000000
for i in range(0, n):
  t.append(t[i]+v[i])
for i in range(0, n-1):
  s = min(s, abs(t[n]-2*t[i+1]))
print(s)
Buggy python submission (verdict: Runtime Error):
s = input()
c = [0]*26
v = []
m = 0
for i in range(0, len(s)):
  c[(int)s[i]-'a'] += 1
for i in range(0, 26):
  m = max(m, c[i])
for i in range(0, 26):
  if c[i] == m:
    v.append((char)'a'+i)
a = 10000
for i in range(0, len(c)):
  n = 0
  t = 0
  for j in range(0, len(s)):
    if s[j] != v[i]:
      t += 1
    else:
      n = max(n, (t+1)//2)
  n = max(n, (t+1)//2)
  a = min(a, n)
print(a)

Fixed submission:
s = input()
a = 10000
for i in range(0, 26):
  n = 0
  t = 0
  b = True
  for j in range(0, len(s)):
    if s[j] != chr(ord("a")+i):
      t += 1
    elif b:
      n = max(n, t)
      t = 0
    else:
      n = max(n, (t+1)//2)
      t = 0
  n = max(n, t)
  a = min(a, n)
print(a)
Buggy python submission (verdict: Runtime Error):
n = int(input())
v = map(int, input().split())
v.sort(reverse = True)
s = 0
for i in range(0, n):
  s += v[1+2*i]
print(s)

Fixed submission:
n = int(input())
v = list(map(int, input().split()))
v.sort(reverse = True)
s = 0
for i in range(0, n):
  s += v[1+2*i]
print(s)
Buggy python submission (verdict: Runtime Error):
s = input()
a = ""
for i in range(0, len(s)):
  if s[i] == "0":
    a += "0"
  elif s[i] == "1":
    a += "1"
  elif s[i] == "B" and len(a) != 0:
    a[-1] = ""
print(a)

Fixed submission:
s = input()
a = ""
for i in range(0, len(s)):
  if s[i] == "0":
    a += "0"
  elif s[i] == "1":
    a += "1"
  elif s[i] == "B" and len(a) != 0:
    b = a[0:-1]
    a = b
print(a)

Buggy python submission (verdict: Runtime Error):
s = input()
a = ""
for i in range(0, len(s)):
  if s[i] == "0":
    a += "0"
  elif s[i] == "1":
    a += "1"
  elif s[i] == "B" and len(a) != 0:
    del a[-1]
print(a)

Fixed submission:
s = input()
a = ""
for i in range(0, len(s)):
  if s[i] == "0":
    a += "0"
  elif s[i] == "1":
    a += "1"
  elif s[i] == "B" and len(a) != 0:
    b = a[0:-1]
    a = b
print(a)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

ans = 0
for c in range(1,n-1):
  ab = n-c
  f = factorization(ab)
  tmp = 1
  for i in range(len(f)):
    tmp *= f[i][1]+1
  ans += tmp
  
print(ans+1)

Fixed submission:
import itertools
import collections

N = int(input())

def prime_factor_table(n):
    table = [0] * (n + 1)
    
    for i in xrange(2, n + 1):
        if table[i] == 0:
            for j in xrange(i + i, n + 1, i):
                table[j] = i
    
    return table

def prime_factor(n, prime_factor_table):
    prime_count = collections.Counter()
    
    while prime_factor_table[n] != 0:
        prime_count[prime_factor_table[n]] += 1
        n /= prime_factor_table[n]
    prime_count[n] += 1
    
    return prime_count

t = prime_factor_table(N)

ans = 0
for c in range(1,N-1):
  ab = N-c
  f = prime_factor(ab,t)
  v = f.values()
  tmp = 1
  for i in range(len(f)):
    tmp *= v[i]+1
  ans += tmp
  
print(ans+1)