Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = [int(input()) for x in range(m)]
mod = 10**9 + 7

l = [0]*(n+1)
l[0] = 1

for i in range(1, n+1):
  if i in a:
    if l[i-1] == 0:
      print(0)
      exit()
    else:
      l[i] = 0
  else:
    l[i] = (l[i-2] + l[i-1]) % mod

print(l[-1])


Fixed submission:
n, m = map(int, input().split())
a = set([int(input()) for x in range(m)])

l = [0]*(n+1)
l[0] = 1

for i in range(1, n+1):
  if i in a:
    l[i] = 0
    continue
  else:
    l[i] = l[i-2] + l[i-1]

print(l[-1] % 1000000007)

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = [int(input()) for x in range(m)]
mod = 10**9 + 7

l = [0]*(n+1)
l[0] = 1

for i in range(1, n+1):
  if i in a:
    if l[i-1] == 0:
      print(0)
      exit()
  else:
    l[i] = (l[i-2] + l[i-1]) % mod

print(l[-1])


Fixed submission:
n, m = map(int, input().split())
a = set([int(input()) for x in range(m)])

l = [0]*(n+1)
l[0] = 1

for i in range(1, n+1):
  if i in a:
    l[i] = 0
    continue
  else:
    l[i] = l[i-2] + l[i-1]

print(l[-1] % 1000000007)

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = [int(input()) for x in range(m)]
mod = 10**9 + 7

l = [1]
if 1 in a:
  l.append(0)
else:
  l.append(1)

for i in range(2, n+1):
  if i in a:
    if l[i-1] == 0:
      print(0)
      exit()
    else:
      l.append(0)
  else:
    l.append((l[i-2] + l[i-1]) % mod)
print(l[-1])


Fixed submission:
n, m = map(int, input().split())
a = set([int(input()) for x in range(m)])

l = [0]*(n+1)
l[0] = 1

for i in range(1, n+1):
  if i in a:
    l[i] = 0
    continue
  else:
    l[i] = l[i-2] + l[i-1]

print(l[-1] % 1000000007)

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = [int(input()) for x in range(m)]

x = 1
y = 1
for i in range(1, n+1):
  if i in a:
    if i == 1:
      y = 0
    else:
      x = y
      y = 0
  else:
    if i != 1:
      tmp = x + y
      x = y
      y = tmp

print(y % 1000000007)

Fixed submission:
n, m = map(int, input().split())
a = set([int(input()) for x in range(m)])

l = [0]*(n+1)
l[0] = 1

for i in range(1, n+1):
  if i in a:
    l[i] = 0
    continue
  else:
    l[i] = l[i-2] + l[i-1]

print(l[-1] % 1000000007)

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = [int(input()) for x in range(m)]

l = [1]
for i in range(1, n+1):
  if len(l) == 2:
    tmp = l[0]
    tmp1 = l[1]
    if i in a:
      if tmp1 == 0:
        print(0)
        exit()
      l[0] = tmp1
      l[1] = 0
    else:
      l[0] = tmp1
      l[1] = tmp + tmp1
  else:
    if i in a:
      l.append(0)
    else:
      l.append(1)

print(l[-1] % 1000000007)


Fixed submission:
n, m = map(int, input().split())
a = set([int(input()) for x in range(m)])

l = [0]*(n+1)
l[0] = 1

for i in range(1, n+1):
  if i in a:
    l[i] = 0
    continue
  else:
    l[i] = l[i-2] + l[i-1]

print(l[-1] % 1000000007)

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = [int(input()) for x in range(m)]

l = [1]
for i in range(1, n+1):
  if i in a:
    if l[i-1] != 0:
      l.append(0)
    else:
      print(0)
      exit()
  else:
    if i != 1:
      l.append(l[i-2] + l[i-1])
    else:
      l.append(1)

print(l[-1] % 1000000007)

Fixed submission:
n, m = map(int, input().split())
a = set([int(input()) for x in range(m)])

l = [0]*(n+1)
l[0] = 1

for i in range(1, n+1):
  if i in a:
    l[i] = 0
    continue
  else:
    l[i] = l[i-2] + l[i-1]

print(l[-1] % 1000000007)