mother = 0
now = 0
think = []
a = True
for i in range(12):
think.append(int(input()))
for x in think:
if(x <= 300):
now += (300 - x + now)%100
mother += (300 - x + now) - (300 - x + now)%100
else:
now -= x - 300
if(now<0):
print(-(think.index(x) + 1))
a = False
break
if(now >= 100):
now -= 100
if(a):
now += mother + mother / 5
print(now)
我寻思这也没问题啊!