Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/uchga-karralilar-soni

Count of multiples of three

Easy 1000 ms 64 MB 22%
Share

Two integers $a$ and $b$ are given. Find how many integers from $a$ to $b$ (both inclusive) are divisible by $3$. $0$ is also divisible by $3$.

The segment from a to b on the number line; multiples of three are highlighted

Input

One line with two integers: $a$ and $b$.

Output

One integer — the number of multiples of three.

Note

$-10^{6} \le a \le b \le 10^{6}$

Examples

Input #1
1 10
Output #1
3
Input #2
-7 7
Output #2
5

Sign in to submit a solution

Signing up is free and takes a minute.