#include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
using namespace std;
int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;}
string itos(int x){stringstream ss;ss<<x;return ss.str();}
const int INF=1111111111;
int main(){

int ta[10],v1,v2,sum=0;
double t,n1,n2;
while(true){
for(int i=0;i<10;i++){cin>>ta[i];cin.ignore();sum+=ta[i];}
char tmp;
if(!(cin>>v1>>tmp>>v2))break;
for(double i=0.0;;i+=0.01){
	n1=v1*i,n2=sum-v2*i;
	if(abs(n1-n2)<=0.01){t=i;break;}
}
sum=0;
for(int i=0;i<10;i++){;
	if(v1*t<(double)sum){cout<<i<<endl;break;}
	sum+=ta[i];
}
}
return 0;
}