#P2336. A simple math problem

A simple math problem

Given a number n, you should calculate 123456...11121314...n module 11

Input

A single line with an integer n (0 < n ≤ 10 18 )

Output

Output one integer, 123456...11121314...n module 11

Sample Input

1
20
21

Sample Output

1
5
4

HINT

1 ≡ 1( mod 11)


1234567891011121314151617181920 ≡ 5( mod 11)


123456789101112131415161718192021 ≡ 4( mod 11).

Source