Buggy python submission (verdict: Runtime Error):
Num = 10 ** 9 + 7
N, M = map(int, input().split())
if M != 0
  danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)

Fixed submission:
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = -1
if M != 0:
  danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)

Buggy python submission (verdict: Runtime Error):
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)

Fixed submission:
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = -1
if M != 0:
  danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)

Buggy python submission (verdict: Runtime Error):
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)

Fixed submission:
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = -1
if M != 0:
  danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)

Buggy python submission (verdict: Runtime Error):
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)

Fixed submission:
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = -1
if M != 0:
  danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)

Buggy python submission (verdict: Time Limit Exceeded):
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = []
for i in range(M):
  danger.append(int(input()))
l = [1, 1]
for i in range(1, N):
  if i in danger:
    l[1] = 0
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N in danger:
  l[1] = 0
print(l[1] % Num)

Fixed submission:
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = -1
if M != 0:
  danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)

Buggy python submission (verdict: Time Limit Exceeded):
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = []
for i in range(M):
  danger.append(int(input()))
l = [1, 1]
for i in range(1, N):
  if i in danger:
    l[1] = 0
  l = [l[1] % Num, (l[0] + l[1]) % Num]
  if l == [0, 0]:
    break
if N in danger:
  l[1] = 0
print(l[1])

Fixed submission:
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = -1
if M != 0:
  danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)

Buggy python submission (verdict: Time Limit Exceeded):
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = []
for i in range(M):
  danger.append(int(input()))
l = [1, 1]
for i in range(1, N):
  if i in danger:
    l[1] = 0
  l = [l[1] % Num, (l[0] + l[1]) % Num]
if N in danger:
  l[1] = 0
print(l[1])

Fixed submission:
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = -1
if M != 0:
  danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)

Buggy python submission (verdict: Time Limit Exceeded):
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = []
for i in range(M):
  danger.append(int(input()))
l = [1, 1]
for i in range(1, N):
  if i in danger:
    l[1] = 0
  l = [l[1] % Num, (l[0] + l[1]) % Num]
if N in danger:
  l[1] = 0
print(l[1])

Fixed submission:
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = -1
if M != 0:
  danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)