# SGU 105 - Div 3

## Description

There is sequence 1, 12, 123, 1234, …, 12345678910, … . Given first $N$ elements of that sequence. You must determine amount of numbers in it that are divisible by 3.

## Input

Input contains $N$ ($1\leq N\leq 2^{31} - 1$).

## Output

Write answer in output file.

## Sample Input

 1  4 

## Sample Output

 1  2 

1110
21201
312302
4123412
51234503
612345604
7123456714
81234567805
912345678906

## Solution

  1 2 3 4 5 6 7 8 9 10 11  #include using namespace std; int main() { int N; cin >> N; cout << N / 3 * 2 + (N % 3 == 2) << endl << endl; return 0; }