n,m=map(int,input().split())
a_list=[]
for i in range(0,m):
     a_list.append(int(input()))
a=0
b=1
k=0
for i in range(0,n):
    if i+1 in a_list:
        (a,b)=(b,0)
    else:
        (a,b)=(b,a+b)
print(b)