import java.util.*; 
import java.lang.*; 


public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                long A = scan.nextLong();
                double B = scan.nextDouble()+0.001;
                long x = (long)B;
                double B1 = (B-x)*10;
                long y = (long)B1;
                double B2 = (B1-y)*10;
                long z = (long)B2;

                long ans1 = (A*(100*x+10*y+z))/100;
                System.out.println(ans1);
        }
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                long A = scan.nextLong();
                double B = scan.nextDouble()+0.001;
                long x = (long)B;
                double B1 = (B-x)*10;
                long y = (long)B1;
                double B2 = (B1-y)*10;
                long z = (long)B2;

                long ans1 = (A*(100*x+10*y+z))/100;
                System.out.println(ans1);
        }
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                long A = scan.nextLong();
                double B = scan.nextDouble()+0.001;
                long x = (long)B;
                double B1 = (B-x)*10;
                long y = (long)B1;
                double B2 = (B1-y)*10;
                long z = (long)B2;

                long ans1 = (A*(100*x+10*y+z))/100;
                System.out.println(ans1);
        } main {
		Scanner scan = new Scanner(System.in);
                
                long A = scan.nextLong();
                double B = scan.nextDouble()+0.001;
                long x = (long)B;
                double B1 = (B-x)*10;
                long y = (long)B1;
                double B2 = (B1-y)*10;
                long z = (long)B2;

                long ans1 = (A*(100*x+10*y+z))/100;
                System.out.println(ans1);
        } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long A = scan.nextLong(); A scan.nextLong() scan.nextLong scan double B = scan.nextDouble()+0.001; B scan.nextDouble()+0.001 scan.nextDouble() scan.nextDouble scan 0.001 long x = (long)B; x (long)B double B1 = (B-x)*10; B1 (B-x)*10 (B-x) B x 10 long y = (long)B1; y (long)B1 double B2 = (B1-y)*10; B2 (B1-y)*10 (B1-y) B1 y 10 long z = (long)B2; z (long)B2 long ans1 = (A*(100*x+10*y+z))/100; ans1 (A*(100*x+10*y+z))/100 (A*(100*x+10*y+z)) A (100*x+10*y+z) 100*x+10*y+z 100*x 100 x 10*y 10 y z 100 System.out.println(ans1) System.out.println System.out System System.out ans1 String[] args args public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                long A = scan.nextLong();
                double B = scan.nextDouble()+0.001;
                long x = (long)B;
                double B1 = (B-x)*10;
                long y = (long)B1;
                double B2 = (B1-y)*10;
                long z = (long)B2;

                long ans1 = (A*(100*x+10*y+z))/100;
                System.out.println(ans1);
        }
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                long A = scan.nextLong();
                double B = scan.nextDouble()+0.001;
                long x = (long)B;
                double B1 = (B-x)*10;
                long y = (long)B1;
                double B2 = (B1-y)*10;
                long z = (long)B2;

                long ans1 = (A*(100*x+10*y+z))/100;
                System.out.println(ans1);
        }
} Main
import java.util.*; 
import java.lang.*; 


public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                long A = scan.nextLong();
                double B = scan.nextDouble()+0.001;
                long x = (long)B;
                double B1 = (B-x)*10;
                long y = (long)B1;
                double B2 = (B1-y)*10;
                long z = (long)B2;

                long ans1 = (A*(100*x+10*y+z))/100;
                System.out.println(ans1);
        }
}