import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    n, m = map(int, input().split())
    S = set(int(input()) for _ in range(m))

    a, b = 0, 1 # a[-1], a[0]
    for i in range(1, n + 1):
        if i in S:
            a, b = b, 0
        else:
            a, b = b, (a + b) % MOD

    print(b)
resolve() import sys sys INF = 1 << 60 INF 1 << 60 1 60 MOD = 10**9 + 7 MOD 10**9 + 7 10**9 10 9 7 sys.setrecursionlimit(2147483647) sys.setrecursionlimit sys setrecursionlimit 2147483647 input = lambda:sys.stdin.readline().rstrip() input lambda:sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip def resolve():
    n, m = map(int, input().split())
    S = set(int(input()) for _ in range(m))

    a, b = 0, 1 # a[-1], a[0]
    for i in range(1, n + 1):
        if i in S:
            a, b = b, 0
        else:
            a, b = b, (a + b) % MOD

    print(b) resolve n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m S = set(int(input()) for _ in range(m)) S set(int(input()) for _ in range(m)) set int(input()) int input() input a, b = 0, 1 a 0 b 1 for i in range(1, n + 1):
        if i in S:
            a, b = b, 0
        else:
            a, b = b, (a + b) % MOD

     i range(1, n + 1) range 1 n + 1 n 1 if i in S:
            a, b = b, 0
        else:
            a, b = b, (a + b) % MOD

     i in S i S a, b = b, 0 a b b 0 a, b = b, (a + b) % MOD a b b (a + b) % MOD a + b a b MOD print(b) print b resolve() resolve INF = 1 << 60 1 << 60 INF def resolve():
    n, m = map(int, input().split())
    S = set(int(input()) for _ in range(m))

    a, b = 0, 1 # a[-1], a[0]
    for i in range(1, n + 1):
        if i in S:
            a, b = b, 0
        else:
            a, b = b, (a + b) % MOD

    print(b) def resolve():
    n, m = map(int, input().split())
    S = set(int(input()) for _ in range(m))

    a, b = 0, 1 # a[-1], a[0]
    for i in range(1, n + 1):
        if i in S:
            a, b = b, 0
        else:
            a, b = b, (a + b) % MOD

    print(b) resolve input = lambda:sys.stdin.readline().rstrip() lambda:sys.stdin.readline().rstrip() input MOD = 10**9 + 7 10**9 + 7 MOD
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    n, m = map(int, input().split())
    S = set(int(input()) for _ in range(m))

    a, b = 0, 1 # a[-1], a[0]
    for i in range(1, n + 1):
        if i in S:
            a, b = b, 0
        else:
            a, b = b, (a + b) % MOD

    print(b)
resolve()