import java.util.*;
import java.math.*;
class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        double b = Double.parseDouble(sc.next());
        b*=500;
        long c = (long)b;
        System.out.println(a*c/500);
    }
} import java.util.*; util.* java import java.math.*; math.* java class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        double b = Double.parseDouble(sc.next());
        b*=500;
        long c = (long)b;
        System.out.println(a*c/500);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        double b = Double.parseDouble(sc.next());
        b*=500;
        long c = (long)b;
        System.out.println(a*c/500);
    } main {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        double b = Double.parseDouble(sc.next());
        b*=500;
        long c = (long)b;
        System.out.println(a*c/500);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = Long.parseLong(sc.next()); a Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc double b = Double.parseDouble(sc.next()); b Double.parseDouble(sc.next()) Double.parseDouble Double sc.next() sc.next sc b*=500 b 500 long c = (long)b; c (long)b System.out.println(a*c/500) System.out.println System.out System System.out a*c/500 a*c a c 500 String[] args args
import java.util.*;
import java.math.*;
class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        double b = Double.parseDouble(sc.next());
        b*=500;
        long c = (long)b;
        System.out.println(a*c/500);
    }
}