#include <iostream>
#include <stdio.h>
#include<math.h>
using namespace std;

int main(void)
{
	double a[10] = {};
	double len2, len1;
	double v1, v2;

	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",
		&a[0], &a[1], &a[2], &a[3], &a[4], &a[5], &a[6], &a[7], &a[8], &a[9], &v1, &v2) != EOF)
	{
		int len = 0;
		int i;
		int distance;
		len2 = 0;
		len1 = 0;
		int count = 0;
		for (int i = 0; i < 10; i++) len2 += a[i];
		v1 /= 60; v2 /= 60;
		while (len2 >= len1)
		{
			len2 -= v2;
			len1 += v1;
			count++;
		}
		distance = len1 - fabs(len1 - len2);
		//cout << "distance =" << distance << endl;
		for (i = 0; i < 10; i++)
		{
			len += a[i];
		//	cout << "len = " << len << endl;
			if (i == 0)
			{
				if (len > distance && 0 <= distance)
				{
					i++;
					break;
				}
			}
		else if(len - a[i] <= distance && distance < len)
			{
				i++;
				break;
			}
		}
		cout << i << endl;
	}
	return 0;
}
