#include <stdio.h>

int main(void){

  long a;
  double b;
  scanf("%ld %lf", &a, &b);
  long b_l = b/1;
  b -= b_l;
  b *= 10;
  long b_1 = b/1;
  b -= b_1;
  b *= 10;
  long b_2 = b/1;
  long ansl = a*b_l;
  long ans1 = a*b_1;
  long ans2 = a*b_2;
  long ans = ans1*10+ans2;
  ans /= 100;
  ans += ansl;
  printf("%ld\n", ans);

  return 0;
}