The young hacker
Taras dreams to become a computer hacker. Having seen all kinds of movies and surf the net, he realized that without mathematics, and there is not enough. And what is most offensive, still have to teach them math is not your favorite. For a start he took a number system, and, as a computer hacker listings all posts filed as a sequence of hexadecimal digits, it is engaged in this number system. He learned that in hexadecimal besides the usual decimal digits are used as numbers A, B, C, D, E, F.
Now he is interested in: how quickly to any number in hexadecimal notation to find the remainder after dividing this number by 5.
Input
In a single line of input file contains a number in hexadecimal. Since Taras is not even in school, the number of digits in a number of at least one but not more than 10^6.
Output
In the output file display a single digit - modulo a given number by 5.