n=int(input()) LIST = range(2,n+1) for i in range(2,int(n**0.5)): LIST=[x for x in LIST if (x==i or x%i!=0)] print(sum(LIST))