Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

A = []

for _ in range(M):
    A[int(input())] = True

step = [0] * (N + 1)

step[0] = 1

for s in range(1, N + 1):
    if A[s]:
        step[s] = 0
        continue
    if s == 1:
        step[s] = 1
        continue
    else:
        step[s] = step[s - 1] + step[s - 2]
        step[s] %= 1000000007

print(step[N])


Fixed submission:
N, M = map(int, input().split())

A = [False] * (N + 1)

for _ in range(M):
    A[int(input())] = True

step = [0] * (N + 1)

step[0] = 1

for s in range(1, N + 1):
    if A[s]:
        step[s] = 0
        continue
    if s == 1:
        step[s] = 1
        continue
    else:
        step[s] = step[s - 1] + step[s - 2]
        step[s] %= 1000000007

print(step[N])

Buggy python submission (verdict: Time Limit Exceeded):
from sys import exit

N, M = map(int, input().split())

_a = -1
A = []
ans = 0

for _ in range(M):
    a_ = int(input())
    if _a + 1 == a_:
        print(0)
        exit()
    _a = a_
    A.append(_a)

step = [0] * (N + 1)

step[0] = 1

for s in range(1, N + 1):
    if s in A:
        step[s] = 0
        continue
    if s == 1:
        step[s] = 1
        continue
    else:
        step[s] = (step[s - 1] + step[s - 2]) % 1000000007

print(step[N])


Fixed submission:
N, M = map(int, input().split())

A = [False] * (N + 1)

for _ in range(M):
    A[int(input())] = True

step = [0] * (N + 1)

step[0] = 1

for s in range(1, N + 1):
    if A[s]:
        step[s] = 0
        continue
    if s == 1:
        step[s] = 1
        continue
    else:
        step[s] = step[s - 1] + step[s - 2]
        step[s] %= 1000000007

print(step[N])

Buggy python submission (verdict: Runtime Error):
from sys import exit

N, M = map(int, input().split())

_a = -1
A = []
ans = 0

for _ in range(M):
    a_ = int(input())
    if _a + 1 == a_:
        print(0)
        exit()
    _a = a_
    A.append(_a)

step = [] * N
step[0] = 1

for s in range(1, N + 1):
    if s in A:
        step[s] = 0
        continue
    if s == 1:
        step[s] = 1
        continue
    else:
        step[s] = (step[s - 1] + step[s - 2]) % 1000000007

print(step[N])


Fixed submission:
N, M = map(int, input().split())

A = [False] * (N + 1)

for _ in range(M):
    A[int(input())] = True

step = [0] * (N + 1)

step[0] = 1

for s in range(1, N + 1):
    if A[s]:
        step[s] = 0
        continue
    if s == 1:
        step[s] = 1
        continue
    else:
        step[s] = step[s - 1] + step[s - 2]
        step[s] %= 1000000007

print(step[N])

Buggy python submission (verdict: Time Limit Exceeded):
from sys import exit
import sys

N, M = map(int, input().split())

_a = -1
B = []
ans = 0
count = 0

for i in range(M):
    a_ = int(input())
    if _a + 1 == a_:
        print(0)
        exit()
    _a = a_
    N -= 2
    count += 1
    B.append(_a + 2 - 2 * count)


step = [1]

for s in range(1, N + 1):
    if s == 1:
        step.append(1)
        continue
    if s in B:
        step.append(step[s - 1])
        continue
    else:
        step.append((step[s - 1] + step[s - 2]) % 1000000007)

print(step[N] % 1000000007)


Fixed submission:
N, M = map(int, input().split())

A = [False] * (N + 1)

for _ in range(M):
    A[int(input())] = True

step = [0] * (N + 1)

step[0] = 1

for s in range(1, N + 1):
    if A[s]:
        step[s] = 0
        continue
    if s == 1:
        step[s] = 1
        continue
    else:
        step[s] = step[s - 1] + step[s - 2]
        step[s] %= 1000000007

print(step[N])

Buggy python submission (verdict: Time Limit Exceeded):
from sys import exit
import sys

N, M = map(int, input().split())

_a = -1
B = []
ans = 0
count = 0

for i in range(M):
    a_ = int(input())
    if _a + 1 == a_:
        print(0)
        exit()
    _a = a_
    N -= 2
    count += 1
    B.append(_a + 2 - 2 * count)


step = [1]

for s in range(1, N + 1):
    if s == 1:
        step.append(1)
        continue
    if s in B:
        step.append(step[s - 1])
        continue
    else:
        step.append(step[s - 1] + step[s - 2])

print(step[N] % 1000000007)


Fixed submission:
N, M = map(int, input().split())

A = [False] * (N + 1)

for _ in range(M):
    A[int(input())] = True

step = [0] * (N + 1)

step[0] = 1

for s in range(1, N + 1):
    if A[s]:
        step[s] = 0
        continue
    if s == 1:
        step[s] = 1
        continue
    else:
        step[s] = step[s - 1] + step[s - 2]
        step[s] %= 1000000007

print(step[N])

Buggy python submission (verdict: Time Limit Exceeded):
from sys import exit
import sys
sys.setrecursionlimit(10000)

N, M = map(int, input().split())

_a = -1
a = []
ans = 0

for _ in range(M):
    a_ = int(input())
    if _a + 1 == a_:
        print(0)
        exit()
    _a = a_
    a.append(_a)


step = [1]

for s in range(1, N + 1):
    if s in a:
        step.append(0)
        continue
    if s == 1:
        step.append(1)
        continue
    else:
        step.append(step[s - 1] + step[s - 2])

print(step[N] % 1000000007)


Fixed submission:
N, M = map(int, input().split())

A = [False] * (N + 1)

for _ in range(M):
    A[int(input())] = True

step = [0] * (N + 1)

step[0] = 1

for s in range(1, N + 1):
    if A[s]:
        step[s] = 0
        continue
    if s == 1:
        step[s] = 1
        continue
    else:
        step[s] = step[s - 1] + step[s - 2]
        step[s] %= 1000000007

print(step[N])