LearnPy Hub
← Arena
EasyRating 900

Last Digit of 1378ⁿ

Print the last digit of 1378 to the power n.

Input

One integer n (0 ≤ n ≤ 10⁹).

Output

One digit.

Sample 1

Input
1
Output
8

Sample 2

Input
2
Output
4
solution.py
Output appears here
Last Digit of 1378ⁿ · Python Arena problem · LearnPy Hub