def solve(string):
    n, m, *a = map(int, string.split())
    ans = [0] * (n + 1)
    ans[0] = ans[1] = 1
    for i in range(2, n + 1):
        if i in a:
            continue
        if i - 2 not in a:
            ans[i] += ans[i - 2]
        if i - 1 not in a:
            ans[i] += ans[i - 1]
    return str(ans[-1] % (10**9 + 7))


if __name__ == '__main__':
    n, m = map(int, input().split())
    print(solve('{} {}\n'.format(n, m) + '\n'.join([input() for _ in range(m)])))
