output_description: Print the number of ways to climb up the stairs under the condition, modulo 1\
  000\ 000\ 007.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
      a_1
      a_2
       .
       .
       .
      a_M
attempt: import sys
  
  input = sys.stdin.buffer.readline
  
  
  def main(arg):
      # print(arg)
      input = arg.split("\n")
      N, M = list(map(int, input.pop(0).split(" ")))
      print(input)
      # return
      A = list(map(int, input))
      # print(N)
      # print(M)
      print(A)
  
      # return
  
      if len(A) > 1:
          for i in range(1, M):
              if A[i] - A[i - 1] == 1:
                  print(0)
                  return
  
      dp = [0] * (N - M + 1)
      dp[0] = 1
  
      for i in range(1, N - M + 1):
          dp1 = dp[i - 1] % 1000000007
          dp2 = 0
          if i >= 2:
              dp2 = (dp[i - 2] * 2) % 1000000007
  
          print("i={0}: dp1={1}, dp2={2}".format(i, dp1, dp2))
          dp[i] = max(dp1, dp2)
  
      print(dp[N - M])
  
  
  # main("6 1\n3")
  main(input())
  
problem_description: Statement
  
  There is a staircase with N steps. Takahashi is now standing at the foot of
  the stairs, that is, on the 0-th step. He can climb up one or two steps at a
  time.
  
  However, the treads of the a_1-th, a_2-th, a_3-th, \ldots, a_M-th steps are
  broken, so it is dangerous to set foot on those steps.
  
  How many are there to climb up to the top step, that is, the N-th step,
  without setting foot on the broken steps? Find the count modulo 1\ 000\ 000\
  007.
samples: [{"input": "6 1\n    3", "output": "4\n    \n\nThere are four ways to climb up the stairs, as follows:\n\n  * 0 \\to 1 \\to 2 \\to 4 \\to 5 \\to 6\n  * 0 \\to 1 \\to 2 \\to 4 \\to 6\n  * 0 \\to 2 \\to 4 \\to 5 \\to 6\n  * 0 \\to 2 \\to 4 \\to 6\n\n* * *"}, {"input": "10 2\n    4\n    5", "output": "0\n    \n\nThere may be no way to climb up the stairs without setting foot on the broken\nsteps.\n\n* * *"}, {"input": "100 5\n    1\n    23\n    45\n    67\n    89", "output": "608200469\n    \n\nBe sure to print the count modulo 1\\ 000\\ 000\\ 007."}]