#include<stdio.h>
int main(){
  long long a,b,x1,x2,x3;
  double c;
  scanf("%lld %lf",&a,&c);
  b=c*100;
  x1=a*(b/100);
  x2=a*((b/10)%10)/10;
  x3=a*(b%10)/100;
  //printf("%lld\n",b%100);
  //printf("%lld %lld %lld\n",x1,x2,x3);
  printf("%lld\n",x1+x2+x3);
  return 0;
}
