def judge(num): for j in range(2,num): if num % j == 0: return 0 elif j == num-1: return num N = int(input()) sum = 0 if N > 1: sum = 2 for i in range(3,N+1,2): sum += judge(i) print(sum)