n, m = map(int, input().split())
danger = list(int(input()) for _ in range(m))
danger = [0] + danger + [n]
def fibo(n):
    memo = [-1]*(n+1)
    def _fibo(n):
        if memo[n] != -1:
            return memo[n]
        else:
            if n <= 1:
                memo[n] = n
                return memo[n]
            else:
                memo[n] = _fibo(n-1) + _fibo(n-2)
                return memo[n]
    return _fibo(n)
ans = 1
for j in range(m+1):
    if danger[j+1] - danger[j] ==1:
        ans *= 0
    else:
        ans *= fibo(danger[j+1] - danger[j] )
print(ans)