#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
	long long a;
	char b[11];
	scanf("%lld%s",&a,b);
	int bb=0,cc=0,i,sum=1;
	for(i=strlen(b)-1;b[i]!='.';i--){
		cc+=(b[i]-'0')*sum;
		sum*=10;
	}
	sum=1;
	for(i--;i>=0;i--){
		if(i<0)break;
		bb+=(b[i]-'0')*sum;
		sum*=10;
	}
	sum=bb*100+cc;
	printf("%lld\n",(sum*a)/100);
}