a = int(input())
b = int(input())
c = int(input())
d = int(input())

if a == 1:
 c1 = 461
elif a == 2:
  c1 = 431
elif a == 3:
  c1 = 420
elif a == 4: 
  c1 = 0

if b == 1:
  c2 = 100
elif b == 2:
  c2 = 57
elif b == 3: 
  c2 = 70
elif b == 4:
  c2 = 0

if c == 1: 
  c3 = 130
elif c == 2: 
  c3 = 160
elif c == 3:  
  c3 = 118
elif c == 4:  
  c3 = 0

if d == 1:  
  c4 = 167
elif d == 2: 
  c4 = 266
elif d == 3: 
  c4 = 75
elif d == 4:
  c4 = 0

txt = "Your total Calorie count is {}."
totalcalories = c1 + c2 + c3 + c4
print(txt.format(totalcalories))
