program Typical_Strairs
    implicit none
    integer(8):: n,m,i,a
    integer(8),allocatable::dp(:)
    integer(8),parameter:: md=1000000007
    logical,allocatable:: safe(:)

    read*, n,m
    allocate(dp(0:n),safe(n))
    safe(:) = .true.
    do i=1,m
        read*, a
        safe(a) = .false.
    end do

    dp(0) = 1
    dp(1:) = 0    

    do i=0,n-1
        if (safe(i+1)) dp(i+1) = mod(dp(i+1) + dp(i),md)
        if (safe(i+2) .and. i+2 <= n) dp(i+2) = mod(dp(i+2) + dp(i),md) 
    end do

    print*, dp(n)

end program Typical_Strairs