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;
	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"));