#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys

input = sys.stdin.readline

cnt = 0

def main():
    N, M = map(int, input().split())
    m = {}
    for l in sys.stdin:
        m[int(l.strip())] = True

    # N 個の階段における移動方法
    dp = [0 for _ in range(N+1)]
    dp[0] = 1
    dp[1] = 1 if 1 not in m else 0

    # N-1の移動パターン + N-2の移動パターン
    for i in range(1, N+1):
        if i in m:
            dp[i] = 0
            continue
        dp[i] = dp[i-1] + dp[i-2]
    print(dp[N] % 1000000007)

main()
