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

import numpy as np
import scipy as sp


def rec_stairs(step, broken, pattern_n, N):
    # print(step, broken, pattern_n, N)
    if step == N:
        pattern_n = pattern_n + 1
    elif step > N:
        pass
    else:
        if (step+1) in broken:
            pass
        else:
            pattern_n = rec_stairs(step+1, broken, pattern_n, N)
            # print(step, broken, pattern_n, N)
            # print('a', pattern_n)

        if (step+2) in broken:
            pass
        else:
            pattern_n = rec_stairs(step+2, broken, pattern_n, N)
            # print(step, broken, pattern_n, N)
            # print('b', pattern_n)

    return pattern_n


def main():
    try:
        in1 = list(map(int, input().split()))
        N = in1[0]
        M = in1[1]

        in2 = [int(input()) for i in range(M)]

        sum_pattern_n = rec_stairs(0, in2, 0, N)
        print(sum_pattern_n % 1000000007)
    except:
        pass

if __name__ == '__main__':
    main()
