Codeforces Round 260 (Div. 2)
翻译中…
Fedya studies in a gymnasium. Fedya's maths hometask is to calculate the following expression:
翻译中…
$(1^{*n*} + 2^{*n*} + 3^{*n*} + 4^{*n*}) *mod* 5$
翻译中…
for given value of $*n*$. Fedya managed to complete the task. Can you? Note that given number $*n*$ can be extremely large (e.g. it can exceed any integer type of your programming language).
翻译中…
Input
翻译中…
The single line contains a single integer $*n*$ ($0 ≤ *n* ≤ 10^{10^{5}}$). The number doesn't contain any leading zeroes.
翻译中…
Output
翻译中…
Print the value of the expression without leading zeros.
翻译中…
Note
翻译中…
Operation $*x* *mod* *y*$ means taking remainder after division $*x*$ by $*y*$.
翻译中…
Note to the first sample:
翻译中…

翻译中…
样例
Input #1
4
Output #1
4
InputCopy
OutputCopy
Input #2
124356983594583453458888889
Output #2
0
InputCopy
OutputCopy
题目信息
标签
数学
数论
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。