import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        double B = sc.nextDouble();
        int b = (int)Math.floor(B*100+0.5);
        System.out.println(A*(b/100)+(A*(b%100))/100);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        double B = sc.nextDouble();
        int b = (int)Math.floor(B*100+0.5);
        System.out.println(A*(b/100)+(A*(b%100))/100);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        double B = sc.nextDouble();
        int b = (int)Math.floor(B*100+0.5);
        System.out.println(A*(b/100)+(A*(b%100))/100);
    } main {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        double B = sc.nextDouble();
        int b = (int)Math.floor(B*100+0.5);
        System.out.println(A*(b/100)+(A*(b%100))/100);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long A = sc.nextLong(); A sc.nextLong() sc.nextLong sc double B = sc.nextDouble(); B sc.nextDouble() sc.nextDouble sc int b = (int)Math.floor(B*100+0.5); b (int)Math.floor(B*100+0.5) Math.floor Math B*100+0.5 B*100 B 100 0.5 System.out.println(A*(b/100)+(A*(b%100))/100) System.out.println System.out System System.out A*(b/100)+(A*(b%100))/100 A*(b/100) A (b/100) b 100 (A*(b%100))/100 (A*(b%100)) A (b%100) b 100 100 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        double B = sc.nextDouble();
        int b = (int)Math.floor(B*100+0.5);
        System.out.println(A*(b/100)+(A*(b%100))/100);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        double B = sc.nextDouble();
        int b = (int)Math.floor(B*100+0.5);
        System.out.println(A*(b/100)+(A*(b%100))/100);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long A = sc.nextLong();
        double B = sc.nextDouble();
        int b = (int)Math.floor(B*100+0.5);
        System.out.println(A*(b/100)+(A*(b%100))/100);
    }
}
