ykc`s easy exam
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Problem Description
One day, YKC his most love the teacher, the teacher heard today to put the film, called the hunt for the barbarians, the name is really strange, like action movies, did not think it was a comedy, oh, no matter, can see a movie is good, but the teacher is naughty we don't want to so easily see this movie, so he thought of a good math (well, the original foreigner is such a love, he felt a certain Mathematics) someone can answer, the problem is that, to give you a fixed number: 1378. And then give you a n, so you ask the last digit of 1378^n is how much.. It sounds very simple, but it won't come out ah, how could feel so much number counted out, but there is a very clever girl out, know the answer after YKC feel the whole body is hollowed out, the original is so simple。。。Input Format
The single line of input contains one integer n (0 ≤ n ≤ 10^9).Output Format
Print single integer — the last digit18