#!/bin/python def count_subsets(n, subsets): import math if n == 0 or subsets == 0: return 0 if subsets == 1 or subsets == n: return 1 n -= subsets res = 1 while n > subsets: res *= math.factorial(subsets) n -= subsets res = res * math.factorial(subsets) / math.factorial(n) return res import sys n = int(raw_input().strip()) m = map(int, raw_input().strip().split(' ')) # your code goes here res = 0 for subsets in xrange(1, n + 1): res += count_subsets(n, subsets) print res