Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = [0]*m
for i in range(m):
    a[i] = int(input())
ans = [1]*(n+1)
for i in range(1,n+1):
    if i in a:
        ans[i] = 0
    elif i == 1:
        continue
    else:
        ans[i] = (ans[i-1]+ans[i-2])%1000000007
print(ans[n])

Fixed submission:
n, m = map(int, input().split())
mod = 10**9 + 7
dp = [1]*(n+1)
 
for _ in range(m):
    a = int(input())
    dp[a] = 0
 
for i in range(2, n+1):
    if dp[i]>0:
        dp[i] = (dp[i-1]+dp[i-2])%mod
 
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = [0]*m
for i in range(m):
    a[i] = int(input())
ans = [1]*(n+1)
for i in range(1,n+1):
    if i in a:
        ans[i] = 0
    elif i == 1:
        continue
    else:
        ans[i] = (ans[i-1]+ans[i-2])%1000000007
print(ans[n])

Fixed submission:
n, m = map(int, input().split())
mod = 10**9 + 7
dp = [1]*(n+1)
 
for _ in range(m):
    a = int(input())
    dp[a] = 0
 
for i in range(2, n+1):
    if dp[i]>0:
        dp[i] = (dp[i-1]+dp[i-2])%mod
 
print(dp[n])

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = [0]*m
for i in range(m):
    a[i] = int(input())
b=a[0]
for i in range(m-1):
    b = max(b,a[i+1]-a[i])
fib=[0,1]
for i in range(b-1):
    fib.append(fib[i]+fib[i+1])
ans = fib[a[0]]
for i in range(m-1):
    ans *= fib[a[i+1]-a[i]-1]
    ans % 1000000007
    print(ans)
ans *= fib[n-a[m-1]]
print(ans%1000000007)

Fixed submission:
n, m = map(int, input().split())
mod = 10**9 + 7
dp = [1]*(n+1)
 
for _ in range(m):
    a = int(input())
    dp[a] = 0
 
for i in range(2, n+1):
    if dp[i]>0:
        dp[i] = (dp[i-1]+dp[i-2])%mod
 
print(dp[n])

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = [0]*m
for i in range(m):
    a[i] = int(input())
b=a[0]
for i in range(m-1):
    b = max(b,a[i+1]-a[i])
fib=[0,1]
for i in range(b-1):
    fib.append(fib[i]+fib[i+1])
ans = fib[a[0]]
for i in range(m-1):
    ans *= fib[a[i+1]-a[i]-1]
    ans % 1000000007
    print(ans)
ans *= fib[n-a[m-1]]
print(ans%1000000007)

Fixed submission:
n, m = map(int, input().split())
mod = 10**9 + 7
dp = [1]*(n+1)
 
for _ in range(m):
    a = int(input())
    dp[a] = 0
 
for i in range(2, n+1):
    if dp[i]>0:
        dp[i] = (dp[i-1]+dp[i-2])%mod
 
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):

n,m = map(int,input().split())
a = [int(input()) for i in range(m)]

dp = [0] * (n+1)
for i in range(n+1):
     if i in a:
          continue
     elif i == 0 or i == 1:
          dp[i] = 1
     else:
          dp[i] = (dp[i-1] + dp[i-2])%1000000007
print(dp[n])

Fixed submission:
n, m = map(int, input().split())
mod = 10**9 + 7
dp = [1]*(n+1)
 
for _ in range(m):
    a = int(input())
    dp[a] = 0
 
for i in range(2, n+1):
    if dp[i]>0:
        dp[i] = (dp[i-1]+dp[i-2])%mod
 
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):

n,m = map(int,input().split())
a = [int(input()) for i in range(m)]

dp = [0] * (n+1)
for i in range(n+1):
     if i in a:
          dp[i] = 0
     elif i == 0 or i == 1:
          dp[i] = 1
     else:
          dp[i] = (dp[i-1] + dp[i-2])%1000000007
print(dp[n])

Fixed submission:
n, m = map(int, input().split())
mod = 10**9 + 7
dp = [1]*(n+1)
 
for _ in range(m):
    a = int(input())
    dp[a] = 0
 
for i in range(2, n+1):
    if dp[i]>0:
        dp[i] = (dp[i-1]+dp[i-2])%mod
 
print(dp[n])

Buggy python submission (verdict: Runtime Error):
import numpy as np
n,m = map(int,input().split())
a = [int(input()) for i in range(m)]

dp = [0] * (n+1)
for i in range(n+1):
     if i in a:
          dp[i] = 0
     elif i == 0 or i == 1:
          dp[i] = 1
     else:
          dp[i] = (dp[i-1] + dp[i-2])%1000000007
print(dp[n])

Fixed submission:
n, m = map(int, input().split())
mod = 10**9 + 7
dp = [1]*(n+1)
 
for _ in range(m):
    a = int(input())
    dp[a] = 0
 
for i in range(2, n+1):
    if dp[i]>0:
        dp[i] = (dp[i-1]+dp[i-2])%mod
 
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = [int(input()) for i in range(m)]

dp = [0] * (n+1)
for i in range(n+1):
     if i in a:
          dp[i] = 0
     elif i == 0 or i == 1:
          dp[i] = 1
     else:
          dp[i] = dp[i-1] + dp[i-2]
print(dp[n]%1000000007)

Fixed submission:
n, m = map(int, input().split())
mod = 10**9 + 7
dp = [1]*(n+1)
 
for _ in range(m):
    a = int(input())
    dp[a] = 0
 
for i in range(2, n+1):
    if dp[i]>0:
        dp[i] = (dp[i-1]+dp[i-2])%mod
 
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = [int(input()) for i in range(m)]

dp = [0] * (n+1)
for i in range(n+1):
     if i in a:
          dp[i] = 0
     elif i == 0 or i == 1:
          dp[i] = 1
     else:
          dp[i] = dp[i-1] + dp[i-2]
print(dp[n]%1000000007)

Fixed submission:
n, m = map(int, input().split())
mod = 10**9 + 7
dp = [1]*(n+1)
 
for _ in range(m):
    a = int(input())
    dp[a] = 0
 
for i in range(2, n+1):
    if dp[i]>0:
        dp[i] = (dp[i-1]+dp[i-2])%mod
 
print(dp[n])