Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
#a = [int(input()) for _ in range(m)]
a = [0] * (10 ** 5)
for i in range(m):
    a[int(input())] = 1


MOD = 10 ** 9 + 7
# ---------------------------
dp = [0] * (n + 1)
dp[0] = 1
# if (1 in a):
if (a[1] == 1):
    dp[1] = 0
else:
    dp[1] = 1
# dp approach

for i in range(2, n + 1):
    # if (i in a):
    if (a[i] == 1):
        # (x in list)で探索すると、時間がかかるっぽい
        #dp[i] = 0
        continue
    elif (dp[i - 1] == 0 and dp[i - 2] == 0):
        print(0)
        exit()
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD


#print(dp[n] % MOD)
print(dp[n])


Fixed submission:
n, m = map(int, input().split())
a = set([int(input()) for _ in range(m)])
'''
a = [0] * (10 ** 5)
for i in range(m):
    a[int(input())] = 1
'''

MOD = 10 ** 9 + 7
# ---------------------------
dp = [0] * (n + 1)
dp[0] = 1
if (1 in a):
    # if (a[1] == 1):
    dp[1] = 0
else:
    dp[1] = 1
# dp approach

for i in range(2, n + 1):
    if (i in a):
        # if (a[i] == 1):
        # (x in list)で探索すると、時間がかかるっぽい
        #dp[i] = 0
        continue
    elif (dp[i - 1] == 0 and dp[i - 2] == 0):
        print(0)
        exit()
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD


#print(dp[n] % MOD)
print(dp[n])

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

for i in range(2, n + 1):
    if (i in a):
        #dp[i] = 0
        continue
    elif (dp[i - 1] == 0 and dp[i - 2] == 0):
        print(0)
        exit()
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD


#print(dp[n] % MOD)
print(dp[n])


Fixed submission:
n, m = map(int, input().split())
a = set([int(input()) for _ in range(m)])
'''
a = [0] * (10 ** 5)
for i in range(m):
    a[int(input())] = 1
'''

MOD = 10 ** 9 + 7
# ---------------------------
dp = [0] * (n + 1)
dp[0] = 1
if (1 in a):
    # if (a[1] == 1):
    dp[1] = 0
else:
    dp[1] = 1
# dp approach

for i in range(2, n + 1):
    if (i in a):
        # if (a[i] == 1):
        # (x in list)で探索すると、時間がかかるっぽい
        #dp[i] = 0
        continue
    elif (dp[i - 1] == 0 and dp[i - 2] == 0):
        print(0)
        exit()
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD


#print(dp[n] % MOD)
print(dp[n])

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

for i in range(2, n + 1):
    if (i in a):
        dp[i] = 0
    elif (dp[i - 1] == 0 and dp[i - 2] == 0):
        print(0)
        exit()
    else:
        dp[i] = dp[i - 1] + dp[i - 2]


print(dp[n] % MOD)


Fixed submission:
n, m = map(int, input().split())
a = set([int(input()) for _ in range(m)])
'''
a = [0] * (10 ** 5)
for i in range(m):
    a[int(input())] = 1
'''

MOD = 10 ** 9 + 7
# ---------------------------
dp = [0] * (n + 1)
dp[0] = 1
if (1 in a):
    # if (a[1] == 1):
    dp[1] = 0
else:
    dp[1] = 1
# dp approach

for i in range(2, n + 1):
    if (i in a):
        # if (a[i] == 1):
        # (x in list)で探索すると、時間がかかるっぽい
        #dp[i] = 0
        continue
    elif (dp[i - 1] == 0 and dp[i - 2] == 0):
        print(0)
        exit()
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD


#print(dp[n] % MOD)
print(dp[n])

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

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


print(dp[n] % MOD)


Fixed submission:
n, m = map(int, input().split())
a = set([int(input()) for _ in range(m)])
'''
a = [0] * (10 ** 5)
for i in range(m):
    a[int(input())] = 1
'''

MOD = 10 ** 9 + 7
# ---------------------------
dp = [0] * (n + 1)
dp[0] = 1
if (1 in a):
    # if (a[1] == 1):
    dp[1] = 0
else:
    dp[1] = 1
# dp approach

for i in range(2, n + 1):
    if (i in a):
        # if (a[i] == 1):
        # (x in list)で探索すると、時間がかかるっぽい
        #dp[i] = 0
        continue
    elif (dp[i - 1] == 0 and dp[i - 2] == 0):
        print(0)
        exit()
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD


#print(dp[n] % MOD)
print(dp[n])

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [0] * m
MOD = 10 ** 9 + 7

for i in range(m):
    a[i] = int(input())

dp = [0] * (n + 1)

for i in range(1, 3):
    if (i not in a):
        dp[i] = dp[i-1] + 1
    else:
        pass

flag = True

for i in range(3, n + 1):
    if (i not in a):
        if (dp[i - 1] == 0 and dp[i - 2] == 0):
            flag = False
            break
        else:
            dp[i] = dp[i - 1] + dp[i - 2]

    else:
        pass


if (flag is True):
    ans = dp[n] % MOD
else:
    ans = 0


#ans %= 10 ** 9 + 7
print(ans)


Fixed submission:
n, m = map(int, input().split())
a = set([int(input()) for _ in range(m)])
'''
a = [0] * (10 ** 5)
for i in range(m):
    a[int(input())] = 1
'''

MOD = 10 ** 9 + 7
# ---------------------------
dp = [0] * (n + 1)
dp[0] = 1
if (1 in a):
    # if (a[1] == 1):
    dp[1] = 0
else:
    dp[1] = 1
# dp approach

for i in range(2, n + 1):
    if (i in a):
        # if (a[i] == 1):
        # (x in list)で探索すると、時間がかかるっぽい
        #dp[i] = 0
        continue
    elif (dp[i - 1] == 0 and dp[i - 2] == 0):
        print(0)
        exit()
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD


#print(dp[n] % MOD)
print(dp[n])