#include<bits/stdc++.h>
using namespace std;
int main(){
int store=0,hand=0;
for(int i=1;i<=12;i++){
int cost;
cin>>cost;
int x=(300+hand-cost)/100*100;
if(300+hand-cost>=100){
store+=x;
hand+=300-cost-x;
}
else if(300+hand-cost>=0&&300+hand-cost<100) hand+=300-cost-x;
else{
cout<<-i;
return 0;
}
}
cout<<store*1.2;
}