#!/usr/bin/env python3
import sys

def solve(A: int, B: float):
    # b_i = int((B - int(B))*100)
    # print(b_i)
    # b = int((A*b_i)//100)
    # a = A*int(B) + b
    # # print(b)
    # print(a)

    print(A*int(B*1000)//1000)

    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = float(next(tokens))  # type: float
    solve(A, B)

if __name__ == '__main__':
    main()
