import sys
N, M = map(int, input().split())
A = set(int(sys.stdin.readline()) for _ in range(M))
MOD = 10 ** 9 + 7

ans = 0
if N == 1:
    ans = 1
elif N == 2:
    if M == 0:
        ans = 2
    else:
        ans = 1
else:
    if 1 in A:
        p2 = 0
    else:
        p2 = 1
    if 2 in A:
        p1 = 0
    else:
        p1 = p2 + 1
    for i in range(3, N + 1):
        if i in A:
            p2 = p1
            p1 = 0
        else:
            c = (p1 + p2) % MOD
            p2 = p1
            p1 = c
    ans = p1
print(ans) import sys sys N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M A = set(int(sys.stdin.readline()) for _ in range(M)) A set(int(sys.stdin.readline()) for _ in range(M)) set int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 ans = 0 ans 0 if N == 1:
    ans = 1
elif N == 2:
    if M == 0:
        ans = 2
    else:
        ans = 1
else:
    if 1 in A:
        p2 = 0
    else:
        p2 = 1
    if 2 in A:
        p1 = 0
    else:
        p1 = p2 + 1
    for i in range(3, N + 1):
        if i in A:
            p2 = p1
            p1 = 0
        else:
            c = (p1 + p2) % MOD
            p2 = p1
            p1 = c
    ans = p1 N == 1 N 1 ans = 1 ans 1 elif N == 2:
    if M == 0:
        ans = 2
    else:
        ans = 1 N == 2 N 2 if M == 0:
        ans = 2
    else:
        ans = 1 M == 0 M 0 ans = 2 ans 2 ans = 1 ans 1 if 1 in A:
        p2 = 0
    else:
        p2 = 1
     1 in A 1 A p2 = 0 p2 0 p2 = 1 p2 1 if 2 in A:
        p1 = 0
    else:
        p1 = p2 + 1
     2 in A 2 A p1 = 0 p1 0 p1 = p2 + 1 p1 p2 + 1 p2 1 for i in range(3, N + 1):
        if i in A:
            p2 = p1
            p1 = 0
        else:
            c = (p1 + p2) % MOD
            p2 = p1
            p1 = c
     i range(3, N + 1) range 3 N + 1 N 1 if i in A:
            p2 = p1
            p1 = 0
        else:
            c = (p1 + p2) % MOD
            p2 = p1
            p1 = c
     i in A i A p2 = p1 p2 p1 p1 = 0 p1 0 c = (p1 + p2) % MOD c (p1 + p2) % MOD p1 + p2 p1 p2 MOD p2 = p1 p2 p1 p1 = c p1 c ans = p1 ans p1 print(ans) print ans ans = 0 0 ans p1 = c c p1 ans = 1 1 ans p2 = p1 p1 p2 p2 = p1 p1 p2 p1 = 0 0 p1 c = (p1 + p2) % MOD (p1 + p2) % MOD c p1 = p2 + 1 p2 + 1 p1 ans = 2 2 ans p2 = 1 1 p2 N, M = map(int, input().split()) map(int, input().split()) N ans = 1 1 ans A = set(int(sys.stdin.readline()) for _ in range(M)) set(int(sys.stdin.readline()) for _ in range(M)) A M = map(int, input().split()) map(int, input().split()) M MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD p2 = 0 0 p2 p1 = 0 0 p1 ans = p1 p1 ans
import sys
N, M = map(int, input().split())
A = set(int(sys.stdin.readline()) for _ in range(M))
MOD = 10 ** 9 + 7

ans = 0
if N == 1:
    ans = 1
elif N == 2:
    if M == 0:
        ans = 2
    else:
        ans = 1
else:
    if 1 in A:
        p2 = 0
    else:
        p2 = 1
    if 2 in A:
        p1 = 0
    else:
        p1 = p2 + 1
    for i in range(3, N + 1):
        if i in A:
            p2 = p1
            p1 = 0
        else:
            c = (p1 + p2) % MOD
            p2 = p1
            p1 = c
    ans = p1
print(ans)