def route_num(stairs):
    if stairs <= 1:
        return 1
    else:
        return route_num(stairs - 1) + route_num(stairs - 2)

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

broken = {i:False for i in range(n + 1)}
for a_i in a:
    broken[a_i] = True

route_num = {}
for i in range(n + 1):
    if broken[i]:
        route_num[i] = 0
    elif i <= 1:
        route_num[i] = 1
    else:
        route_num[i] = (route_num[i-1] + route_num[i-2]) % 1000000007

print(route_num[n]) def route_num(stairs):
    if stairs <= 1:
        return 1
    else:
        return route_num(stairs - 1) + route_num(stairs - 2) route_num if stairs <= 1:
        return 1
    else:
        return route_num(stairs - 1) + route_num(stairs - 2) stairs <= 1 stairs 1 return 1 1 return route_num(stairs - 1) + route_num(stairs - 2) route_num(stairs - 1) + route_num(stairs - 2) route_num(stairs - 1) route_num stairs - 1 stairs 1 route_num(stairs - 2) route_num stairs - 2 stairs 2 stairs stairs n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m int(input()) for _ in range(m) for _ in range(m) _ range(m) range m for _ in range(m) int(input()) int input() input a = [int(input()) for _ in range(m)] a [int(input()) for _ in range(m)] i:False for i in range(n + 1) for i in range(n + 1) i range(n + 1) range n + 1 n 1 for i in range(n + 1) i False broken = {i:False for i in range(n + 1)} broken {i:False for i in range(n + 1)} for a_i in a:
    broken[a_i] = True a_i a broken[a_i] = True broken[a_i] broken a_i True route_num = {} route_num {} for i in range(n + 1):
    if broken[i]:
        route_num[i] = 0
    elif i <= 1:
        route_num[i] = 1
    else:
        route_num[i] = (route_num[i-1] + route_num[i-2]) % 1000000007 i range(n + 1) range n + 1 n 1 if broken[i]:
        route_num[i] = 0
    elif i <= 1:
        route_num[i] = 1
    else:
        route_num[i] = (route_num[i-1] + route_num[i-2]) % 1000000007 broken[i] broken i route_num[i] = 0 route_num[i] route_num i 0 elif i <= 1:
        route_num[i] = 1
     i <= 1 i 1 route_num[i] = 1 route_num[i] route_num i 1 route_num[i] = (route_num[i-1] + route_num[i-2]) % 1000000007 route_num[i] route_num i (route_num[i-1] + route_num[i-2]) % 1000000007 route_num[i-1] + route_num[i-2] route_num[i-1] route_num i-1 i 1 route_num[i-2] route_num i-2 i 2 1000000007 print(route_num[n]) print route_num[n] route_num n route_num = {} {} route_num n, m = map(int, input().split()) map(int, input().split()) n def route_num(stairs):
    if stairs <= 1:
        return 1
    else:
        return route_num(stairs - 1) + route_num(stairs - 2) def route_num(stairs):
    if stairs <= 1:
        return 1
    else:
        return route_num(stairs - 1) + route_num(stairs - 2) route_num m = map(int, input().split()) map(int, input().split()) m a = [int(input()) for _ in range(m)] [int(input()) for _ in range(m)] a broken = {i:False for i in range(n + 1)} {i:False for i in range(n + 1)} broken
def route_num(stairs):
    if stairs <= 1:
        return 1
    else:
        return route_num(stairs - 1) + route_num(stairs - 2)

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

broken = {i:False for i in range(n + 1)}
for a_i in a:
    broken[a_i] = True

route_num = {}
for i in range(n + 1):
    if broken[i]:
        route_num[i] = 0
    elif i <= 1:
        route_num[i] = 1
    else:
        route_num[i] = (route_num[i-1] + route_num[i-2]) % 1000000007

print(route_num[n])
