"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const A = BigInt(arg[0].split(" ")[0]);
    const B = String(arg[0].split(" ")[1]);

    const J  = BigInt(B.split(".")[0]);
    const S1 = BigInt(B.split(".")[1].split("")[0]);
    const S2 = BigInt(B.split(".")[1].split("")[1]);
    
    if(A > 1000) {
        let answer = (A * J) + ((A * S1) / 10n) + ((A * S2) / 100n);
        console.log(answer.toString());
    } else {
        console.log(Math.floor(parseInt(A) * (B)));
    }
    
    //console.log(10200 * 0.13)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));