#include<stdio.h>
#include<math.h>
#include<string.h>
int main()
{
	long long a,s1,s2,s3,s,sum;
	double b;
	scanf("%lld %lf",&a,&b);
	s=(b*100)/1;
	s3=s%10;
	s2=(s/10)%10;
	s1=s/100;
	sum=a*s1+a*s2/10+a*s3/100;
	printf("%lld\n",sum);
    return 0;
}
