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

~/algor $ cat problems/minglar-raqami

Thousands digit

Easy 1000 ms 64 MB 12%
Share

A positive integer $n$ is given. Find the digit in its thousands place, that is, the fourth digit from the end.

The thousands digit of the number is highlighted

Input

One positive integer $n$.

Output

One digit — the thousands digit of the number.

Note

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

Examples

Input #1
12345
Output #1
2
Input #2
1000
Output #2
1

Sign in to submit a solution

Signing up is free and takes a minute.