1351: 集合划分

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Normal Judger Creator:
Submit:4 Solved:2

Description

n 个元素的集合{1,2, , n }可以划分为若干个非空子集。例如,当 n=4 时,集合{12

34}可以划分为 15 个不同的非空子集如下:

{{1}{2}{3}{4}}

{{12}{3}{4}}

{{13}{2}{4}}

{{14}{2}{3}}

{{23}{1}{4}}

{{24}{1}{3}}

{{34}{1}{2}}

{{12}{34}}

{{13}{24}}

{{14}{23}}

{{123}{4}}

{{124}{3}}

{{134}{2}}

{{234}{1}}

{{1234}}

«编程任务:

给定正整数 n,计算出 n 个元素的集合{1,2, , n }可以划分为多少个不同的非空子集。 

Input

第 1 行是元素个数 n。

Output

将计算出的不同的非空子集数输出

Sample Input Copy

5

Sample Output Copy

52

Source/Category