def solve(N, a):
    mod = 10**9 + 7
    dp = [0] * (N+1)
    step = [0] * (N+1)
    for aa in a:
        step[aa] = 1

    dp[0] = 1
    if step[1] == 0:
        dp[1] = 1

    for i in range(2, N+1):
        if step[i] == 0:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] %= mod

    return dp[N]


if __name__ == "__main__":
    N, M = map(int, input().split())
    a = [int(input()) for _ in range(M)]

    print(solve(N, a)) def solve(N, a):
    mod = 10**9 + 7
    dp = [0] * (N+1)
    step = [0] * (N+1)
    for aa in a:
        step[aa] = 1

    dp[0] = 1
    if step[1] == 0:
        dp[1] = 1

    for i in range(2, N+1):
        if step[i] == 0:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] %= mod

    return dp[N] solve mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 dp = [0] * (N+1) dp [0] * (N+1) [0] 0 N+1 N 1 step = [0] * (N+1) step [0] * (N+1) [0] 0 N+1 N 1 for aa in a:
        step[aa] = 1

     aa a step[aa] = 1 step[aa] step aa 1 dp[0] = 1 dp[0] dp 0 1 if step[1] == 0:
        dp[1] = 1

     step[1] == 0 step[1] step 1 0 dp[1] = 1 dp[1] dp 1 1 for i in range(2, N+1):
        if step[i] == 0:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] %= mod

     i range(2, N+1) range 2 N+1 N 1 if step[i] == 0:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] %= mod

     step[i] == 0 step[i] step i 0 dp[i] = dp[i-1] + dp[i-2] dp[i] dp i dp[i-1] + dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 dp[i] %= mod dp[i] dp i mod return dp[N] dp[N] dp N N N a a if __name__ == "__main__":
    N, M = map(int, input().split())
    a = [int(input()) for _ in range(M)]

    print(solve(N, a)) __name__ == "__main__" __name__ "__main__" N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M int(input()) for _ in range(M) for _ in range(M) _ range(M) range M for _ in range(M) int(input()) int input() input a = [int(input()) for _ in range(M)] a [int(input()) for _ in range(M)] print(solve(N, a)) print solve(N, a) solve N a N, M = map(int, input().split()) map(int, input().split()) N def solve(N, a):
    mod = 10**9 + 7
    dp = [0] * (N+1)
    step = [0] * (N+1)
    for aa in a:
        step[aa] = 1

    dp[0] = 1
    if step[1] == 0:
        dp[1] = 1

    for i in range(2, N+1):
        if step[i] == 0:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] %= mod

    return dp[N] def solve(N, a):
    mod = 10**9 + 7
    dp = [0] * (N+1)
    step = [0] * (N+1)
    for aa in a:
        step[aa] = 1

    dp[0] = 1
    if step[1] == 0:
        dp[1] = 1

    for i in range(2, N+1):
        if step[i] == 0:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] %= mod

    return dp[N] solve M = map(int, input().split()) map(int, input().split()) M a = [int(input()) for _ in range(M)] [int(input()) for _ in range(M)] a
def solve(N, a):
    mod = 10**9 + 7
    dp = [0] * (N+1)
    step = [0] * (N+1)
    for aa in a:
        step[aa] = 1

    dp[0] = 1
    if step[1] == 0:
        dp[1] = 1

    for i in range(2, N+1):
        if step[i] == 0:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] %= mod

    return dp[N]


if __name__ == "__main__":
    N, M = map(int, input().split())
    a = [int(input()) for _ in range(M)]

    print(solve(N, a))
