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 JavaScript (Node.js 12.16.1) (judge verdict: Wrong Answer)

function Main(input) {
	input = input.trim().split(" ");
	var A = input[0];
	var B = input[1];
	var a1 = parseInt(A.slice(0, -7),10);
	var a2 = parseInt(A.substr(-7, 7),10);
	var b1 = parseInt(B.trim().split(".")[0]);
	var b2 = parseInt(B.trim().split(".")[1]);
	if (isNaN(a1)) a1 = 0;
	if (isNaN(a2)) a2 = 0;
	if (isNaN(b1)) b1 = 0;
	if (isNaN(b2)) b2 = 0;
  	if (b2 < 10 ) b2 *= 10; 
	var ANS, ans1, ans2, ansMiddle, tmp;
	
	ans1 = a1 * (b1 * 100 + b2);
	tmp = String(a2 * (b1 * 100 + b2)).slice(0,-2); 
	ansMiddle = parseInt(tmp.slice(0, -5),10);
  	if (isNaN(ansMiddle)) ansMiddle = 0;
	ans2 = parseInt(tmp.substr(-5, 5),10);
	if (isNaN(ans2)) ans2 = 0;
	ans1 = String(ans1 + ansMiddle);
	if (ans1 === '0'){
		ANS = String(ans2);
	} else {

		ANS = ans1 + String(ans2 + 100000).substr(-5,5);
	}	
 	console.log(ANS);	
}   

Main(require("fs").readFileSync("/dev/stdin", "utf8"));