p = int(input()) all = 2 ** p -1 all = bin(all).strip('0b') result = 0 for e in list(map(int, all)): result += int(e) print(result)