main :: IO ()
main = do
  [a', b'] <- words <$> getLine
  let a = read a' :: Double
      b = read b' :: Double
      fb = fromInteger . floor $ b
      result = floor $ a * fb + a * (b - fb)
  print result
