#!/usr/bin/env python3


def main():
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]
    diff_a = [a[i+1] - a[i] for i in range(m - 1)]
    if 1 in diff_a:
        print(0)
        return
    method = [0] * (n + 1)
    method[0] = 1
    if 1 not in a:
        method[1] = 1
    for i in range(2, n + 1):
        if i in a:
            continue
        else:
            method[i] = method[i-1] + method[i-2]
            method[i] %= 1000000007
    print(method[n])


if __name__ == '__main__':
    main()
