#K1696. Arithmetic Sequence: Find the N-th Term
Arithmetic Sequence: Find the N-th Term
Arithmetic Sequence: Find the N-th Term
You are given an integer n. Your task is to compute the n-th term of an arithmetic sequence where the first term is 2 and the common difference is 3. The formula for the n-th term is given by:
\(a_n = 2 + (n-1) \times 3\)
For example, if n = 1, then \(a_1 = 2\); if n = 4, then \(a_4 = 11\). Write a program that reads input from standard input (stdin), computes the result and prints it to standard output (stdout).
inputFormat
The input consists of a single integer n (1 ≤ n ≤ 106), representing the position in the arithmetic sequence.
outputFormat
Output the n-th term of the arithmetic sequence.
## sample1
2