#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;

int main() {
	int ar[12];
	int dis=0;
	int speed;
	int x=0;
	while (1) {
		for (int i = 0; i < 12; i++) {
			scanf("%d,", &ar[i]);
		}
		if (ar[0] == EOF) {	break;}
		for (int i = 0; i < 10; i++) { dis += ar[i]; }
		int speed = ar[10] + ar[11];
		int a = (dis + speed - 1) / speed;
		while (1) {
			if (a - ar[x] < 0) { break; }
			a -= ar[x];
			x++;
		}
		cout << x << endl;
	}
	return 0;
}