#include<bits/stdc++.h>
using namespace std;
int main(){
int m[13];
int s=0;
int z=0;
for(int i=1;i<=12;i++){
cin>>m[i];
m[i]=300-m[i];
if(m[i]<0){
cout<<"-"<<m[i];
s=1;
break;
}else{
z+=m[i]/100;
m[i]=m[i]%100;
m[i+1]+=m[i];
}
}
if(s!=1){
cout<<z/1.2;
}
return 0;
}