#include <stdio.h>

int main(){
  long a;
  double b;
  scanf("%ld %lf", &a, &b);
  int bup = (int)b;

  int bdown = (int)(b*1000)/10 - bup*100;

  long ans = bup * a + (bdown * a) / 100;

  printf("%ld\n", ans);

  //  printf("%d %d ", bup, bdown);

  return 0;
}
