import math
from math import gcd,pi,sqrt
INF = float("inf")
MOD = 10**9 + 7

import sys
sys.setrecursionlimit(10**6)
import itertools
import bisect
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    n,m = i_map()
    a = set([i_input() for i in range(m)])

    dp = [INF] * (n+1)

    dp[0] = 1
    if 1 not in a:
        dp[1] = 1
    else:
        dp[1] = 0

    for i in range(2,n+1):
        if i  not in a:
            dp[i] = dp[i-1] + dp[i-2]
        else:
            dp[i] = 0
    print(dp[n]%MOD)




if __name__=="__main__":
    main() import math math from math import gcd,pi,sqrt INF = float("inf") INF float("inf") float "inf" MOD = 10**9 + 7 MOD 10**9 + 7 10**9 10 9 7 import sys sys sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 import itertools itertools import bisect bisect from collections import Counter,deque def i_input(): return int(input()) i_input def i_map(): return map(int, input().split()) i_map def i_list(): return list(i_map()) i_list i_input() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) i_input() i_input def i_row(N): return [i_input() for _ in range(N)] i_row N N i_list() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) i_list() i_list def i_row_list(N): return [i_list() for _ in range(N)] i_row_list N N def s_input(): return input() s_input def s_map(): return input().split() s_map def s_list(): return list(s_map()) s_list s_input for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) s_input def s_row(N): return [s_input for _ in range(N)] s_row N N s_list() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) s_list() s_list def s_row_str(N): return [s_list() for _ in range(N)] s_row_str N N list(s_input()) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(s_input()) list s_input() s_input def s_row_list(N): return [list(s_input()) for _ in range(N)] s_row_list N N def main():
    n,m = i_map()
    a = set([i_input() for i in range(m)])

    dp = [INF] * (n+1)

    dp[0] = 1
    if 1 not in a:
        dp[1] = 1
    else:
        dp[1] = 0

    for i in range(2,n+1):
        if i  not in a:
            dp[i] = dp[i-1] + dp[i-2]
        else:
            dp[i] = 0
    print(dp[n]%MOD) main n,m = i_map() n i_map() i_map m i_input() for i in range(m) for i in range(m) i range(m) range m for i in range(m) i_input() i_input a = set([i_input() for i in range(m)]) a set([i_input() for i in range(m)]) set [i_input() for i in range(m)] dp = [INF] * (n+1) dp [INF] * (n+1) [INF] INF n+1 n 1 dp[0] = 1 dp[0] dp 0 1 if 1 not in a:
        dp[1] = 1
    else:
        dp[1] = 0

     1 not in a 1 a dp[1] = 1 dp[1] dp 1 1 dp[1] = 0 dp[1] dp 1 0 for i in range(2,n+1):
        if i  not in a:
            dp[i] = dp[i-1] + dp[i-2]
        else:
            dp[i] = 0
     i range(2,n+1) range 2 n+1 n 1 if i  not in a:
            dp[i] = dp[i-1] + dp[i-2]
        else:
            dp[i] = 0
     i  not in a i a dp[i] = dp[i-1] + dp[i-2] dp[i] dp i dp[i-1] + dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 dp[i] = 0 dp[i] dp i 0 print(dp[n]%MOD) print dp[n]%MOD dp[n] dp n MOD if __name__=="__main__":
    main() __name__=="__main__" __name__ "__main__" main() main def s_map(): return input().split() def s_map(): return input().split() s_map def i_map(): return map(int, input().split()) def i_map(): return map(int, input().split()) i_map def s_input(): return input() def s_input(): return input() s_input def main():
    n,m = i_map()
    a = set([i_input() for i in range(m)])

    dp = [INF] * (n+1)

    dp[0] = 1
    if 1 not in a:
        dp[1] = 1
    else:
        dp[1] = 0

    for i in range(2,n+1):
        if i  not in a:
            dp[i] = dp[i-1] + dp[i-2]
        else:
            dp[i] = 0
    print(dp[n]%MOD) def main():
    n,m = i_map()
    a = set([i_input() for i in range(m)])

    dp = [INF] * (n+1)

    dp[0] = 1
    if 1 not in a:
        dp[1] = 1
    else:
        dp[1] = 0

    for i in range(2,n+1):
        if i  not in a:
            dp[i] = dp[i-1] + dp[i-2]
        else:
            dp[i] = 0
    print(dp[n]%MOD) main INF = float("inf") float("inf") INF def s_row_str(N): return [s_list() for _ in range(N)] def s_row_str(N): return [s_list() for _ in range(N)] s_row_str def s_row_list(N): return [list(s_input()) for _ in range(N)] def s_row_list(N): return [list(s_input()) for _ in range(N)] s_row_list def s_row(N): return [s_input for _ in range(N)] def s_row(N): return [s_input for _ in range(N)] s_row def i_row_list(N): return [i_list() for _ in range(N)] def i_row_list(N): return [i_list() for _ in range(N)] i_row_list MOD = 10**9 + 7 10**9 + 7 MOD def i_list(): return list(i_map()) def i_list(): return list(i_map()) i_list def s_list(): return list(s_map()) def s_list(): return list(s_map()) s_list def i_input(): return int(input()) def i_input(): return int(input()) i_input def i_row(N): return [i_input() for _ in range(N)] def i_row(N): return [i_input() for _ in range(N)] i_row
import math
from math import gcd,pi,sqrt
INF = float("inf")
MOD = 10**9 + 7

import sys
sys.setrecursionlimit(10**6)
import itertools
import bisect
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    n,m = i_map()
    a = set([i_input() for i in range(m)])

    dp = [INF] * (n+1)

    dp[0] = 1
    if 1 not in a:
        dp[1] = 1
    else:
        dp[1] = 0

    for i in range(2,n+1):
        if i  not in a:
            dp[i] = dp[i-1] + dp[i-2]
        else:
            dp[i] = 0
    print(dp[n]%MOD)




if __name__=="__main__":
    main()
