from heapq import heappush, heappop, heapify, heapreplace
from collections import defaultdict


class Solution:
    def main(self):
        N, M =map(int, input().split())
        self.A = set()
        for _ in range(M):
            self.A.add(int(input()))
        self.memo = {0: 1}
        res = self.rec(N)
        print(res%1000000007)

    def rec(self, n):
        if n in self.A or n < 0:
            return 0
        elif n in self.memo:
            return self.memo[n]
        else:
            val = self.rec(n-1) + self.rec(n-2)
            self.memo[n] = val
            return val


if __name__ == '__main__':
    Solution().main()