#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

## Problem Description

Bradley is eating an entire series of pies for lunch. However, since Bradley is an epic math geek, these pies are not just normal pies, they are PRIME PIES. Prime pies have a very special property. Their weights are always prime. Thus, there will be a prime pie of 2kg, 3kg, 5kg, but not 4kg. The prime pies are also always sorted in order. So the first prime pie will be one with 2kg, the second one will be 3kg, the third one will be 5kg, etc.

Bradley wants to eat *N* prime pies for lunch today. He will always start eating the prime pies from the smallest one first. So, in a case where N = 4, Bradley will eat the 2kg pie, then the 3kg pie, then the 5kg pie and then the 7kg pie. Thus, Bradley would have eaten a total of 2+3+5+7=17 kg of prime pies. Given N, help Bradley find out the total amount of prime pies he would have eaten in kg.

Your program should implement the following functions:

*long long int amountEaten(int N)*, which should return the total amount of prime pies Bradley would have eaten.

## Limits

Subtask 1 (9%): 1 <=*N*<= 100

Subtask 2 (12%): 1 <=

*N*<= 1 000

Subtask 3 (27%): 1 <=

*N*<= 10 000

Subtask 4 (52%): 1 <=

*N*<= 1 000 000

It is also guranteed that the millionth prime is less than 20 000 000.

## Sample Input 1

4

## Sample Output 1

17

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 9 | 50 | 2.5s | 64MB | Minimum |

2 | 12 | 50 | 2.5s | 64MB | Minimum |

3 | 27 | 50 | 2.5s | 64MB | Minimum |

4 | 52 | 50 | 2.5s | 64MB | Minimum |

5 | 0 | 1 | 2.5s | 64MB | Minimum |

### Judge Compile Command

g++ grader.cpp ans.cpp -o primepie -Wall -static -O2 -lm -m64 -s -w -std=gnu++14 -fmax-errors=512