import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        String[] B = sc.next().split("\\.");

        int b1 = Integer.parseInt(B[0]);
        int b2 = Integer.parseInt(B[1]);
        //System.out.println(b1);
        //System.out.println(b2);

        int b = b1 * 100 + b2;
        long ans = A * b;
        System.out.println(ans/100);
        return;
    }

} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
} Main public static void main(String[] args) {
        new Solver().run();
    } main {
        new Solver().run();
    } new Solver().run() new Solver().run new Solver() String[] args args class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        String[] B = sc.next().split("\\.");

        int b1 = Integer.parseInt(B[0]);
        int b2 = Integer.parseInt(B[1]);
        //System.out.println(b1);
        //System.out.println(b2);

        int b = b1 * 100 + b2;
        long ans = A * b;
        System.out.println(ans/100);
        return;
    }

} Solver public void run() {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        String[] B = sc.next().split("\\.");

        int b1 = Integer.parseInt(B[0]);
        int b2 = Integer.parseInt(B[1]);
        //System.out.println(b1);
        //System.out.println(b2);

        int b = b1 * 100 + b2;
        long ans = A * b;
        System.out.println(ans/100);
        return;
    } run {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        String[] B = sc.next().split("\\.");

        int b1 = Integer.parseInt(B[0]);
        int b2 = Integer.parseInt(B[1]);
        //System.out.println(b1);
        //System.out.println(b2);

        int b = b1 * 100 + b2;
        long ans = A * b;
        System.out.println(ans/100);
        return;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long A = sc.nextLong(); A sc.nextLong() sc.nextLong sc String[] B = sc.next().split("\\."); B sc.next().split("\\.") sc.next().split sc.next() sc.next sc "\\." int b1 = Integer.parseInt(B[0]); b1 Integer.parseInt(B[0]) Integer.parseInt Integer B[0] B 0 int b2 = Integer.parseInt(B[1]); b2 Integer.parseInt(B[1]) Integer.parseInt Integer B[1] B 1 int b = b1 * 100 + b2; b b1 * 100 + b2 b1 * 100 b1 100 b2 long ans = A * b; ans A * b A b System.out.println(ans/100) System.out.println System.out System System.out ans/100 ans 100 return;
import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        String[] B = sc.next().split("\\.");

        int b1 = Integer.parseInt(B[0]);
        int b2 = Integer.parseInt(B[1]);
        //System.out.println(b1);
        //System.out.println(b2);

        int b = b1 * 100 + b2;
        long ans = A * b;
        System.out.println(ans/100);
        return;
    }

}