Buggy python submission (verdict: Time Limit Exceeded):
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from math import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
import heapq
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
INF = float('inf')
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
    return int(readline())

is_prime = [0] * (10**6+1)
is_prime[0] = False
is_prime[1] = False

for a in range(2,10**6+1):
    if is_prime[a]:
        for v in range(a*2,10**6+1,a):
            is_prime[v] = False
# def yaku(m):
#     ans = []
#     i = 1
#     while i*i <= m:
#         if m % i == 0:
#             j = m // i
#             ans.append(i)
#             if j != i:
#                 ans.append(j)
#         i += 1
#     ans = sorted(ans)
#     return ans
n = I()
ans = 0
for c in range(1,n):
    nc = n-c
    if nc == 1:
        ans += 1
        continue
    else:
        ans += 2
    i = 2
    while i*i <= nc:
        if nc%i == 0:
            if i*i == nc:
                ans += 1
            else:
                ans += 2
        i += 1
print(ans)


Fixed submission:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from math import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
import heapq
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
INF = float('inf')
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
    return int(readline())

is_prime = [1] * (10**6+1)

for a in range(2,10**6+1):
        for v in range(a,10**6+1,a):
            is_prime[v] += 1
# print(is_prime[:10])

n = I()
ans = 0
for c in range(1,n):
    nc = n-c
    ans += is_prime[nc]
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from math import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
import heapq
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
INF = float('inf')
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
    return int(readline())

n = I()
ab = set()
for c in range(1,n):
    nc = n-c
    ab.add(nc)
ans = 0
for v in ab:
    if v == 1:
        ans += 1
        continue
    #print(v)
    i = 1
    while i*i <= v:
        # print('?')
        if v%i == 0:
            #print('?')
            div = v//i
            if i == div:
                ans += 1
            else:
                ans += 2
        i += 1
print(ans)


Fixed submission:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from math import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
import heapq
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
INF = float('inf')
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
    return int(readline())

is_prime = [1] * (10**6+1)

for a in range(2,10**6+1):
        for v in range(a,10**6+1,a):
            is_prime[v] += 1
# print(is_prime[:10])

n = I()
ans = 0
for c in range(1,n):
    nc = n-c
    ans += is_prime[nc]
print(ans)