Packaging machine#2948

Packaging machine

1 second
64 megabytes
Easy

In a packaging machine, there are toy Santa Clauses and Snow Maidens. The machine can create packages in the following ways:

  1. One Santa Claus in one of two different types of packages;

  2. One Snow Maiden;

  3. A Santa Claus and a Snow Maiden together in one package.

After all the toys are packaged, the machine will produce a sequence of packages of different types. How many distinct sequences of packages can the machine produce?

Input

The first line of the input contains an integer (1 \leq n \leq 10^6).

Output

Output a single integer — the number of different packaging sequences, calculated modulo .

Examples

Example 1

Loading
Loading