#!/usr/bin/env python3 #fileencoding: utf-8 L = int(input()) N = int(input()) S = [i for i in input().strip().split(" ")] print(2**(L-3) * len(S))