import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
MOD = 10 ** 9 + 7
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, M = LI()
    a = set([I() for _ in range(M)])

    dp = [0] * (N + 1)
    dp[0] = 1
    if 1 not in a:
        dp[1] = 1
    for i in range(N - 1):
        if i + 2 not in a:
            dp[i+2] = dp[i] + dp[i+1]
            dp[i+2] %= MOD

    print(dp[-1])

if __name__ == '__main__':
    resolve() import bisect, collections, copy, heapq, itertools, math, string, sys bisect collections copy heapq itertools math string sys 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 sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 INF = float('inf') INF float('inf') float 'inf' MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 def I(): return int(input()) I def F(): return float(input()) F def SS(): return input() SS int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x def LI(): return [int(x) for x in input().split()] LI int(x)-1 for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x)-1 int(x) int x 1 def LI_(): return [int(x)-1 for x in input().split()] LI_ float(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() float(x) float x def LF(): return [float(x) for x in input().split()] LF def LSS(): return input().split() LSS def resolve():
    N, M = LI()
    a = set([I() for _ in range(M)])

    dp = [0] * (N + 1)
    dp[0] = 1
    if 1 not in a:
        dp[1] = 1
    for i in range(N - 1):
        if i + 2 not in a:
            dp[i+2] = dp[i] + dp[i+1]
            dp[i+2] %= MOD

    print(dp[-1]) resolve N, M = LI() N LI() LI M I() for _ in range(M) for _ in range(M) _ range(M) range M for _ in range(M) I() I a = set([I() for _ in range(M)]) a set([I() for _ in range(M)]) set [I() for _ in range(M)] 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 a:
        dp[1] = 1
     1 not in a 1 a dp[1] = 1 dp[1] dp 1 1 for i in range(N - 1):
        if i + 2 not in a:
            dp[i+2] = dp[i] + dp[i+1]
            dp[i+2] %= MOD

     i range(N - 1) range N - 1 N 1 if i + 2 not in a:
            dp[i+2] = dp[i] + dp[i+1]
            dp[i+2] %= MOD

     i + 2 not in a i + 2 i 2 a dp[i+2] = dp[i] + dp[i+1] dp[i+2] dp i+2 i 2 dp[i] + dp[i+1] dp[i] dp i dp[i+1] dp i+1 i 1 dp[i+2] %= MOD dp[i+2] dp i+2 i 2 MOD print(dp[-1]) print dp[-1] dp -1 if __name__ == '__main__':
    resolve() __name__ == '__main__' __name__ '__main__' resolve() resolve INF = float('inf') float('inf') INF def I(): return int(input()) def I(): return int(input()) I def F(): return float(input()) def F(): return float(input()) F def resolve():
    N, M = LI()
    a = set([I() for _ in range(M)])

    dp = [0] * (N + 1)
    dp[0] = 1
    if 1 not in a:
        dp[1] = 1
    for i in range(N - 1):
        if i + 2 not in a:
            dp[i+2] = dp[i] + dp[i+1]
            dp[i+2] %= MOD

    print(dp[-1]) def resolve():
    N, M = LI()
    a = set([I() for _ in range(M)])

    dp = [0] * (N + 1)
    dp[0] = 1
    if 1 not in a:
        dp[1] = 1
    for i in range(N - 1):
        if i + 2 not in a:
            dp[i+2] = dp[i] + dp[i+1]
            dp[i+2] %= MOD

    print(dp[-1]) resolve MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD def LF(): return [float(x) for x in input().split()] def LF(): return [float(x) for x in input().split()] LF def LSS(): return input().split() def LSS(): return input().split() LSS input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input def LI_(): return [int(x)-1 for x in input().split()] def LI_(): return [int(x)-1 for x in input().split()] LI_ def LI(): return [int(x) for x in input().split()] def LI(): return [int(x) for x in input().split()] LI def SS(): return input() def SS(): return input() SS
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
MOD = 10 ** 9 + 7
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, M = LI()
    a = set([I() for _ in range(M)])

    dp = [0] * (N + 1)
    dp[0] = 1
    if 1 not in a:
        dp[1] = 1
    for i in range(N - 1):
        if i + 2 not in a:
            dp[i+2] = dp[i] + dp[i+1]
            dp[i+2] %= MOD

    print(dp[-1])

if __name__ == '__main__':
    resolve()
