Rearrange Them

N people stand in a line, and we numbered them 1,2...n, and now you are asked to rearrange them. The ith people is considred in the front of the (i+1)th, after the rearrange, everyone the people in front of whom can not be the same one as before. How many different strategies you can do the rearrange.

Input:

Each test case just contains one integer, the number of people you have to rearrange.

Output:

The number of strategies you have to rearrange them, with the condition above.

Sample Input:

3
4
Sample Output:

3
11

http://blog.csdn.net/a601025382s/article/details/12347523

https://www.baidu.com/link?url=uY1_Q5UHaKcYpPcgpaTqGUkXLiB9vwkV_o49EbvewlxnjRM6WatGw601vLqXHyP3WzlcIqfmmBGsl0yx2iV8Oq&wd=&eqid=980ca684000abcf20000000558d67b25