Last Digit of 1378^N


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 256M

Author:
Problem types

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

Comments

There are no comments at the moment.