Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	a := make([]float64, 10)
	for scanner.Scan() {
		info := strings.Split(scanner.Text(), ",")
		for j := 0; j < 10; j++ {
			a[j], _ = strconv.ParseFloat(info[j], 64)
		}
		v1, _ := strconv.ParseFloat(info[10], 64)
		v2, _ := strconv.ParseFloat(info[11], 64)
		sum := 0.0
		for i := 0; i < 10; i++ {
			sum += a[i]
		}
		match := v1 * ((sum/(v1+v2)))
		if match == 0 {
			fmt.Println(1)
		} else {
			sum = 0
			for k := 0; k < 10; k++ {
				sum += a[k]
				if match <= sum {
					fmt.Println(k+1)
					break
				}
			}
		}
	}
}

C++: /* {{{ Shinobu kawaii */
/*
  ______   __        _                  __                 
.' ____ \ [  |      (_)                [  |                
| (___ \_| | |--.   __   _ .--.   .--.  | |.--.   __   _   
 _.____`.  | .-. | [  | [ `.-. |/ .'`\ \| '/'`\ \[  | | |  
| \____) | | | | |  | |  | | | || \__. ||  \__/ | | \_/ |, 
 \______.'[___]|__][___][___||__]'.__.'[__;.__.'  '.__.'_/ 

*/
/* }}} */

#include <bits/stdc++.h>
using namespace std;

// #define int long long

/* cpp template {{{ */

/* short */
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) (v).begin(), (v).end()

/* REPmacro */
#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n) for (int i = (a); i >= n; --i)
#define DEP(i, n) DEPS(i, n, 0)

/* typedef */
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef pair<int, int> pii;
typedef double D;

/* const */
const int INF = 999999999;
const double EPS = 1e-9;
const int dx[] = {0, 1, 0, -1, 1, -1, 1, -1}, dy[] = {1, 0, -1, 0, 1, -1, -1, 1};

/* func */
inline bool inside(int y, int x, int H, int W) {return y >= 0 && x >= 0 && y < H && x < W;}
inline int in() {int x; std::cin >> x; return x;}
template <typename T>
void print(std::vector<T>& v, char c = ' ') {
  REP(i, v.size()) {
    if (i != 0) std::cout << c;
    std::cout << v[i];
  }
  std::cout << '\n';
}
template <typename T>
void print(T x) {
  std::cout << x << '\n';
}

/* }}} */

bool input(vi& l, D& v1, D& v2) {
  char c;
  REP(i, 10) cin >> l[i] >> c;
  cin >> v1 >> c >> v2;
  return cin.eof();
}

signed main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  vi l(10); D v1, v2;

  while (!input(l, v1, v2)) {
    D b = accumulate(ALL(l), 0.0);
    D y = v1 * b / (v1 + v2);
    D sum = 0;
    REP(i, 10) {
      sum += l[i];
      if (y <= sum) {
        print(i + 1);
        break;
      }
    }
  }

  return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;
int main( void )
{
	string input;
	int l[10],v1,v2;
	while ( cin >> input )
	{
		replace( input.begin(), input.end(), ',', ' ' );
		istringstream is(input);
		for ( int i = 0; i < 10; i++ )
			is >> l[i];
		is >> v1 >> v2;

		int len = 0;
		for ( int i = 0; i < 10; i++ )
			len += l[i];

		double m = (double)v1 / v2;
		double c = (double)(len/2.0) * m;
		int co = (int)floor(c);

		int sum = 0;
		for ( int i = 0; i < 10; i++ )
		{
			sum += l[i];
			if ( sum > co )
			{
				cout << i+1 << endl;
				break;
			}
		}

	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>

using namespace std;

void solve()
{
	int l[10] ,v1 ,v2;
	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &l[0], &l[1], &l[2], &l[3], &l[4], &l[5], &l[6], &l[7], &l[8], &l[9], &v1, &v2) != EOF)
	{
		double posA = 0.0;
		double posB = 0.0;
		for(int i = 0; i < 10; ++i)
		{
			posB += l[i] * 1000;
		}
		int speedA = v1;
		int speedB = v2;
		while(posA < posB)
		{
			posA += speedA;
			posB -= speedB;
		}
		int dist = 0;
		for(int i = 0; i < 10; ++i)
		{
			dist += l[i] * 1000;
			if(posA <= dist)
			{
				cout << i + 1 << endl;
				break;
			}
		}
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

int main() {
	int v1,v2,sum,ret;
	vector<int> l(10, 0);
	while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n", &l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&l[10],&v1,&v2) != EOF) {
		sum = (l[1]+l[2]+l[3]+l[4]+l[5]+l[6]+l[7]+l[8]+l[9]+l[10])*(int)(v1/(v1+v2));
		for (int i=0; i<10; i++) {
			sum -= l[i];
			if (sum <= 0) {
				ret = i;
				break;
			}
		}
		cout << ret << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip> 
#include <complex> 
#include <string>
#include <vector> 
#include <list>
#include <deque> 
#include <stack> 
#include <queue> 
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm> 
#include <numeric> 
#include <typeinfo> 
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cmath>
#include <climits> 
#include <ctime>

using namespace std;

int rail[11],raill,railal,sp[2];
double  c1,c2;
int main(void){
	int a;
	while(~scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&rail[1],&rail[2],&rail[3],&rail[4],&rail[5],&rail[6],&rail[7],&rail[8],&rail[9],&rail[10],&sp[0],&sp[1])){
		raill=0;
		c1=(double)sp[0]/(sp[0]+sp[1]);
		for(a=1;a<=10;a++){
			railal+=rail[a];
		}
		for(a=1;a<=10;a++){
			if(c2>=c1){
				cout << a << endl;
				break;
			}
			raill+=rail[a];
			c2=(double)raill/railal;
			if(c2>c1){
				cout << a << endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <cstdio>
#include <algorithm>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  double l[10];
  double v1, v2;
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2)==12) {
    double dis = 0;
    REP(i,10)
      dis += l[i];
    double t = dis/(v1+v2);
    double x = v1 * t;
    int j = 0;
    for (int i=0; i<10; i++) {
      j+=l[i];
      if (j>=x) {
        cout << i+1 << endl;
        break;
      }
    }
  }
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

int main() {
	int v1,v2,sum,ret;
	vector<int> l(10, 0);
	while (true) {
		scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n", &l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&l[10],&v1,&v2);
		sum = l[1]+l[2]+l[3]+l[4]+l[5]+l[6]+l[7]+l[8]+l[9]+l[10];
		sum *= (int)(v1/(v1+v2));
		for (int i=0; i<10; i++) {
			sum -= l[i];
			if (sum <= 0) {
				ret = i;
				break;
			}
		}
		cout << ret << endl;
	}
	return 0;
}