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

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])

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

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = {int(input()) for _ in range(m)]}

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])

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

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = [0]*m
for _ in range(m):
    a[_] = int(input()) 
s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(2,n+1):
    if i in a:
        s[i] = 0
        continue
    s[i] = (s[i-1] + s[i-2]) % (10**9+7)

print(s[-1])

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

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = [0]*m
for _ in range(m):
    a[_] = int(input()) 
s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)

print(s[-1])

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

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]
    s = [1]*(n+1)

    if 1 in a:
        s[1] = 0

    for i in range(n-1):
        if i+2 in a:
            s[i+2] = 0
            continue
        s[i+2] = (s[i+1] + s[i]) % (10**9+7)

    print(s[-1])

main()

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

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])

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

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)

print(s[-1])

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

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])

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

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    if i >= 0:
        s[i+2] = (s[i+1] + s[i]) % (10**9+7)

print(s[-1])

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

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])

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

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    if i+2 not in a:
        s[i+2] = (s[i+1] + s[i]) % (10**9+7)

print(s[-1])

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

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
s = [1]*(n+1)

if a[0] == 1:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
    else:
        s[i+2] = (s[i+1] + s[i]) % (10**9+7)

print(s[-1])

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

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
s = [1]*(n+1)
if 1 in a:
    s[1] = 0
    
for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
    else:
        s[i+2] = (s[i+1] + s[i]) % (10**9+7)

print(s[-1])

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

s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(n-1):
    if i+2 in a:
        s[i+2] = 0
        continue
    s[i+2] = (s[i+1] + s[i]) % (10**9+7)
    
print(s[-1])