Buggy python submission (verdict: Runtime Error):
from functools import lru_cache
dan,ana=map(int,input().split())
l={int(input()) for _ in range(ana)}
@lru_cache(maxsize=100000000000000)
def f(x):
  global l
  if x in l:return 0
  elif x==1:return 1
  elif x==2:return f(1)+1
  else:return (f(x-1)+f(x-2))%(10**9+7)

print(f(dan))


Fixed submission:
n,m=map(int,input().split())
l={int(input()) for i in range(m)}
dp=[0 for i in range(n+1)]
dp[0]=1
for i in range(1,1+n):
    if i not in l:dp[i]+=dp[i-1]+dp[i-2];dp[i]%=10**9+7
print(dp[n])

Buggy python submission (verdict: Runtime Error):
from functools import lru_cache
dan,ana=map(int,input().split())
l={int(input()) for _ in range(ana)}
@lru_cache(maxsize=10000000)
def f(x):
  global l
  if x in l:return 0
  elif x==1:return 1
  elif x==2:return f(1)+1
  else:return (f(x-1)+f(x-2))%(10**9+7)

print(f(dan))


Fixed submission:
n,m=map(int,input().split())
l={int(input()) for i in range(m)}
dp=[0 for i in range(n+1)]
dp[0]=1
for i in range(1,1+n):
    if i not in l:dp[i]+=dp[i-1]+dp[i-2];dp[i]%=10**9+7
print(dp[n])

Buggy python submission (verdict: Runtime Error):
from functools import lru_cache
dan,ana=map(int,input().split())
l=[int(input()) for _ in range(ana)]
@lru_cache(maxsize=None)
def f(x,*li):
  if x in li:return 0
  elif x==1:return 1
  elif x==2 :return f(1,*li)+1 if 1 not in li else 1 if 2 not in li else 0
  else:return (f(x-1,*li)+f(x-2,*li))%(10**9+7)

print(f(dan,*l))

Fixed submission:
n,m=map(int,input().split())
l={int(input()) for i in range(m)}
dp=[0 for i in range(n+1)]
dp[0]=1
for i in range(1,1+n):
    if i not in l:dp[i]+=dp[i-1]+dp[i-2];dp[i]%=10**9+7
print(dp[n])

Buggy python submission (verdict: Runtime Error):
from functools import lru_cache
dan,ana=map(int,input().split())
l=[int(input()) for _ in range(ana)]
@lru_cache(maxsize=float('inf'))
def f(x,*li):
  if x in li:return 0
  elif x==1:return 1
  elif x==2:return f(1,*li)+1
  else:return (f(x-1,*li)+f(x-2,*li))%(10**9+7)

print(f(dan,*l))

Fixed submission:
n,m=map(int,input().split())
l={int(input()) for i in range(m)}
dp=[0 for i in range(n+1)]
dp[0]=1
for i in range(1,1+n):
    if i not in l:dp[i]+=dp[i-1]+dp[i-2];dp[i]%=10**9+7
print(dp[n])

Buggy python submission (verdict: Runtime Error):
from functools import lru_cache
dan,ana=map(int,input().split())
l=[int(input()) for _ in range(ana)]
@lru_cache(maxsize=10000000)
def f(x,*li):
  if x in li:return 0
  elif x==1:return 1
  elif x==2:return f(1,*li)+1
  else:return (f(x-1,*li)+f(x-2,*li))%(10**9+7)

print(f(dan,*l))

Fixed submission:
n,m=map(int,input().split())
l={int(input()) for i in range(m)}
dp=[0 for i in range(n+1)]
dp[0]=1
for i in range(1,1+n):
    if i not in l:dp[i]+=dp[i-1]+dp[i-2];dp[i]%=10**9+7
print(dp[n])

Buggy python submission (verdict: Runtime Error):
from functools import lru_cache
dan,ana=map(int,input().split())
l=[int(input()) for _ in range(ana)]
@lru_cache(maxsize=10000000)
def f(x,*li):
  if x in li:return 0
  elif x==1:return 1
  elif x==2:return f(1,li)+1
  else:return (f(x-1,li)+f(x-2,li))%(10**9+7)

print(f(dan,*l))

Fixed submission:
n,m=map(int,input().split())
l={int(input()) for i in range(m)}
dp=[0 for i in range(n+1)]
dp[0]=1
for i in range(1,1+n):
    if i not in l:dp[i]+=dp[i-1]+dp[i-2];dp[i]%=10**9+7
print(dp[n])

Buggy python submission (verdict: Runtime Error):
from functools import lru_cache
dan,ana=map(int,input().split())
l=[int(input()) for _ in range(ana)]
@lru_cache(maxsize=10000000)
def f(x,li):
  if x in li:return 0
  elif x==1:return 1
  elif x==2:return f(1,li)+1
  else:return (f(x-1,li)+f(x-2,li))%(10**9+7)

print(f(dan,l))

Fixed submission:
n,m=map(int,input().split())
l={int(input()) for i in range(m)}
dp=[0 for i in range(n+1)]
dp[0]=1
for i in range(1,1+n):
    if i not in l:dp[i]+=dp[i-1]+dp[i-2];dp[i]%=10**9+7
print(dp[n])