output_description: Print the number of the different possible combinations of integers written on
  the blackboard after Snuke performs the operations, modulo 1,000,000,007.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N K
      A_1 A_2 ... A_N
attempt: # -*- coding: utf-8 -*-
  
  
  def fun_A(L):
      A = list(map(int, [x / 2 for x in L]))
      return A
  
  
  def fun_B(L):
      A = [x - 1 for x in L]
      return A
  
  
  def fun_seq(K, func_list):
      if len(func_list[-1]) >= K:
          return
  
      length = len(func_list[-1])
      temp = 2**length
      for i in func_list[-temp:]:
          func_list.append(i + "A")
          func_list.append(i + "B")
  
      fun_seq(K, func_list)
  
  
  if __name__ == "__main__":
      N, K = map(int, input().split())
      A = list(map(int, input().split()))
  
      func_list = ["A", "B"]
      fun_seq(K, func_list)
      # print(len(func_list), func_list)
      count = 0
      for i in func_list:
          for j in i:
              if j == "A":
                  A = fun_A(A)
              if j == "B" and 0 not in A:
                  A = fun_B(A)
              else:
                  continue
          count += 1
      print(count % 1000000007)
  
problem_description: Statement
  
  There are N non-negative integers written on the blackboard: A_1, ..., A_N.
  
  Snuke can perform the following two operations at most K times in total in any
  order:
  
    * Operation A: Replace each integer X on the blackboard with X divided by 2, rounded down to the nearest integer.
    * Operation B: Replace each integer X on the blackboard with X minus 1. This operation cannot be performed if one or more 0s are written on the blackboard.
  
  Find the number of the different possible combinations of integers written on
  the blackboard after Snuke performs the operations, modulo 1,000,000,007.
samples: [{"input": "2 2\n    5 7", "output": "6\n    \n\nThere are six possible combinations of integers on the blackboard: (1, 1), (1,\n2), (2, 3), (3, 5), (4, 6) and (5, 7). For example, (1, 2) can be obtained by\nperforming Operation A and Operation B in this order.\n\n* * *"}, {"input": "3 4\n    10 13 22", "output": "20\n    \n\n* * *"}, {"input": "1 100\n    10", "output": "11\n    \n\n* * *"}, {"input": "10 123456789012345678\n    228344079825412349 478465001534875275 398048921164061989 329102208281783917 779698519704384319 617456682030809556 561259383338846380 254083246422083141 458181156833851984 502254767369499613", "output": "164286011"}]