Last Digit of 1378^N
Find the last decimal digit of \(1378^N\).
Input
One line containing \(N\).
The input satisfies:
- \(0 \le N \le 10^18\)
Output
Print the last digit.
Example
Input
16695089808556011
Output
2
Find the last decimal digit of \(1378^N\).
One line containing \(N\).
The input satisfies:
Print the last digit.
16695089808556011
2
Comments