output_description: Print x rounded up to the nearest integer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      a b
attempt: import sys
  
  sys.setrecursionlimit(10**7)
  INTMAX = 9223372036854775807
  INTMIN = -9223372036854775808
  MOD = 1000000007
  
  
  def POW(x, y):
      return pow(x, y, MOD)
  
  
  def INV(x, m=MOD):
      return pow(x, m - 2, m)
  
  
  def DIV(x, y, m=MOD):
      return (x * INV(y, m)) % m
  
  
  def LI():
      return [int(x) for x in input().split()]
  
  
  def LF():
      return [float(x) for x in input().split()]
  
  
  def LS():
      return input().split()
  
  
  def II():
      return int(sys.stdin.readline())
  
  
  def SI():
      return input()
  
  
  S = input()
  X, Y = LI()
  
  while S and S[0] == "F":
      S = S[1:]
      X -= 1
  
  isX = True
  cur = 0
  xs = []
  ys = []
  for i in range(len(S)):
      if S[i] == "T":
          if cur:
              if isX:
                  xs.append(cur)
              else:
                  ys.append(cur)
          isX = not isX
          cur = 0
      elif S[i] == "F":
          cur += 1
  
  if cur:
      if isX:
          xs.append(cur)
      else:
          ys.append(cur)
  
  X = abs(X)
  Y = abs(Y)
  sumxs = sum(xs)
  sumys = sum(ys)
  if X > sumxs or Y > sumys:
      print("No")
      exit()
  
  memo1 = [[0] * (sumxs * 2 + 10) for i in range(len(xs) + 1)]
  memo2 = [[0] * (sumys * 2 + 10) for i in range(len(ys) + 1)]
  
  memo1[0][0] = 1
  memo2[0][0] = 1
  for i in range(1, len(xs) + 1):
      for j in range(-sumxs, sumxs + 1):
          memo1[i][j] = memo1[i - 1][j + xs[i - 1]]
          memo1[i][j] = memo1[i - 1][j - xs[i - 1]]
  
  # print(len(ys))
  # print(len(memo2))
  for i in range(1, len(ys) + 1):
      for j in range(-sumys, sumys + 1):
          memo2[i][j] = memo2[i - 1][j + ys[i - 1]]
          memo2[i][j] = memo2[i - 1][j - ys[i - 1]]
  
  print("Yes" if memo1[len(xs)][X] and memo2[len(ys)][Y] else "No")
  
problem_description: Statement
  
  You are given two positive integers a and b. Let x be the average of a and b.
  Print x rounded up to the nearest integer.
samples: [{"input": "1 3", "output": "2\n    \n\nThe average of 1 and 3 is 2.0, and it will be rounded up to the nearest\ninteger, 2.\n\n* * *"}, {"input": "7 4", "output": "6\n    \n\nThe average of 7 and 4 is 5.5, and it will be rounded up to the nearest\ninteger, 6.\n\n* * *"}, {"input": "5 5", "output": "5"}]