fib=[0,0,1,2]
for i in range(4,100005):
  fib.append(fib[i-1]+fib[i-2])

n,m=map(int,input().split())
a=[input() for i in range(m)]

a.insert(0,0)
a.append(n)
ans=1
for i in range(m+1):
  ans*=fib[a[i+1]-a[i]]
print(ans)