import math a, b = map(int, input().split()) if b % 5 != 1: print(50 * a + math.floor(50 * a / (0.8 + 0.2 * b))) else: print(50 * a + math.floor(50 * a / (b // 5 + 1)))