#include<iostream> using namespace std; int main(){ int m[13]; while(cin>>m[1]){ int sum=0,end=300,mon=0; end-=m[1]; if(end<0) mon=-1; else if(end>=100) while(end>=100) {sum+=100; end-=100;} for(int i=2; i<=12; i++){ cin>>m[i]; if(mon!=0) continue; end+=300; end-=m[i]; if(end<0) mon=-i; else if(end>=100) while(end>=100) {sum+=100; end-=100;} } if(mon!=0) cout<<mon<<endl; else cout<<end+sum*1.2<<endl; cout<<endl; } }