# -*- coding: utf-8 -*-
import sys
from collections import deque, defaultdict
from math import sqrt, factorial, gcd, ceil
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline().strip() # warning bytes
# def input(): return sys.stdin.buffer.readline().decode('utf-8')
import string
# string.ascii_lowercase
from bisect import bisect_left
MOD = int(1e9)+7
INF = float('inf')


def solve():
    n, m = [int(x) for x in input().split()]
    d = [0] * (n+1)
    d[0] = 1
    for _ in range(m):
        x = int(input())
        d[x] = -1

    for i in range(1, n+1):
        if d[i] != -1:
            if d[i-1] != -1:
                d[i] = d[i-1]
            if i > 1 and d[i-2] != -1:
                d[i] += d[i-2]
            d[i] %= MOD

    print(d[n]%MOD)

t = 1
# t = int(input())
for case in range(1,t+1):
    ans = solve()


"""

azyxwvutsrqponmlkjihgfedcb

""" import sys sys from collections import deque, defaultdict from math import sqrt, factorial, gcd, ceil import string string from bisect import bisect_left MOD = int(1e9)+7 MOD int(1e9)+7 int(1e9) int 1e9 7 INF = float('inf') INF float('inf') float 'inf' def solve():
    n, m = [int(x) for x in input().split()]
    d = [0] * (n+1)
    d[0] = 1
    for _ in range(m):
        x = int(input())
        d[x] = -1

    for i in range(1, n+1):
        if d[i] != -1:
            if d[i-1] != -1:
                d[i] = d[i-1]
            if i > 1 and d[i-2] != -1:
                d[i] += d[i-2]
            d[i] %= MOD

    print(d[n]%MOD) solve 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 n, m = [int(x) for x in input().split()] n [int(x) for x in input().split()] m d = [0] * (n+1) d [0] * (n+1) [0] 0 n+1 n 1 d[0] = 1 d[0] d 0 1 for _ in range(m):
        x = int(input())
        d[x] = -1

     _ range(m) range m x = int(input()) x int(input()) int input() input d[x] = -1 d[x] d x -1 for i in range(1, n+1):
        if d[i] != -1:
            if d[i-1] != -1:
                d[i] = d[i-1]
            if i > 1 and d[i-2] != -1:
                d[i] += d[i-2]
            d[i] %= MOD

     i range(1, n+1) range 1 n+1 n 1 if d[i] != -1:
            if d[i-1] != -1:
                d[i] = d[i-1]
            if i > 1 and d[i-2] != -1:
                d[i] += d[i-2]
            d[i] %= MOD

     d[i] != -1 d[i] d i -1 if d[i-1] != -1:
                d[i] = d[i-1]
             d[i-1] != -1 d[i-1] d i-1 i 1 -1 d[i] = d[i-1] d[i] d i d[i-1] d i-1 i 1 if i > 1 and d[i-2] != -1:
                d[i] += d[i-2]
             i > 1 and d[i-2] != -1 i > 1 i 1 d[i-2] != -1 d[i-2] d i-2 i 2 -1 d[i] += d[i-2] d[i] d i d[i-2] d i-2 i 2 d[i] %= MOD d[i] d i MOD print(d[n]%MOD) print d[n]%MOD d[n] d n MOD t = 1 t 1 for case in range(1,t+1):
    ans = solve() case range(1,t+1) range 1 t+1 t 1 ans = solve() ans solve() solve """

azyxwvutsrqponmlkjihgfedcb

""" INF = float('inf') float('inf') INF def solve():
    n, m = [int(x) for x in input().split()]
    d = [0] * (n+1)
    d[0] = 1
    for _ in range(m):
        x = int(input())
        d[x] = -1

    for i in range(1, n+1):
        if d[i] != -1:
            if d[i-1] != -1:
                d[i] = d[i-1]
            if i > 1 and d[i-2] != -1:
                d[i] += d[i-2]
            d[i] %= MOD

    print(d[n]%MOD) def solve():
    n, m = [int(x) for x in input().split()]
    d = [0] * (n+1)
    d[0] = 1
    for _ in range(m):
        x = int(input())
        d[x] = -1

    for i in range(1, n+1):
        if d[i] != -1:
            if d[i-1] != -1:
                d[i] = d[i-1]
            if i > 1 and d[i-2] != -1:
                d[i] += d[i-2]
            d[i] %= MOD

    print(d[n]%MOD) solve ans = solve() solve() ans t = 1 1 t MOD = int(1e9)+7 int(1e9)+7 MOD
# -*- coding: utf-8 -*-
import sys
from collections import deque, defaultdict
from math import sqrt, factorial, gcd, ceil
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline().strip() # warning bytes
# def input(): return sys.stdin.buffer.readline().decode('utf-8')
import string
# string.ascii_lowercase
from bisect import bisect_left
MOD = int(1e9)+7
INF = float('inf')


def solve():
    n, m = [int(x) for x in input().split()]
    d = [0] * (n+1)
    d[0] = 1
    for _ in range(m):
        x = int(input())
        d[x] = -1

    for i in range(1, n+1):
        if d[i] != -1:
            if d[i-1] != -1:
                d[i] = d[i-1]
            if i > 1 and d[i-2] != -1:
                d[i] += d[i-2]
            d[i] %= MOD

    print(d[n]%MOD)

t = 1
# t = int(input())
for case in range(1,t+1):
    ans = solve()


"""

azyxwvutsrqponmlkjihgfedcb

"""
