#QHD0000010. Căn - log - sin (sqrt log sin)
Căn - log - sin (sqrt log sin)
sqrt log sin
Source: UVa
Version: Phuoc Hung OJ Extended
Problem Statement
The sequence is defined by and, for , $x_i=x_{\lfloor i-\sqrt{i}\rfloor}+x_{\lfloor\ln i\rfloor}+x_{\lfloor i\sin^2 i\rfloor}$. The sine argument is in radians. Compute modulo .
Input
The only line contains .
Output
Print modulo .
Subtasks
- Subtask 1 — 20 points: 0 <= i <= 1000.
- Subtask 2 — 30 points: 0 <= i <= 100000.
- Subtask 3 — 50 points: 0 <= i <= 1000000.
Examples
Input
0
Output
1
Explanation
By the base definition, .