CF742A Arpa’s hard exam and Mehrdad’s naive cheat

Description

There exists an island called Arpa’s land, some beautiful girls live there, as ugly ones do. Mehrdad wants to become minister of Arpa’s land. Arpa has prepared an exam. Exam has only one question, given $ n $ , print the last digit of $ 1378^{n} $ . ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF742A/ab9ba8346f663bae0aee759b2cc434974bb6a568.png)Mehrdad has become quite confused and wants you to help him. Please help, although it's a naive cheat.

Input Format

The single line of input contains one integer $ n $ ( $ 0

Output Format

Print single integer — the last digit of $ 1378^{n} $ .

Explanation/Hint

In the first example, last digit of $ 1378^{1}=1378 $ is $ 8 $ . In the second example, last digit of $ 1378^{2}=1378·1378=1898884 $ is $ 4 $ .