output_description: If TopCoDeer is honest, print `H`. If he is dishonest, print `D`.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      a b
attempt: import itertools
  
  N, K = map(int, input().split())
  A = list(map(int, input().split()))
  A.sort()
  need = []
  iranaiko = []
  for a in A:
      if a >= K:
          need.append(a)
      elif a in need:
          need.append(a)
      elif a in iranaiko:
          pass
      else:
          z = 0
          B = A[:]
          B.remove(a)
          fusoku = [K - i - 1 for i in range(a)]
          for bi, b in enumerate(B):
              if b >= K:
                  break
          B = B[: bi + 1]
          for i in range(1, len(B) + 1):
              C = list(itertools.combinations(B, i))
              for c in C:
                  if sum(c) in fusoku:
                      need.append(a)
                      z = 1
                      break
              if z == 1:
                  break
          if z == 0:
              iranaiko.append(a)
  print(N - len(need))
  
problem_description: Statement
  
  Two deer, AtCoDeer and TopCoDeer, are playing a game called _Honest or
  Dishonest_. In this game, an honest player always tells the truth, and an
  dishonest player always tell lies. You are given two characters a and b as the
  input. Each of them is either `H` or `D`, and carries the following
  information:
  
  If a=`H`, AtCoDeer is honest; if a=`D`, AtCoDeer is dishonest. If b=`H`,
  AtCoDeer is saying that TopCoDeer is honest; if b=`D`, AtCoDeer is saying that
  TopCoDeer is dishonest.
  
  Given this information, determine whether TopCoDeer is honest.
samples: [{"input": "H H", "output": "H\n    \n\nIn this input, AtCoDeer is honest. Hence, as he says, TopCoDeer is honest.\n\n* * *"}, {"input": "D H", "output": "D\n    \n\nIn this input, AtCoDeer is dishonest. Hence, contrary to what he says,\nTopCoDeer is dishonest.\n\n* * *"}, {"input": "D D", "output": "H"}]