def solve():
    for i in range(2, n+1):
        prev1 = dp[i-1]
        prev2 = dp[i-2]
        if i in set:
            continue
        else:
            dp[i] = prev1 + prev2
    return dp[n]


n, m = map(int, input().split())
lst = []
for i in range(m):
    lst.append(int(input()))
set = set(lst)
dp = [0] * (n+1)
dp[0] = 1
if 1 not in set:
    dp[1] = 1
res = solve()
print(res%1000000007) def solve():
    for i in range(2, n+1):
        prev1 = dp[i-1]
        prev2 = dp[i-2]
        if i in set:
            continue
        else:
            dp[i] = prev1 + prev2
    return dp[n] solve for i in range(2, n+1):
        prev1 = dp[i-1]
        prev2 = dp[i-2]
        if i in set:
            continue
        else:
            dp[i] = prev1 + prev2
     i range(2, n+1) range 2 n+1 n 1 prev1 = dp[i-1] prev1 dp[i-1] dp i-1 i 1 prev2 = dp[i-2] prev2 dp[i-2] dp i-2 i 2 if i in set:
            continue
        else:
            dp[i] = prev1 + prev2
     i in set i set continue dp[i] = prev1 + prev2 dp[i] dp i prev1 + prev2 prev1 prev2 return dp[n] dp[n] dp n n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m lst = [] lst [] for i in range(m):
    lst.append(int(input())) i range(m) range m lst.append(int(input())) lst.append lst append int(input()) int input() input set = set(lst) set set(lst) set lst dp = [0] * (n+1) dp [0] * (n+1) [0] 0 n+1 n 1 dp[0] = 1 dp[0] dp 0 1 if 1 not in set:
    dp[1] = 1 1 not in set 1 set dp[1] = 1 dp[1] dp 1 1 res = solve() res solve() solve print(res%1000000007) print res%1000000007 res 1000000007 def solve():
    for i in range(2, n+1):
        prev1 = dp[i-1]
        prev2 = dp[i-2]
        if i in set:
            continue
        else:
            dp[i] = prev1 + prev2
    return dp[n] def solve():
    for i in range(2, n+1):
        prev1 = dp[i-1]
        prev2 = dp[i-2]
        if i in set:
            continue
        else:
            dp[i] = prev1 + prev2
    return dp[n] solve lst = [] [] lst m = map(int, input().split()) map(int, input().split()) m set = set(lst) set(lst) set res = solve() solve() res n, m = map(int, input().split()) map(int, input().split()) n dp = [0] * (n+1) [0] * (n+1) dp
def solve():
    for i in range(2, n+1):
        prev1 = dp[i-1]
        prev2 = dp[i-2]
        if i in set:
            continue
        else:
            dp[i] = prev1 + prev2
    return dp[n]


n, m = map(int, input().split())
lst = []
for i in range(m):
    lst.append(int(input()))
set = set(lst)
dp = [0] * (n+1)
dp[0] = 1
if 1 not in set:
    dp[1] = 1
res = solve()
print(res%1000000007)