Ural State University Problem Set Archive with Online Judge System

English
Russian
Online Judge
About
Submit Problem
Problem Set
Status (online)
Webboard
FAQ
Links
Authors
Register
Update your info
Authors ranklist
Online Contests
Current Contest
      Problems
      Submit
      Status
      Monitor
Scheduled Contests
Archive
Summary Ranklist


Vasya's dad
Time Limit: 1.0 second
Memory Limit: 4 000 KB

Vasya’s dad is good in maths. Lately his favorite objects have been "beautiful" directed graphs. Dad calls a graph "beautiful" if all the following conditions are true:

  1. The graph contains exactly N vertices and N-1 edges.
  2. Exactly one vertex has no entering edges.
  3. The graph contains no directed cycles.
Dad calls two "beautiful" graphs isomorphic, if the vertices of the first graph can be renumbered in such way that it turns into the second one.

Dad picks a natural number N, stocks up blank paper, and draws a "beautiful" graph on each sheet. He verifies that no two drawn graphs are isomorphic.

Given the number N, you are to find the number of sheets that Vasya's dad has to stock up.

Input

Input contains the single number N (1 ≤ N ≤ 50).

Output

Output the number of "beautiful" graphs with N vertices.

Sample Input

Sample input #1
3

Sample input #2
5

Sample Output

Sample output #1
2

Sample output #2
9

Problem Author: Alexander Ipatov
Problem Source: Petrozavodsk summer training camp, August 2005.


Print     Statistic     Discuss     Submit

The Team © 2000-2005. All rights reserved.