using namespace std;
int a,m,l,n;
int b[13];
int main()
{
for (int i=1;i<=12;i++)
{cin>>b[i];}
for(int month=1;month<=12;month++)
{m+=300;
if(m-b[month]>0)//减去预算如果能剩下钱
{int p=m-b[month];//除去预算后的钱
if(p/100!=0)//如果能存钱
{l+=(p/100)*100;
m=m-b[month]-(p/100)*100;
}
else if(p/100==0)
{m=m-b[month];
}
}
else if(m-b[month]<0)//减去预算后钱不够
{cout<<0-month;
n++;
break;}
}
if(n==0)
{float z=1.2;
cout<<z*l+m;}
return 0;
}