Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
z = [-1] * (N+1)
for i in range(M):
     z[int(input())] = 0

def rootCount(x):
     if x == 0:
          z[x] = 1
          return 1
     elif x == 1:
          if z[x] == 0:
               return 0
          else:
               z[x] = 1
               return 1
     elif x < N+1 and z[x] != -1:
          return z[x]
     else:
          z[x] = rootCount(x-1) + rootCount(x-2)
          return z[x]
print(rootCount(N) % 1000000007)


Fixed submission:
N, M = map(int, input().split())
z = [-1] * (N+1)
for i in range(M):
     z[int(input())] = 0

for i, x in enumerate(z):
     if i == 0:
          z[i] = 1
     elif i == 1 and z[i] != 0:
          z[i] = 1
     elif z[i] == 0:
          continue
     elif z[i-1] == 0 and z[i-2] == 0:
          print(0)
          exit()
     else:
          z[i] = z[i-1] + z[i-2]
print(z[-1] % 1000000007)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
a = [int(input()) for i in range(M)] 
z = [0] * (N+1)
def rootCount(x):
     if x in a:
          z[x] = 0
          return 0
     elif x == 0:
          z[x] = 1
          return 1
     elif x == 1:
          z[x] = 1
          return 1
     elif x < N+1 and z[x] != 0:
          return z[x]
     else:
          z[x] = rootCount(x-1) + rootCount(x-2)
          return z[x]
print(rootCount(N) % 1000000007)


Fixed submission:
N, M = map(int, input().split())
z = [-1] * (N+1)
for i in range(M):
     z[int(input())] = 0

for i, x in enumerate(z):
     if i == 0:
          z[i] = 1
     elif i == 1 and z[i] != 0:
          z[i] = 1
     elif z[i] == 0:
          continue
     elif z[i-1] == 0 and z[i-2] == 0:
          print(0)
          exit()
     else:
          z[i] = z[i-1] + z[i-2]
print(z[-1] % 1000000007)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
a = [int(input()) for i in range(M)] 
z = [0] * (N+1)
for i, aa in enumerate(a):
     if 0 < i and (a[i] - a[i-1]) == 1:
          print(0)
          exit()

def rootCount(x):
     if x in a:
          z[x] = 0
          return 0
     elif x == 0:
          z[x] = 1
          return 1
     elif x == 1:
          z[x] = 1
          return 1
     elif x < N and z[x] != 0:
          return z[x]
     else:
          z[x] = rootCount(x-1) + rootCount(x-2)
          return z[x]
print(rootCount(N) % 1000000007)

Fixed submission:
N, M = map(int, input().split())
z = [-1] * (N+1)
for i in range(M):
     z[int(input())] = 0

for i, x in enumerate(z):
     if i == 0:
          z[i] = 1
     elif i == 1 and z[i] != 0:
          z[i] = 1
     elif z[i] == 0:
          continue
     elif z[i-1] == 0 and z[i-2] == 0:
          print(0)
          exit()
     else:
          z[i] = z[i-1] + z[i-2]
print(z[-1] % 1000000007)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
a = [int(input()) for i in range(M)] 
z = [0] * (N+1)

def rootCount(x):
     if x in a:
          z[x] = 0
          return 0
     elif x == 0:
          z[x] = 1
          return 1
     elif x == 1:
          z[x] = 1
          return 1
     elif x < N and z[x] != 0:
          return z[x]
     else:
          z[x] = rootCount(x-1) + rootCount(x-2)
          return z[x]
print(rootCount(N) % 1000000007)


Fixed submission:
N, M = map(int, input().split())
z = [-1] * (N+1)
for i in range(M):
     z[int(input())] = 0

for i, x in enumerate(z):
     if i == 0:
          z[i] = 1
     elif i == 1 and z[i] != 0:
          z[i] = 1
     elif z[i] == 0:
          continue
     elif z[i-1] == 0 and z[i-2] == 0:
          print(0)
          exit()
     else:
          z[i] = z[i-1] + z[i-2]
print(z[-1] % 1000000007)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
a = [int(input()) for i in range(M)] 
z = [0] * (N+1)

def rootCount(x):
     print(x)
     if x in a:
          z[x] = 0
          return 0
     elif x == 0:
          z[x] = 1
          return 1
     elif x == 1:
          z[x] = 1
          return 1
     elif x < N and z[x] != 0:
          print("hit " + str(x))
          print(z)
          return z[x]
     else:
          print(x,x-1,x-2)
          print(z)
          z[x] = rootCount(x-1) + rootCount(x-2)
          return z[x]
print(rootCount(N) % 1000000007)


Fixed submission:
N, M = map(int, input().split())
z = [-1] * (N+1)
for i in range(M):
     z[int(input())] = 0

for i, x in enumerate(z):
     if i == 0:
          z[i] = 1
     elif i == 1 and z[i] != 0:
          z[i] = 1
     elif z[i] == 0:
          continue
     elif z[i-1] == 0 and z[i-2] == 0:
          print(0)
          exit()
     else:
          z[i] = z[i-1] + z[i-2]
print(z[-1] % 1000000007)