ans n t s =
  let a = splitBy '+' s
      v = (* t) $ sum $ map (f n) a
  in
    if v <= 1000000000 then show(v) else "TLE"
ans n t s =
  let a = splitBy '+' s
      v = (* t) $ sum $ map (f n) a
  in
    if v <= 1000000000 then show(v) else "TLE"
ans n t s =
  let a = splitBy '+' s
      v = (* t) $ sum $ map (f n) a
  in
    if v <= 1000000000 then show(v) else "TLE"