Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
a = []

for _ in range(M):
  a.append(input())

S = [0] * (N+1)
S[0] = 1
for n in range(1, N+1):
    if str(n) in a:
        S[n] = 0
    elif n==1:
        S[n] = 1
    else:
        S[n] = (S[n-1] + S[n-2])%1000000007

print(S[n])

Fixed submission:
N,M = map(int,input().split())
a = [True] * (N+1)

for _ in range(M):
  a[int(input())] = False

S = [0] * (N+1)
S[0] = 1
for n in range(1, N+1):
    if a[n]==False:
        S[n] = 0
    elif n==1:
        S[n] = 1
    else:
        S[n] = (S[n-1] + S[n-2])%1000000007

print(S[n])

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
a = []

for _ in range(M):
  a.append(input())

S = [0] * (N+1)
S[0] = 1
for n in range(1, N+1):
    if str(n) in a:
        S[n] = 0
    elif n==1:
        S[n] = 1
    else:
        S[n] = S[n-1] + S[n-2]

print(S[n] % 1000000007)

Fixed submission:
N,M = map(int,input().split())
a = [True] * (N+1)

for _ in range(M):
  a[int(input())] = False

S = [0] * (N+1)
S[0] = 1
for n in range(1, N+1):
    if a[n]==False:
        S[n] = 0
    elif n==1:
        S[n] = 1
    else:
        S[n] = (S[n-1] + S[n-2])%1000000007

print(S[n])

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
a = []

for _ in range(M):
  a.append(input())

S = [0] * (N+1)
for n in range(N+1):
    if str(n) in a:
        S[n] = 0
    elif n<=1:
        S[n] = 1
    else:
        S[n] = S[n-1] + S[n-2]

print(S[n] % 1000000007)

Fixed submission:
N,M = map(int,input().split())
a = [True] * (N+1)

for _ in range(M):
  a[int(input())] = False

S = [0] * (N+1)
S[0] = 1
for n in range(1, N+1):
    if a[n]==False:
        S[n] = 0
    elif n==1:
        S[n] = 1
    else:
        S[n] = (S[n-1] + S[n-2])%1000000007

print(S[n])

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
for _ in range(M):
  a.append(input())

S = [0] * (N+1)
for n in range(N+1):
    if str(n) in a:
        S[n] = 0
    elif n<=1:
        S[n] = 1
    else:
        S[n] = S[n-1] + S[n-2]

Fixed submission:
N,M = map(int,input().split())
a = [True] * (N+1)

for _ in range(M):
  a[int(input())] = False

S = [0] * (N+1)
S[0] = 1
for n in range(1, N+1):
    if a[n]==False:
        S[n] = 0
    elif n==1:
        S[n] = 1
    else:
        S[n] = (S[n-1] + S[n-2])%1000000007

print(S[n])

Buggy python submission (verdict: Runtime Error):
def countStep(n):
    global S, b
    if n<0:
        return 0
    elif n==0:
        return 1
    elif str(n) in b:
        count = S[n]
        return count
    else:
        count1 = countStep(n-1)
        count2 = countStep(n-2)
        count = count1 + count2
        b.append(str(n))
        S[n] = count
        return count

N,M = map(int,input().split())
b = []
for _ in range(M):
  b.append(input())
S = [0] * (N+1)

print(countStep(N) % 1000000007)

Fixed submission:
N,M = map(int,input().split())
a = [True] * (N+1)

for _ in range(M):
  a[int(input())] = False

S = [0] * (N+1)
S[0] = 1
for n in range(1, N+1):
    if a[n]==False:
        S[n] = 0
    elif n==1:
        S[n] = 1
    else:
        S[n] = (S[n-1] + S[n-2])%1000000007

print(S[n])

Buggy python submission (verdict: Runtime Error):
def countStep(n):
    global S, b
    if n==-1:
        return 0
    elif n==0:
        return 1
    elif str(n) in b:
        count = S[n]
        return count
    else:
        count1 = countStep(n-1)
        count2 = countStep(n-2)
        count = count1 + count2
        b.append(str(n))
        S[n] = count
        return count

N,M = map(int,input().split())
b = []
for _ in range(M):
  b.append(input())
S = [0] * (N+1)

print(countStep(N) % 1000000007)



Fixed submission:
N,M = map(int,input().split())
a = [True] * (N+1)

for _ in range(M):
  a[int(input())] = False

S = [0] * (N+1)
S[0] = 1
for n in range(1, N+1):
    if a[n]==False:
        S[n] = 0
    elif n==1:
        S[n] = 1
    else:
        S[n] = (S[n-1] + S[n-2])%1000000007

print(S[n])