n = int(input()) num = 0 x = 1 for i in range(1,n+1): sq = (~i)**2 if sq > n: break else: x += 1 for j in range(i+1,n+1): if j*sq <= n: num += 1 print(2*num + n + x*(x-1))