#include using namespace std; int getPrime(int maxInt) { if(maxInt == 1) return -1; int tmp = maxInt; bool flag = 0; while(!flag){ if(tmp < 2) return -1; for(int i=2; i> N; int ans; while((N = getPrime(N)) != -1){ ans +=N; N-=1; } cout << ans << endl; return 0; }