# input here
_INPUT = """\
10 2
4
5
"""
"""
K = int(input())
H, W, K = map(int, input().split())
a = list(map(int, input().split()))
xy = [list(map(int, input().split())) for i in range(N)]
p = tuple(map(int,input().split()))
"""
def main():
    N, M = map(int, input().split())
    a = set([int(input()) for i in range(M)])
    inf = 10**9+7

    #動的計画法問題
    dp = [0] * (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 in a:
            continue
        dp[i] = dp[i-1] + dp[i-2]
        
        dp[i] %= inf

    print(dp[N]) 

     
if __name__ == '__main__':
    import io
    import sys
    import math
    import itertools
    from collections import deque

    # sys.stdin = io.StringIO(_INPUT)
    main() _INPUT = """\
10 2
4
5
""" _INPUT """\
10 2
4
5
""" """
K = int(input())
H, W, K = map(int, input().split())
a = list(map(int, input().split()))
xy = [list(map(int, input().split())) for i in range(N)]
p = tuple(map(int,input().split()))
""" def main():
    N, M = map(int, input().split())
    a = set([int(input()) for i in range(M)])
    inf = 10**9+7

    #動的計画法問題
    dp = [0] * (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 in a:
            continue
        dp[i] = dp[i-1] + dp[i-2]
        
        dp[i] %= inf

    print(dp[N]) 

      main N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M int(input()) for i in range(M) for i in range(M) i range(M) range M for i in range(M) int(input()) int input() input a = set([int(input()) for i in range(M)]) a set([int(input()) for i in range(M)]) set [int(input()) for i in range(M)] inf = 10**9+7 inf 10**9+7 10**9 10 9 7 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
    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 in a:
            continue
        dp[i] = dp[i-1] + dp[i-2]
        
        dp[i] %= inf

     i range(2,N+1) range 2 N+1 N 1 if i in a:
            continue
         i in a i a continue 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] %= inf dp[i] dp i inf print(dp[N]) print dp[N] dp N if __name__ == '__main__':
    import io
    import sys
    import math
    import itertools
    from collections import deque

    # sys.stdin = io.StringIO(_INPUT)
    main() __name__ == '__main__' __name__ '__main__' import io io import sys sys import math math import itertools itertools from collections import deque main() main def main():
    N, M = map(int, input().split())
    a = set([int(input()) for i in range(M)])
    inf = 10**9+7

    #動的計画法問題
    dp = [0] * (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 in a:
            continue
        dp[i] = dp[i-1] + dp[i-2]
        
        dp[i] %= inf

    print(dp[N]) 

      def main():
    N, M = map(int, input().split())
    a = set([int(input()) for i in range(M)])
    inf = 10**9+7

    #動的計画法問題
    dp = [0] * (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 in a:
            continue
        dp[i] = dp[i-1] + dp[i-2]
        
        dp[i] %= inf

    print(dp[N]) 

      main _INPUT = """\
10 2
4
5
""" """\
10 2
4
5
""" _INPUT
# input here
_INPUT = """\
10 2
4
5
"""
"""
K = int(input())
H, W, K = map(int, input().split())
a = list(map(int, input().split()))
xy = [list(map(int, input().split())) for i in range(N)]
p = tuple(map(int,input().split()))
"""
def main():
    N, M = map(int, input().split())
    a = set([int(input()) for i in range(M)])
    inf = 10**9+7

    #動的計画法問題
    dp = [0] * (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 in a:
            continue
        dp[i] = dp[i-1] + dp[i-2]
        
        dp[i] %= inf

    print(dp[N]) 

     
if __name__ == '__main__':
    import io
    import sys
    import math
    import itertools
    from collections import deque

    # sys.stdin = io.StringIO(_INPUT)
    main()