#!/usr/bin/env python3
import collections as cl
import sys

MOD = 10 ** 9 + 7


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def main():
    N, M = MI()
    isbroken = [False] * (N + 1)
    for i in range(M):
        a = II()
        isbroken[a] = True

    steps = [0] * (N + 1)

    steps[0] = 1
    if not isbroken[1]:
        steps[1] = 1
    for i in range(2, N + 1):
        if isbroken[i]:
            continue
        steps[i] = steps[i - 1] + steps[i - 2]
        steps[i] %= MOD
    print(steps[-1])


main() import collections as cl collections import sys sys MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 def II():
    return int(sys.stdin.readline()) II return int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline def MI():
    return map(int, sys.stdin.readline().split()) MI return map(int, sys.stdin.readline().split()) map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split def LI():
    return list(map(int, sys.stdin.readline().split())) LI return list(map(int, sys.stdin.readline().split())) list(map(int, sys.stdin.readline().split())) list map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split def main():
    N, M = MI()
    isbroken = [False] * (N + 1)
    for i in range(M):
        a = II()
        isbroken[a] = True

    steps = [0] * (N + 1)

    steps[0] = 1
    if not isbroken[1]:
        steps[1] = 1
    for i in range(2, N + 1):
        if isbroken[i]:
            continue
        steps[i] = steps[i - 1] + steps[i - 2]
        steps[i] %= MOD
    print(steps[-1]) main N, M = MI() N MI() MI M isbroken = [False] * (N + 1) isbroken [False] * (N + 1) [False] False N + 1 N 1 for i in range(M):
        a = II()
        isbroken[a] = True

     i range(M) range M a = II() a II() II isbroken[a] = True isbroken[a] isbroken a True steps = [0] * (N + 1) steps [0] * (N + 1) [0] 0 N + 1 N 1 steps[0] = 1 steps[0] steps 0 1 if not isbroken[1]:
        steps[1] = 1
     not isbroken[1] isbroken[1] isbroken 1 steps[1] = 1 steps[1] steps 1 1 for i in range(2, N + 1):
        if isbroken[i]:
            continue
        steps[i] = steps[i - 1] + steps[i - 2]
        steps[i] %= MOD
     i range(2, N + 1) range 2 N + 1 N 1 if isbroken[i]:
            continue
         isbroken[i] isbroken i continue steps[i] = steps[i - 1] + steps[i - 2] steps[i] steps i steps[i - 1] + steps[i - 2] steps[i - 1] steps i - 1 i 1 steps[i - 2] steps i - 2 i 2 steps[i] %= MOD steps[i] steps i MOD print(steps[-1]) print steps[-1] steps -1 main() main MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD def LI():
    return list(map(int, sys.stdin.readline().split())) def LI():
    return list(map(int, sys.stdin.readline().split())) LI def II():
    return int(sys.stdin.readline()) def II():
    return int(sys.stdin.readline()) II def main():
    N, M = MI()
    isbroken = [False] * (N + 1)
    for i in range(M):
        a = II()
        isbroken[a] = True

    steps = [0] * (N + 1)

    steps[0] = 1
    if not isbroken[1]:
        steps[1] = 1
    for i in range(2, N + 1):
        if isbroken[i]:
            continue
        steps[i] = steps[i - 1] + steps[i - 2]
        steps[i] %= MOD
    print(steps[-1]) def main():
    N, M = MI()
    isbroken = [False] * (N + 1)
    for i in range(M):
        a = II()
        isbroken[a] = True

    steps = [0] * (N + 1)

    steps[0] = 1
    if not isbroken[1]:
        steps[1] = 1
    for i in range(2, N + 1):
        if isbroken[i]:
            continue
        steps[i] = steps[i - 1] + steps[i - 2]
        steps[i] %= MOD
    print(steps[-1]) main def MI():
    return map(int, sys.stdin.readline().split()) def MI():
    return map(int, sys.stdin.readline().split()) MI
#!/usr/bin/env python3
import collections as cl
import sys

MOD = 10 ** 9 + 7


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def main():
    N, M = MI()
    isbroken = [False] * (N + 1)
    for i in range(M):
        a = II()
        isbroken[a] = True

    steps = [0] * (N + 1)

    steps[0] = 1
    if not isbroken[1]:
        steps[1] = 1
    for i in range(2, N + 1):
        if isbroken[i]:
            continue
        steps[i] = steps[i - 1] + steps[i - 2]
        steps[i] %= MOD
    print(steps[-1])


main()
