def main():
    n,m=map(int,input().split())
    a=set(int(input()) for _ in range(m))
    pattern = [0] * (n+1)
    pattern[0] = 1
    for i in range(n-1):
        if i in a:
            continue
        if i+1 not in a:
            pattern[i+1] += pattern[i]
            pattern[i+1] %= 1000000007
        if i+2 not in a:
            pattern[i+2] += pattern[i]
            pattern[i+2] %= 1000000007
    pattern[n] += pattern[n-1]
    pattern[n] %= 1000000007
    print(pattern[n])
    
if __name__ == "__main__":
    main() def main():
    n,m=map(int,input().split())
    a=set(int(input()) for _ in range(m))
    pattern = [0] * (n+1)
    pattern[0] = 1
    for i in range(n-1):
        if i in a:
            continue
        if i+1 not in a:
            pattern[i+1] += pattern[i]
            pattern[i+1] %= 1000000007
        if i+2 not in a:
            pattern[i+2] += pattern[i]
            pattern[i+2] %= 1000000007
    pattern[n] += pattern[n-1]
    pattern[n] %= 1000000007
    print(pattern[n])
     main n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m a=set(int(input()) for _ in range(m)) a set(int(input()) for _ in range(m)) set int(input()) int input() input pattern = [0] * (n+1) pattern [0] * (n+1) [0] 0 n+1 n 1 pattern[0] = 1 pattern[0] pattern 0 1 for i in range(n-1):
        if i in a:
            continue
        if i+1 not in a:
            pattern[i+1] += pattern[i]
            pattern[i+1] %= 1000000007
        if i+2 not in a:
            pattern[i+2] += pattern[i]
            pattern[i+2] %= 1000000007
     i range(n-1) range n-1 n 1 if i in a:
            continue
         i in a i a continue if i+1 not in a:
            pattern[i+1] += pattern[i]
            pattern[i+1] %= 1000000007
         i+1 not in a i+1 i 1 a pattern[i+1] += pattern[i] pattern[i+1] pattern i+1 i 1 pattern[i] pattern i pattern[i+1] %= 1000000007 pattern[i+1] pattern i+1 i 1 1000000007 if i+2 not in a:
            pattern[i+2] += pattern[i]
            pattern[i+2] %= 1000000007
     i+2 not in a i+2 i 2 a pattern[i+2] += pattern[i] pattern[i+2] pattern i+2 i 2 pattern[i] pattern i pattern[i+2] %= 1000000007 pattern[i+2] pattern i+2 i 2 1000000007 pattern[n] += pattern[n-1] pattern[n] pattern n pattern[n-1] pattern n-1 n 1 pattern[n] %= 1000000007 pattern[n] pattern n 1000000007 print(pattern[n]) print pattern[n] pattern n if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n,m=map(int,input().split())
    a=set(int(input()) for _ in range(m))
    pattern = [0] * (n+1)
    pattern[0] = 1
    for i in range(n-1):
        if i in a:
            continue
        if i+1 not in a:
            pattern[i+1] += pattern[i]
            pattern[i+1] %= 1000000007
        if i+2 not in a:
            pattern[i+2] += pattern[i]
            pattern[i+2] %= 1000000007
    pattern[n] += pattern[n-1]
    pattern[n] %= 1000000007
    print(pattern[n])
     def main():
    n,m=map(int,input().split())
    a=set(int(input()) for _ in range(m))
    pattern = [0] * (n+1)
    pattern[0] = 1
    for i in range(n-1):
        if i in a:
            continue
        if i+1 not in a:
            pattern[i+1] += pattern[i]
            pattern[i+1] %= 1000000007
        if i+2 not in a:
            pattern[i+2] += pattern[i]
            pattern[i+2] %= 1000000007
    pattern[n] += pattern[n-1]
    pattern[n] %= 1000000007
    print(pattern[n])
     main
def main():
    n,m=map(int,input().split())
    a=set(int(input()) for _ in range(m))
    pattern = [0] * (n+1)
    pattern[0] = 1
    for i in range(n-1):
        if i in a:
            continue
        if i+1 not in a:
            pattern[i+1] += pattern[i]
            pattern[i+1] %= 1000000007
        if i+2 not in a:
            pattern[i+2] += pattern[i]
            pattern[i+2] %= 1000000007
    pattern[n] += pattern[n-1]
    pattern[n] %= 1000000007
    print(pattern[n])
    
if __name__ == "__main__":
    main()