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

~/algor $ cat problems/raqamlar-yigindisi-juftmi

Is the digit sum even?

Easy 1000 ms 64 MB 16%
Share

A three-digit positive integer $n$ is given. Check whether the statement is true: “the sum of the digits of $n$ is even”.

The parity of the digit sum of a three-digit number

Input

One three-digit positive integer $n$.

Output

One integer: $1$ if the statement is true, otherwise $0$.

Note

$100 \le n \le 999$

Examples

Input #1
123
Output #1
1
Input #2
124
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.