Problem:
Score : 300 points

Problem Statement

Compute A \times B, truncate its fractional part, and print the result as an integer.

Constraints

0 \leq A \leq 10^{15}

0 \leq B < 10

A is an integer.

B is a number with two digits after the decimal point.

Input

Input is given from Standard Input in the following format:

A B

Output

Print the answer as an integer.

Sample Input 1

198 1.10

Sample Output 1

217

We have 198 \times 1.10 = 217.8. After truncating the fractional part, we have the answer: 217.

Sample Input 2

1 0.01

Sample Output 2

0

Sample Input 3

1000000000000000 9.99

Sample Output 3

9990000000000000

Solution in Scala (2.13.1) (judge verdict: Wrong Answer)

object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val Array(datA_, datB_) = readLine.split(" ")
    val datA = datA_.toLong
    val datB = (datB_.toDouble * 100).toLong

    val border = math.pow(10,8).toLong

    val datAL = datA % border
    val datAU = datA / border
    val datBL = datB % border
    val datBU = datB / border

    val mulLL = datAL * datBL
    val mulUL = datAU * datBL
    val mulLU = datAL * datBU
    val mulUU = datAU * datBU
    //println(mulLL +" "+ mulUL +" "+ mulLU +" "+ mulUU)
    val ans0 = (mulLL % border) / 100
    val cry0 = mulLL / border

    val ans1_ = mulUL + mulLU + cry0
    val ans1 = ans1_ % border
    val cry1 = ans1_ / border

    val ans2 = mulUU + cry1
    //println(ans0 +" "+ ans1 +" "+ ans2)
    val str0 = if ((ans1 == 0) && (ans2 == 0)) ans0.toString else f"$ans0%06d"
    val str1 = if (ans1 == 0) "" else if (ans2 == 0) ans1.toString else f"$ans1%08d"
    val str2 = if (ans2 == 0) "" else ans2.toString

    println(str2 + str1 + str0)
  }
}