#include<bits/stdc++.h>
using namespace std;
int main(){
int sum=0,old=0,a=0;
bool b=false;
for(int i = 1; i<=12; i++){
int m;
cin>> m;
m=300-m+old;
sum+=(m/100)*100;
old=m%100;
if(old<0){
b=true;
a=i;
}
}
if(b){
cout<< "-" << a;
}else{
cout<< old+sum*1.2;
}
return 0;
}