#include <stdio.h>

int main()
{

    unsigned long long  a;
    double b;

    scanf("%lld", &a);
    scanf("%lf", &b);
    double c =( b * 100.0);
    int z = c / 100;//1のくらいのみ
   // printf("1けため%d\n",z);
    int q = ((int)c - z*100) / 10;
    int r = ((int)c - z * 100-q*10);
  //  printf("2けため%d\n",q);
    //printf("2けため%d\n", r);

    printf("%lld", a * (unsigned long long)z + (a * (unsigned long long)q) / (unsigned long long)10 + (a * (unsigned long long)r) / (unsigned long long)100);

    printf("\n");
}