Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
broken=[int(input()) for i in range(m)]
mod=10**9+7

is_broken=[True]*(n+1)
for i in range(m):
  is_broken[broken[i]]=False
   
dp=[0]*(n+1)

if  is_broken[1]:
  dp[1],dp[2]=1,2
else:
  if is_broken[2]:
    dp[2]=1

if n>=2:
  for i in range(3,n+1):
    if is_broken[i]:
       dp[i]=dp[i-1]+dp[i-2]
       dp[i]%=mod
    else:
      dp[i]=0
      
print(dp[n])   


Fixed submission:
n,m=map(int,input().split())
broken=[int(input()) for i in range(m)]
mod=10**9+7

is_broken=[True]*(n+1)
for i in range(m):
  is_broken[broken[i]]=False
   
dp=[0]*(n+1)
dp[0]=1
if is_broken[1]:
  dp[1]=dp[0]
  
for i in range(2,n+1):
    if is_broken[i]:
       dp[i]=dp[i-1]+dp[i-2]
       dp[i]%=mod
    else:
      dp[i]=0
      
print(dp[n])

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
broken=[int(input()) for i in range(m)]
mod=10**9+7

is_broken=[True]*(n+1)
for i in range(m):
  is_broken[broken[i]]=False
   
dp=[0]*(n+1)

if  is_broken[1]:
  dp[1],dp[2]=1,2
else:
  if is_broken[2]:
    dp[2]=1

if n>=2:
  for i in range(3,n+1):
    if i in broken:
      dp[i]=0
    
    elif  is_broken[i-1] and is_broken[i-2]:
      dp[i]=dp[i-1]+dp[i-2]
      dp[i]%=mod
    
    elif is_broken[i-1]:
      dp[i]=dp[i-1]
      dp[i]%=mod
    
    elif is_broken[i-2]:
      dp[i]=dp[i-2]
      dp[i]%=mod
    
    else:
      dp[i]=0
print(dp[n])


Fixed submission:
n,m=map(int,input().split())
broken=[int(input()) for i in range(m)]
mod=10**9+7

is_broken=[True]*(n+1)
for i in range(m):
  is_broken[broken[i]]=False
   
dp=[0]*(n+1)
dp[0]=1
if is_broken[1]:
  dp[1]=dp[0]
  
for i in range(2,n+1):
    if is_broken[i]:
       dp[i]=dp[i-1]+dp[i-2]
       dp[i]%=mod
    else:
      dp[i]=0
      
print(dp[n])

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
broken=[int(input()) for i in range(m)]
mod=10**9+7

is_broken=[True]*(n+1)
for i in range(m):
  is_broken[broken[i]]=False
   
dp=[0]*(n+1)
if  is_broken[1]:
  dp[1],dp[2]=1,2
else:
  if is_broken[2]:
    dp[2]=1

for i in range(3,n+1):
  if i in broken:
    dp[i]=0
    
  elif  is_broken[i-1] and is_broken[i-2]:
    dp[i]=dp[i-1]+dp[i-2]
    dp[i]%=mod
    
  elif is_broken[i-1]:
    dp[i]=dp[i-1]
    dp[i]%=mod
    
  elif is_broken[i-2]:
    dp[i]=dp[i-2]
    dp[i]%=mod
    
  else:
    dp[i]=0
    
print(dp[n])


Fixed submission:
n,m=map(int,input().split())
broken=[int(input()) for i in range(m)]
mod=10**9+7

is_broken=[True]*(n+1)
for i in range(m):
  is_broken[broken[i]]=False
   
dp=[0]*(n+1)
dp[0]=1
if is_broken[1]:
  dp[1]=dp[0]
  
for i in range(2,n+1):
    if is_broken[i]:
       dp[i]=dp[i-1]+dp[i-2]
       dp[i]%=mod
    else:
      dp[i]=0
      
print(dp[n])

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
broken=[int(input()) for i in range(m)]
mod=10**9+7

dp=[0]*(n+1)
if 1 not in broken:
  dp[1],dp[2]=1,2
else:
  if 2 not in broken:
    dp[2]=1

for i in range(3,n+1):
  if i in broken:
    dp[i]=0
    
  elif  i-1 not in broken and i-2 not in broken:
    dp[i]=dp[i-1]+dp[i-2]
    dp[i]%=mod
    
  elif i-1 not in broken:
    dp[i]=dp[i-1]
    dp[i]%=mod
    
  elif i-2 not in broken:
    dp[i]=dp[i-2]
    dp[i]%=mod
    
  else:
    dp[i]=0
print(dp[n])

Fixed submission:
n,m=map(int,input().split())
broken=[int(input()) for i in range(m)]
mod=10**9+7

is_broken=[True]*(n+1)
for i in range(m):
  is_broken[broken[i]]=False
   
dp=[0]*(n+1)
dp[0]=1
if is_broken[1]:
  dp[1]=dp[0]
  
for i in range(2,n+1):
    if is_broken[i]:
       dp[i]=dp[i-1]+dp[i-2]
       dp[i]%=mod
    else:
      dp[i]=0
      
print(dp[n])