Pair the people
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
There are people at a party. Each person can either join the dance as a single individual or as part of a pair with any other person. Find the number of different ways in which all people can join the dance.
Input
One integer .
Output
Print the number of different ways all people can join the dance. Print the answer modulo .
Examples
Let we have people. They can dance in different ways: .
Input #1
Answer #1
Submissions 586
Acceptance rate 21%