import java.util.*;
import java.io.*;
import static java.lang.Math.*;
import java.math.BigInteger;
import java.math.BigDecimal;

public class Main {
    public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		long a = sc.nextLong();
		String b = sc.next();
		BigDecimal A = new BigDecimal(a);
		BigDecimal B = new BigDecimal(b);
		
		// 計算
		
		// 出力
		System.out.println(A.multiply(B).toBigInteger());
	}

} import java.util.*; util.* java import java.io.*; io.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import java.math.BigInteger; BigInteger java.math import java.math.BigDecimal; BigDecimal java.math public class Main {
    public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		long a = sc.nextLong();
		String b = sc.next();
		BigDecimal A = new BigDecimal(a);
		BigDecimal B = new BigDecimal(b);
		
		// 計算
		
		// 出力
		System.out.println(A.multiply(B).toBigInteger());
	}

} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		long a = sc.nextLong();
		String b = sc.next();
		BigDecimal A = new BigDecimal(a);
		BigDecimal B = new BigDecimal(b);
		
		// 計算
		
		// 出力
		System.out.println(A.multiply(B).toBigInteger());
	} main {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		long a = sc.nextLong();
		String b = sc.next();
		BigDecimal A = new BigDecimal(a);
		BigDecimal B = new BigDecimal(b);
		
		// 計算
		
		// 出力
		System.out.println(A.multiply(B).toBigInteger());
	} 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(); b sc.next() sc.next sc BigDecimal A = new BigDecimal(a); A new BigDecimal(a) BigDecimal B = new BigDecimal(b); B new BigDecimal(b) System.out.println(A.multiply(B).toBigInteger()) System.out.println System.out System System.out A.multiply(B).toBigInteger() A.multiply(B).toBigInteger A.multiply(B) A.multiply A B String[] args args public class Main {
    public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		long a = sc.nextLong();
		String b = sc.next();
		BigDecimal A = new BigDecimal(a);
		BigDecimal B = new BigDecimal(b);
		
		// 計算
		
		// 出力
		System.out.println(A.multiply(B).toBigInteger());
	}

} public class Main {
    public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		long a = sc.nextLong();
		String b = sc.next();
		BigDecimal A = new BigDecimal(a);
		BigDecimal B = new BigDecimal(b);
		
		// 計算
		
		// 出力
		System.out.println(A.multiply(B).toBigInteger());
	}

} Main
import java.util.*;
import java.io.*;
import static java.lang.Math.*;
import java.math.BigInteger;
import java.math.BigDecimal;

public class Main {
    public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		long a = sc.nextLong();
		String b = sc.next();
		BigDecimal A = new BigDecimal(a);
		BigDecimal B = new BigDecimal(b);
		
		// 計算
		
		// 出力
		System.out.println(A.multiply(B).toBigInteger());
	}

}
