#define __STDC_WANT_IEC_60559_DFP_EXT__
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <math.h>

int main(int argc, char *argv[])
{
    int64_t a;
    _Decimal128 b;
    scanf("%" SCNd64 " %DDf", &a, &b);
#if 0
    // 10進小数として掛け算する
    printf("%" PRIi64 "\n", (int64_t)floord128((_Decimal128)a * b));
#else
    // 100倍の計算に10進小数を使う
    int64_t bb = (int64_t)(b * 100.0DL);
    printf("%" PRIi64 "\n", a * bb / INT64_C(100));
#endif
}
