#!/usr/bin/python2
# -*- coding: utf-8 -*-
# †
from decimal import Decimal

c, d = map(Decimal, raw_input().split())
if c < d*2/5:
    d = c*5/2
elif d*3 < c:
    c = d*3

res = 1000 * (c*6 + d*34) / 13
print '{:.15f}'.format(res)