Funny Prime

Description

A prime number is a natural number which has exactly two distinct natural number divisors: $1$ and itself.

The first prime number is $2$. Can you write a program that computes the $n$-th prime number?

Since the answer may be large, you are only required to find the answer modulo $6$.

Constraints

  • $1 \leq n \leq 10^{14}$

Input

n

Output

A single integer representing the $n^{\text{th}}$ prime number modulo $6$.

Sample Input 1

1

Sample Output 1

2

Sample Input 2

100000000000000

Sample Output 2

5

The $10^{14}$-th prime number is $3475385758524527$. Don't forget to output the answer modulo $6$!



Submitting .cpp to 'Funny Prime'


You're not logged in! Click here to login

Time Limit: 1 Seconds
Memory Limit: 1024MB
Your best score: 0
Source: April Fools 2024 (errorgorn, oolimry)

Subtask Score
1 100