import math
N, M = list(map(int, input().split()))

a_list = []
former_a = -1
imp = False

for _ in range(M):
    a = int(input())
    a_list.append(a)
    if former_a < 0:
        former_a = a
    else:
        if a - former_a == 1:
            imp = True
            break

if imp:
    print(0)
else:
    
    def get_next(a1, length):
        if length < 3:
            return a1
        else:
            one, two = a1, a1
            for i in range(3, length+1, 1):
                ans = one + two
                two = one
                one = ans
            return ans
    if M == 0:
        print(get_next(1, N+1) % 1000000007)
    else:
    
        for idx, a in enumerate(a_list):
            if idx == 0:
                tyokuzen = get_next(1, a)

            else:
                tyokuzen = get_next(tyokuzen, a - a_list[idx-1] -1)

        ans =  get_next(tyokuzen, N - a_list[-1])

        print(ans % 1000000007)
