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
Output appears hereOne integer n (0 ≤ n ≤ 10⁹).
One digit.
1
8
2
4
Output appears here