N, M = map(int, input().split())
dp = [1]*(N+1)
for _ in range(M):
    a, = map(int, input().split())
    dp[a] = 0
    A.append(a)
for i in range(2,N+1):
    if dp[i] != 0:
        dp[i] = dp[i-1] + dp[i-2]
print(dp[N])
