import sys sys.setrecursionlimit(5*10**5) input = sys.stdin.readline from collections import defaultdict, deque, Counter from heapq import heappop, heappush from bisect import bisect_left, bisect_right from math import gcd w,z,b = map(str,input().split()) w = int(w) z = int(z) d = {"0.5":15, "0.8":18, "1.2":22, "1.6":26, "2.0":30} print((w+z)*d[b]//10)