#include <stdio.h>
#include <math.h>

int main(void){

  long a;
  double b;
  scanf("%ld %lf", &a, &b);
  b *= 100;
  long b_l = floor(b);
  long b_2 = b_l%100;
  b_l /= 100;
  long ans = a*b_2;
  ans /= 100;
  long plus = a*b_l;
  ans += plus;
  printf("%ld\n", ans);

  return 0;
}