import java.util.*;
import java.math.*;
public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long a = Long.parseLong(in.next());
		String b = in.next();
		long bb = 0;
		int times = 100;
		for(int i = 0; i < 4; i++) {
			if(!b.substring(i, i + 1).equals(".")) {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			}
		}
		long c = a * bb;
		c -= c % 100;
		c /= 100;
		System.out.println(c);
	}
} import java.util.*; util.* java import java.math.*; math.* java public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long a = Long.parseLong(in.next());
		String b = in.next();
		long bb = 0;
		int times = 100;
		for(int i = 0; i < 4; i++) {
			if(!b.substring(i, i + 1).equals(".")) {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			}
		}
		long c = a * bb;
		c -= c % 100;
		c /= 100;
		System.out.println(c);
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long a = Long.parseLong(in.next());
		String b = in.next();
		long bb = 0;
		int times = 100;
		for(int i = 0; i < 4; i++) {
			if(!b.substring(i, i + 1).equals(".")) {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			}
		}
		long c = a * bb;
		c -= c % 100;
		c /= 100;
		System.out.println(c);
	} main {
		Scanner in = new Scanner(System.in);
		long a = Long.parseLong(in.next());
		String b = in.next();
		long bb = 0;
		int times = 100;
		for(int i = 0; i < 4; i++) {
			if(!b.substring(i, i + 1).equals(".")) {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			}
		}
		long c = a * bb;
		c -= c % 100;
		c /= 100;
		System.out.println(c);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) long a = Long.parseLong(in.next()); a Long.parseLong(in.next()) Long.parseLong Long in.next() in.next in String b = in.next(); b in.next() in.next in long bb = 0; bb 0 int times = 100; times 100 for(int i = 0; i < 4; i++) {
			if(!b.substring(i, i + 1).equals(".")) {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			}
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			if(!b.substring(i, i + 1).equals(".")) {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			}
		} {
			if(!b.substring(i, i + 1).equals(".")) {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			}
		} if(!b.substring(i, i + 1).equals(".")) {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			} !b.substring(i, i + 1).equals(".") b.substring(i, i + 1).equals(".") b.substring(i, i + 1).equals b.substring(i, i + 1) b.substring b i i + 1 i 1 "." {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			} bb += times * Integer.parseInt(b.substring(i, i + 1)) bb times * Integer.parseInt(b.substring(i, i + 1)) times Integer.parseInt(b.substring(i, i + 1)) Integer.parseInt Integer b.substring(i, i + 1) b.substring b i i + 1 i 1 times /= 10 times 10 long c = a * bb; c a * bb a bb c -= c % 100 c c % 100 c 100 c /= 100 c 100 System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long a = Long.parseLong(in.next());
		String b = in.next();
		long bb = 0;
		int times = 100;
		for(int i = 0; i < 4; i++) {
			if(!b.substring(i, i + 1).equals(".")) {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			}
		}
		long c = a * bb;
		c -= c % 100;
		c /= 100;
		System.out.println(c);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long a = Long.parseLong(in.next());
		String b = in.next();
		long bb = 0;
		int times = 100;
		for(int i = 0; i < 4; i++) {
			if(!b.substring(i, i + 1).equals(".")) {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			}
		}
		long c = a * bb;
		c -= c % 100;
		c /= 100;
		System.out.println(c);
	}
} Main
import java.util.*;
import java.math.*;
public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long a = Long.parseLong(in.next());
		String b = in.next();
		long bb = 0;
		int times = 100;
		for(int i = 0; i < 4; i++) {
			if(!b.substring(i, i + 1).equals(".")) {
				bb += times * Integer.parseInt(b.substring(i, i + 1));
				times /= 10;
			}
		}
		long c = a * bb;
		c -= c % 100;
		c /= 100;
		System.out.println(c);
	}
}