Buggy python submission (verdict: Time Limit Exceeded):
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
mod =10**9+7
dp = [1]
for i in range(1,N+1):
  if i not in a:
    if i ==1:
      dp.append(dp[-1])
    else:
      dp.append((dp[-1]+dp[-2])%mod)
  else:
    dp.append(0)

print(dp[-1])

Fixed submission:
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
a.append(0)
mod =10**9+7
dp = [1]
j = 0
for i in range(1,N+1):
  if i != a[j]:
    if i ==1:
      dp.append(dp[-1])
    else:
      dp.append((dp[-1]+dp[-2])%mod)
  else:
    dp.append(0)
    j +=1 

print(dp[-1])

Buggy python submission (verdict: Time Limit Exceeded):
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
mod =10**9+7
dp = [1]
for i in range(1,N+1):
  if i in a:
    dp.append(0)
  else:
    if i ==1:
      dp.append(dp[i-1])
    else:
      dp.append((dp[i-1]+dp[i-2])%mod)

print(dp[N])

Fixed submission:
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
a.append(0)
mod =10**9+7
dp = [1]
j = 0
for i in range(1,N+1):
  if i != a[j]:
    if i ==1:
      dp.append(dp[-1])
    else:
      dp.append((dp[-1]+dp[-2])%mod)
  else:
    dp.append(0)
    j +=1 

print(dp[-1])

Buggy python submission (verdict: Time Limit Exceeded):
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
ans=1
mod =10**9+7
dp = [1]
for i in range(1,N+1):
  if i in a:
    dp.append(0)
  else:
    if i ==1:
      dp.append(dp[i-1])
    else:
      dp.append((dp[i-1]+dp[i-2])%mod)

print(dp[N]%mod)

Fixed submission:
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
a.append(0)
mod =10**9+7
dp = [1]
j = 0
for i in range(1,N+1):
  if i != a[j]:
    if i ==1:
      dp.append(dp[-1])
    else:
      dp.append((dp[-1]+dp[-2])%mod)
  else:
    dp.append(0)
    j +=1 

print(dp[-1])

Buggy python submission (verdict: Time Limit Exceeded):
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
ans=1
mod =10**9+7
dp = [0 for i in range(N+1)]
dp[0]=1
for i in range(1,N+1):
  if i not in a:
    if i==1:
      dp[i] = dp[i-1]
    else:
      dp[i] = dp[i-1]+dp[i-2]
  
print(dp[N]%mod)

Fixed submission:
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
a.append(0)
mod =10**9+7
dp = [1]
j = 0
for i in range(1,N+1):
  if i != a[j]:
    if i ==1:
      dp.append(dp[-1])
    else:
      dp.append((dp[-1]+dp[-2])%mod)
  else:
    dp.append(0)
    j +=1 

print(dp[-1])

Buggy python submission (verdict: Time Limit Exceeded):
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
ans=1
mod =10**9+7
dp = [0 for i in range(N+1)]
dp[0]=1
for i in range(1,N+1):
  if i not in a:
    if i==1:
      dp[i] = dp[i-1]%mod
    else:
      dp[i] = (dp[i-1]%mod+dp[i-2]%mod)%mod
  
print(dp[N]%mod)

Fixed submission:
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
a.append(0)
mod =10**9+7
dp = [1]
j = 0
for i in range(1,N+1):
  if i != a[j]:
    if i ==1:
      dp.append(dp[-1])
    else:
      dp.append((dp[-1]+dp[-2])%mod)
  else:
    dp.append(0)
    j +=1 

print(dp[-1])

Buggy python submission (verdict: Time Limit Exceeded):
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
ans=1
mod =10**9+7
dp = [0 for i in range(N+1)]
dp[0]=1
for i in range(1,N+1):
  if i not in a:
    if i==1:
      dp[i] = dp[i-1]%mod
    else:
      dp[i] = dp[i-1]%mod+dp[i-2]%mod
  
print(dp[N]%mod)

Fixed submission:
#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
a.append(0)
mod =10**9+7
dp = [1]
j = 0
for i in range(1,N+1):
  if i != a[j]:
    if i ==1:
      dp.append(dp[-1])
    else:
      dp.append((dp[-1]+dp[-2])%mod)
  else:
    dp.append(0)
    j +=1 

print(dp[-1])