L, N, *S = open(0).read().split() print(len(set(S)) * 2 ** (int(L) - 3))