Buggy python submission (verdict: Time Limit Exceeded):
N, M = tuple(map(int, input().split()))
mod = 10**9+7
broken = [int(input()) for _ in range(M)]
dp = [0]* (N+1)


dp[0] = 1

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

print(dp[N])

Fixed submission:
N, M = map(int, input().split())
A = set(int(input()) for _ in range(M))
mod = 10 ** 9 + 7

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

print(dp[N] % mod)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = tuple(map(int, input().split()))
mod = 10**9+7
broken = []
dp = [0]* (N+1)

for i in range(M):
    broken.append(int(input()))

dp[0] = 1

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

print(dp[N])

Fixed submission:
N, M = map(int, input().split())
A = set(int(input()) for _ in range(M))
mod = 10 ** 9 + 7

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

print(dp[N] % mod)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = tuple(map(int, input().split()))
mod = 10**9+7
broken = []
dp = []

for i in range(M):
    broken.append(int(input()))

for i in range(N+1):
    dp.append(0)

dp[0] = 1

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

print(dp[N])

Fixed submission:
N, M = map(int, input().split())
A = set(int(input()) for _ in range(M))
mod = 10 ** 9 + 7

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

print(dp[N] % mod)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = tuple(map(int, input().split()))
mod = 10**9+7
broken = []
dp = []

for i in range(M):
    broken.append(int(input()))

for i in range(N+2):
    dp.append(0)

dp[N] = 1

for i in reversed(range(N)):
    if (i in broken):
        continue
    dp[i] = (dp[i+1] + dp[i+2]) % mod

print(dp[0])

Fixed submission:
N, M = map(int, input().split())
A = set(int(input()) for _ in range(M))
mod = 10 ** 9 + 7

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

print(dp[N] % mod)

Buggy python submission (verdict: Runtime Error):
N, M = tuple(map(int, input().split()))
ans = 0
a = []
tmp = -10
d = 10**9 + 7

for i in range(M):
    num = (int(input()))
    if ((tmp+1) == num):
        print(0)
        exit()
    a.append(num)
    tmp = num

def stairs(n):
    if (n in a):
        return 0
    if (n == 1):
        return 1
    if (n == 2):
        return 2
    ans = stairs(n-1)%d + stairs(n-2)%d
    return ans

print(stairs(N))


Fixed submission:
N, M = map(int, input().split())
A = set(int(input()) for _ in range(M))
mod = 10 ** 9 + 7

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

print(dp[N] % mod)