#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#define PI 3.141592653589793
#define MOD 1000000007

//qsort用、昇順
int compare_int(const void *a, const void *b)
{
	return *(int*)a-*(int*)b;
}
//qsort(data, 10, sizeof(int), compare_int)

//long long int a[100100];

int main(){
	long long int a;
	double b;
	scanf("%lld%lf", &a, &b);
	//printf("%lld:%f\n", a, b);
	long long int n1=0, n2=0, n3=0;
	while(b>=1){
		b--;
		n1++;
	}
	while(b>=0.1){
		b -= 0.1;
		n2++;
	}
	while(b>=0.01){
		b -= 0.01;
		n3++;
	}

	long long int ans1, ans2, ans3;
	ans1 = n1*a;
	ans2 = n2*a;
	ans3 = n3*a;
	ans3 = ans3/10;
	ans2 += ans3;
	ans2 = ans2/10;
	ans1 += ans2;

	printf("%lld\n", ans1);
	
	return 0;
}