#include<bits/stdc++.h>
using namespace std;

#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL);
#define ll long long
#define vi vector< int > 
#define pii pair< int, int >
#define mii map< int , int > 
#define F(start,stop) for(int i=start; i<stop; i++)
#define FRev(start,stop) for(int i=start; i>=stop; i--)
#define MOD1 1000000007
#define MOD2 998244353

int main()
{

	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif

	IOS

	ll a;
	string s;

	cin >> a >> s;

	ll ans = (s[0] - '0')*a;
	ll rem = (s[2] - '0')*10 + (s[3]  - '0');
	ll prod = a * rem;

	ll an0s = prod / 100;

	ans += (ll)an0s;

	cout << ans << endl;
}