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

b = 0
for i in range(m-1):
    if a[i+1] - a[i] == 1:
        b = 1
if b == 1:
    print(0)
else:
    kaidan = [1,2]
    for i in range(2,n):
        kaidan.append(kaidan[i-1]+kaidan[i-2])
    kaidan = [0] + kaidan