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

~/algor $ cat problems/integer-oxirgi-uch-raqam-yigindisi

Sum of the last three digits

Easy 1000 ms 64 MB 13%
Share

A positive integer $n$ is given. Find the sum of its last three digits. For example, for $12345$ it is $3 + 4 + 5 = 12$.

The sum of the last three digits of the number

Input

One positive integer $n$.

Output

One integer — the sum of the last three digits.

Note

$100 \le n \le 10^{9}$

Examples

Input #1
12345
Output #1
12
Input #2
1000
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.