function main(input) {
  const a = BigInt(input.split(" ")[0]);
  const b_string = input.split(" ")[1];
  const n = b_string.split(".")[1].length;
  const b = parseFloat(b_string);
  const b_int = BigInt(b*(10**n));
  const ans_string = (a * b_int) + "";
  
  if (ans_string.length <= n) {
    console.log("0");
  } else {
    console.log(ans_string.substring(0, ans_string.length - n));
  }
}
 
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
