Count, arrange

Source: Internet
Author: User

The thing is this--hdu has a network name called 8006 Male classmates, make countless friends, recently the classmate played a romantic, at the same time to n a Netizen each wrote a letter, this is nothing, it is, he unexpectedly put all the letters are loaded the wrong envelope! Watch out, it's all loaded wrong yo!

Now the question is: please help the poor 8006 students to calculate, altogether how many kinds of possible wrong way?

Input

The input data contains more than one test instance, one row per test instance, each row containing a positive integer n (1<n<=20), and N represents the number of 8006 netizens.

Output

For each line of input, output the number of possible error modes, and the output of each instance consumes one row.

Sample Input

23

Sample Output

12
#include <stdio.h>intMain () {intN,i; Long Longa[ A]; a[2]=1; a[3]=2;  for(i=4; i<= +; i++) A[i]= (I-1) * (a[i-1]+a[i-2]);  while(SCANF ("%d", &n)! =EOF) printf ("%lld\n", A[n]);return 0;}

Count, arrange

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.