import scala.io.StdIn._
import scala.math._

object Main extends App with StdInHelper {
  val ss = readStrings
  val a = ss(0).toLong
  val b = ss(1).toDouble
  println(floor(a / pow(10, 10) * b).toLong * pow(10, 10).toLong)
}

trait StdInHelper {
  def readStrings = readLine.split(" ")
  def readInts = readLine.split(" ").map(_.toInt)
  def readLongs = readLine.split(" ").map(_.toLong)
  def readDoubles = readLine.split(" ").map(_.toDouble)
}
