n=int(eval(input()))

cnt=0

for a in range(1,n):

    cnt+=(n-1)//a

print(cnt)
n=int(eval(input()))

cnt=0

a=1

while(a*a<n):

    cnt+=1

    a+=1

a=1

while(a*a<n):

    cnt+=max((n-1)//a-a,0)*2

    a+=1

print(cnt)
n = int(eval(input()))
cnt = 0
for a in range(1, n):
    cnt += (n - 1) // a
print(cnt)

n = int(eval(input()))
cnt = 0
a = 1
while a * a < n:
    cnt += 1
    a += 1
a = 1
while a * a < n:
    cnt += max((n - 1) // a - a, 0) * 2
    a += 1
print(cnt)

-for a in range(1, n): -    cnt += (n - 1) // a +a = 1 +while a * a < n: +    cnt += 1 +    a += 1 +a = 1 +while a * a < n: +    cnt += max((n - 1) // a - a, 0) * 2 +    a += 1