#include 
using namespace std;

int main(){

int limit =0;
long sumPrimes = 0;
int primeCount = 0;
bool prime = true;
int hunMilCount = 0;

cout << "Find sum of primes below: ";
cin >> limit;

for(int i = 1; i <= limit; i++){

	for (int j = 2; j < i; j++) {
        	if ((i%j)==0) {
                	prime = false;
                }
        }
                 
        if (prime) {
                primeCount++;
		cout << (primeCount-1) << ":   " << i << endl;
		sumPrimes += i;
        }

	if (sumPrimes >= 100000000) {
		hunMilCount++;
		sumPrimes -= 100000000;
	}

prime = true;
}

cout << endl << "The sum of primes below " << limit << " is " << hunMilCount << (sumPrimes-1) << endl;

return 0;
}