Calgary Collegiate Programming Competition 2017


2017-03-18 20:00 CET

Calgary Collegiate Programming Competition 2017


2017-03-19 00:00 CET
The end is near!
Contest is over.
Not yet started.
Contest is starting in -184 days 20:15:18

Time elapsed


Time remaining


Problem C
Character Development

Virtually every single book, play, movie, novel, and game has at least one character. Most have more, and some even have thousands! As every good writer knows, the difficulty of creating a character increases with each new major character added. This is because fictional characters are truly developed through their relationships with others.

If there are no characters or only one character, no relationships need to be explored. With two characters, there is one relationship. If there are three characters, however, there are four relationships: the ones between each pair of characters, and finally the relationship when all three are together. In general, the relationship between all subsets of at least two characters must be explored.

Given a literary work with $N$ characters, how many relationships need to be explored?


The input contains a single integer, $N$ ($0 \leq N \leq 30$), the number of characters.


Output a single line with the number of relationships that need to be explored.

Sample Input 1 Sample Output 1
Sample Input 2 Sample Output 2