def main3():
    N, M = map(int, input().split())
    ng_step = set([int(input()) for _ in range(M)])

    dp = [0 for i in range(N + 1)]
    dp[0] = 1

    if 1 in ng_step:
        dp[1] = 0
    else:
        dp[1] = 1

    for i in range(2, N + 1):
        if i in ng_step:
            dp[i] = 0
        else:
            dp[i] = dp[i - 1] + dp[i - 2] 
    
    print(dp[N] % (10**9 + 7))

if __name__ == "__main__":
    main3() def main3():
    N, M = map(int, input().split())
    ng_step = set([int(input()) for _ in range(M)])

    dp = [0 for i in range(N + 1)]
    dp[0] = 1

    if 1 in ng_step:
        dp[1] = 0
    else:
        dp[1] = 1

    for i in range(2, N + 1):
        if i in ng_step:
            dp[i] = 0
        else:
            dp[i] = dp[i - 1] + dp[i - 2] 
    
    print(dp[N] % (10**9 + 7)) main3 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 ng_step = set([int(input()) for _ in range(M)]) ng_step set([int(input()) for _ in range(M)]) set [int(input()) for _ in range(M)] 0 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) 0 dp = [0 for i in range(N + 1)] dp [0 for i in range(N + 1)] dp[0] = 1 dp[0] dp 0 1 if 1 in ng_step:
        dp[1] = 0
    else:
        dp[1] = 1

     1 in ng_step 1 ng_step dp[1] = 0 dp[1] dp 1 0 dp[1] = 1 dp[1] dp 1 1 for i in range(2, N + 1):
        if i in ng_step:
            dp[i] = 0
        else:
            dp[i] = dp[i - 1] + dp[i - 2] 
    
     i range(2, N + 1) range 2 N + 1 N 1 if i in ng_step:
            dp[i] = 0
        else:
            dp[i] = dp[i - 1] + dp[i - 2] 
    
     i in ng_step i ng_step dp[i] = 0 dp[i] dp i 0 dp[i] = dp[i - 1] + dp[i - 2] dp[i] dp i dp[i - 1] + dp[i - 2] dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 print(dp[N] % (10**9 + 7)) print dp[N] % (10**9 + 7) dp[N] dp N 10**9 + 7 10**9 10 9 7 if __name__ == "__main__":
    main3() __name__ == "__main__" __name__ "__main__" main3() main3 def main3():
    N, M = map(int, input().split())
    ng_step = set([int(input()) for _ in range(M)])

    dp = [0 for i in range(N + 1)]
    dp[0] = 1

    if 1 in ng_step:
        dp[1] = 0
    else:
        dp[1] = 1

    for i in range(2, N + 1):
        if i in ng_step:
            dp[i] = 0
        else:
            dp[i] = dp[i - 1] + dp[i - 2] 
    
    print(dp[N] % (10**9 + 7)) def main3():
    N, M = map(int, input().split())
    ng_step = set([int(input()) for _ in range(M)])

    dp = [0 for i in range(N + 1)]
    dp[0] = 1

    if 1 in ng_step:
        dp[1] = 0
    else:
        dp[1] = 1

    for i in range(2, N + 1):
        if i in ng_step:
            dp[i] = 0
        else:
            dp[i] = dp[i - 1] + dp[i - 2] 
    
    print(dp[N] % (10**9 + 7)) main3
def main3():
    N, M = map(int, input().split())
    ng_step = set([int(input()) for _ in range(M)])

    dp = [0 for i in range(N + 1)]
    dp[0] = 1

    if 1 in ng_step:
        dp[1] = 0
    else:
        dp[1] = 1

    for i in range(2, N + 1):
        if i in ng_step:
            dp[i] = 0
        else:
            dp[i] = dp[i - 1] + dp[i - 2] 
    
    print(dp[N] % (10**9 + 7))

if __name__ == "__main__":
    main3()