import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Read as T

main :: IO ()
main = do
  (a, b) <- ((,) <$> unsafeTextToInt . fst <*> unsafeTextToDouble . snd) . unsafeListToPair . T.words <$> T.getLine :: IO (Int, Double)
  let
    b' = floor $ 100 * b :: Int
  print $ a * b' `div` 100

unsafeListToPair :: [a] -> (a, a)
unsafeListToPair [x, y] = (x, y)
{-# INLINE unsafeListToPair #-}

unsafeTextToDouble :: T.Text -> Double
unsafeTextToDouble s = case T.double s of
  Right (x, _) -> x
{-# INLINE unsafeTextToDouble #-}

unsafeTextToInt :: T.Text -> Int
unsafeTextToInt s = case T.signed T.decimal s of
  Right (n, _) -> n
{-# INLINE unsafeTextToInt #-}
