Loading...
Division
Time: 1 s
Memory: 125 MB
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
Constraint
  \(1 \leq n \leq 2^{31} - 1\)
Output
Write answer to the output.
Examples
Input
Output
4
2
Problem Info
Problem ID 421
Time Limit 1000 ms
Memory Limit 128000 KB
Moderators pixelarco
Statistics
Submit
You need to Login or Registration for submit your solution