import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		long A = sc.nextLong();
		double B = sc.nextDouble();
		
		if (B == 0) {
			System.out.println(0);
			sc.close();
			return;
		}
		
		long C = Math.round(B * 100);
		long D = A * C;

		// 結果の出力
		System.out.println(Math.floorDiv(D, 100));

		sc.close();
	}
} import java.util.Scanner; Scanner 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();
		
		if (B == 0) {
			System.out.println(0);
			sc.close();
			return;
		}
		
		long C = Math.round(B * 100);
		long D = A * C;

		// 結果の出力
		System.out.println(Math.floorDiv(D, 100));

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		long A = sc.nextLong();
		double B = sc.nextDouble();
		
		if (B == 0) {
			System.out.println(0);
			sc.close();
			return;
		}
		
		long C = Math.round(B * 100);
		long D = A * C;

		// 結果の出力
		System.out.println(Math.floorDiv(D, 100));

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		long A = sc.nextLong();
		double B = sc.nextDouble();
		
		if (B == 0) {
			System.out.println(0);
			sc.close();
			return;
		}
		
		long C = Math.round(B * 100);
		long D = A * C;

		// 結果の出力
		System.out.println(Math.floorDiv(D, 100));

		sc.close();
	} 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 if (B == 0) {
			System.out.println(0);
			sc.close();
			return;
		} B == 0 B 0 {
			System.out.println(0);
			sc.close();
			return;
		} System.out.println(0) System.out.println System.out System System.out 0 sc.close() sc.close sc return; long C = Math.round(B * 100); C Math.round(B * 100) Math.round Math B * 100 B 100 long D = A * C; D A * C A C System.out.println(Math.floorDiv(D, 100)) System.out.println System.out System System.out Math.floorDiv(D, 100) Math.floorDiv Math D 100 sc.close() sc.close sc 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();
		
		if (B == 0) {
			System.out.println(0);
			sc.close();
			return;
		}
		
		long C = Math.round(B * 100);
		long D = A * C;

		// 結果の出力
		System.out.println(Math.floorDiv(D, 100));

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		long A = sc.nextLong();
		double B = sc.nextDouble();
		
		if (B == 0) {
			System.out.println(0);
			sc.close();
			return;
		}
		
		long C = Math.round(B * 100);
		long D = A * C;

		// 結果の出力
		System.out.println(Math.floorDiv(D, 100));

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		long A = sc.nextLong();
		double B = sc.nextDouble();
		
		if (B == 0) {
			System.out.println(0);
			sc.close();
			return;
		}
		
		long C = Math.round(B * 100);
		long D = A * C;

		// 結果の出力
		System.out.println(Math.floorDiv(D, 100));

		sc.close();
	}
}
