#!/usr/bin/env python3



import sys



P_NUM = 1000000007





def solv(n, m, a):

    comb_m2 = 1

    if 1 in a:

        comb_m1 = 0

    else:

        comb_m1 = 1



    comb = 1

    for i in range(2, n+1):

        if i in a:

            comb = 0

            a.remove(i)

        else:

            comb = (comb_m1 + comb_m2) % P_NUM



        comb_m1, comb_m2 = comb, comb_m1



    return comb





if __name__ == '__main__':



    n, m = list(map(int, input().split()))

    if m:

        a = set(map(int, sys.stdin))

    else:

        a = set()



    ans = solv(n, m, a)



    print(ans)

#!/usr/bin/env python3



import sys



P_NUM = 1000000007





def solv(n, m, a):

    comb_m2 = 1

    if 1 in a:

        comb_m1 = 0

    else:

        comb_m1 = 1



    for i in range(2, n+1):

        if i in a:

            comb_m1, comb_m2 = 0, comb_m1

        else:

            comb_m1, comb_m2 = (comb_m1 + comb_m2) % P_NUM, comb_m1



    return comb_m1





if __name__ == '__main__':



    n, m = list(map(int, input().split()))

    if m:

        a = set(map(int, sys.stdin))

    else:

        a = set()



    ans = solv(n, m, a)



    print(ans)

#!/usr/bin/env python3
import sys

P_NUM = 1000000007


def solv(n, m, a):
    comb_m2 = 1
    if 1 in a:
        comb_m1 = 0
    else:
        comb_m1 = 1
    comb = 1
    for i in range(2, n + 1):
        if i in a:
            comb = 0
            a.remove(i)
        else:
            comb = (comb_m1 + comb_m2) % P_NUM
        comb_m1, comb_m2 = comb, comb_m1
    return comb


if __name__ == "__main__":
    n, m = list(map(int, input().split()))
    if m:
        a = set(map(int, sys.stdin))
    else:
        a = set()
    ans = solv(n, m, a)
    print(ans)

#!/usr/bin/env python3
import sys

P_NUM = 1000000007


def solv(n, m, a):
    comb_m2 = 1
    if 1 in a:
        comb_m1 = 0
    else:
        comb_m1 = 1
    for i in range(2, n + 1):
        if i in a:
            comb_m1, comb_m2 = 0, comb_m1
        else:
            comb_m1, comb_m2 = (comb_m1 + comb_m2) % P_NUM, comb_m1
    return comb_m1


if __name__ == "__main__":
    n, m = list(map(int, input().split()))
    if m:
        a = set(map(int, sys.stdin))
    else:
        a = set()
    ans = solv(n, m, a)
    print(ans)

-    comb = 1 -            comb = 0 -            a.remove(i) +            comb_m1, comb_m2 = 0, comb_m1 -            comb = (comb_m1 + comb_m2) % P_NUM -        comb_m1, comb_m2 = comb, comb_m1 -    return comb +            comb_m1, comb_m2 = (comb_m1 + comb_m2) % P_NUM, comb_m1 +    return comb_m1