#include <stdio.h>

int main()
{

    long long  a;
    double b;

    scanf("%lld", &a);
    scanf("%lf", &b);
    double c =( b * 100.0);
    int z = b / 100;//1のくらいのみ
    int q = ((int)c - z) / 10;

    printf("%lld", a * (long long)z + a * (long long)(q) / 10l + a * (long long)(c - (double)q * 10.0 - (double)z * 100.0) / 100l);

    printf("\n");
}