The Padovan sequence is $1, 1, 1, 2, 2, 3, 4, 5, 7, 9, \dots$ where $P(n) = P(n-2) + P(n-3)$ and $P(1) = P(2) = P(3) = 1$. Given $N$, print the $N$-th term.
Input
One integer $N$ ($1 \le N \le 60$).
Output
Print the $N$-th Padovan number.
Example 1
Input
10
Output
9
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.