import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

def main():
    n, m = MII()
    a_lst = [II() for _ in range(m)]
    DIV = 10**9+7
    stairs = [1]*2 + [0]*(n-1)
    for a in a_lst:
        stairs[a] = 'NG'
    cnt = 0
    for i in range(2, n+1):
        if cnt == 2:
            print(0)
            exit(1)
        if stairs[i] == 'NG': cnt += 1; continue
        cnt = 0
        a = stairs[i-1] if stairs[i-1] != 'NG' else 0
        b = stairs[i-2] if stairs[i-2] != 'NG' else 0
        stairs[i] = a + b
    print(stairs[n]%DIV)

if __name__ == '__main__':
    main()
