#CCBCHBON0000023. Continue trong while (Continue in a While Loop)

Continue trong while (Continue in a While Loop)

Continue in a While Loop

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Sum the integers from 1 to nn that are not divisible by 3, using while-loop logic. Advance the counter before continue. The result for n=0n=0 is 0.

Input

One integer 0≤n≤100000\le n\le10000.

Output

Print the sum of integers not divisible by 3.

Subtasks

  • Subtask 1 (20%): 0≤n≤80\le n\le 8.

  • Subtask 2 (30%): 0≤n≤10000\le n\le 1000.

  • Subtask 3 (50%): 0≤n≤100000\le n\le 10000.

Examples

Example 1

Input:

6

Output:

12

Explanation:

Sum numbers from 1 to 6 excluding multiples of 3: 12.

Example 2

Input:

0

Output:

0

Explanation:

Sum numbers from 1 to 0 excluding multiples of 3: 0.