The participants of the first congress of Paranoiac Informatics Society took
their places at a rectangular table. All sat at the same side. One of them
pose the following question: "What is the number of ways we can shake our
hands without leaving our places? Each time every participant can shake hand
of one person and this person must be his/her neighbour."
Since the congress participants are theoreticians, they asked you to write a
program, which computes this number of ways. The participants hate big
numbers, so they need only the last digit of the result.
Task
Write a program which:
reads the number of congress participants from the standard input,
computes the last digit of the number of ways the participants can shake hands,
writes the answer to the standard output.
Input
The first and only line of the standard input contains one integer
().
Output
The first and only line of the standard output should contain one digit,
i.e. the last digit of the number of ways the participants can shake hands.
Example
For the input data:
4
the correct result is:
5
All correct ways to shake participants' hands for .
Task author: Jakub Radoszewski.
Kontakt
W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem szkopul@fri.edu.pl.
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, odwiedź nasze serwery na Discordzie. Są one moderowane przez społeczność, ale członkowie zespołu wsparcia również aktywnie się tam udzielają.