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++: /*#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <set>
#include <map>
#include <numeric>
*/
#include <bits/stdc++.h>
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define rrep()
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF (int)1e9
#define INFL 1e18
#define MOD 1000000007
#define pb push_back
#define MP make_pair
typedef long long int ll;
typedef std::pair<int,int> P;
int D=1;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

int gcd(int a,int b){
    if(a<b)swap(a,b);
    int k=a%b;
    while(k!=0){
        a=b;
        b=k;
        k=a%b;
    }
}

int lcm(ll a,ll b){
    return a*b/gcd(a,b);
}

int main(){
    char c;
    int v[10];
    while(cin>>v[0]>>c){
    double sum=0;
    rep(i,1,10){
        cin>>v[i]>>c;
        if(i)v[i]+=v[i-1];
    }
    
    double a,b;
    sum=v[9];
    cin>>a; cin>>c; cin>>b;
    sum*=a/(a+b);
    rep(i,0,10){
        if(sum<=v[i]){
            cout<<i+1<<endl;
            break; 
        }
    }
    }
    return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;

int main()
{
    int l[10] , v1 , v2 , n , m;
    double d , t;
    char ch;
    while(cin>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2){
        for(int i=0;i<10;i++){
            n+=l[i];
        }
        t=n/(v1+v2);
        d=v1*t;    //列車1の動く距離
        m=0;
        for(int i=0;i<10;i++){
            m+=l[i];
            if(m>=d){
                cout << i+1 << endl;
                break;
            }
        }
    }
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<map>
#include<numeric>

using namespace std ;

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl

#define rep(i,n) for(int i = 0; i < (n);++i)
#define repc(i,a,b) for(int i = (a);i <(b);++i)
#define repa(n,array) for(auto n :(array))

typedef long long ll ;
typedef vector<int> vi ;
typedef vector<ll> vl ;

constexpr int IMAX = ((1<<30)-1)*2+1 ;
constexpr int INF = 100000000;
double EPS = 1e-10 ;

template <typename T>
T out(vector < T > v)
{
  for(size_t i = 0; i < v.size(); i++)
  {
    debug(v[i]);
  }
  return 0 ;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  double v1,v2,l1 = 0,l2,ans;
  char c;
  vi v(10,0) ;
  while(cin >> v[0] >> c){
    l1 = 0;
    repc(i,1,10){
      cin >> v[i] >> c;
    }
    cin >> v1 >> c>>v2;
    l2 = accumulate(all(v),0) * 1000 ;
    v1 = v1/3600 * 1000;
    v2 = v2/3600 * 1000;
    while(l1<=l2){
      l1 += v1 ;
      l2 -= v2 ;
    }
    //debug(l1) ;
    //debug(l2) ;
    ans = 0 ;
    rep(i,10){
      ans += v[i] * 1000;
      //debug(ans) ;
      if((int)l1 == (int)ans){
        //debug(ans) ;
        ans = i + 1;
        break ;
      }
      else if(l1 < ans){
        //debug(ans) ;
        ans = i + 1 ;
        break;
      }
    }
    cout << ans << endl;
  }
  return 0;
}

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

#define SIZE 10


int main() {
	int l[SIZE] = { 0 }, v1, v2;
	double s;
	char t;
	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) {
		s = 0;
		for (int i = 0; i < SIZE; i++) {
			s += l[i];
		}
		s = s * v1 / (v1 + v2);

		for (int i = 0; i < 10; i++) {
			s -= l[i];
			if (s <= 0) {
				printf("%d\n", i + 1);
				break;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
int l[10];
int v[2];
double m;
double pos;
int ans;
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],&v[0],&v[1])!=EOF){
m=0;
for(int i=0;i<10;i++){
m+=l[i];
}
pos=(m*v[0])/double(v[0]+v[1]);
for(int i=0;i<10;i++){
pos-=l[i];
if(!(pos>0)){
ans=i+1;
break;
}
}
cout<<ans<<endl;
}
return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<map>

#define f first
#define s second
#define mp make_pair

#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()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

int main(){
  int l[10];
  while(~scanf("%d,",&l[0])){
    int v1, v2;
    int sum = l[0];
    REP(i,9){
      scanf("%d,",&l[i+1]);
      sum += l[i+1];
      l[i+1] += l[i];
    }
    scanf("%d,%d",&v1,&v2);
    double t = (double) sum / (v1 + v2);
    double pos = t * v1;
    REP(i,10){
      if(((double)l[i]) >= pos){
	printf("%d\n",i+1);
	break;
      }
    }
  }
  return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  double l[10] = {0},v[2] = {0};
  for(;;){
    if(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],&v[0],&v[1]) == EOF){break;}
    for(int i=1; i<10; i++){
      l[i]+=l[i-1];
    }
    double x = l[9]*v[0]/(v[0]+v[1]);
    for(int i=0; i<10; i++){
      if(l[i]+0.000001 >= x){cout <<i+1<<endl;break;}
    }
  }
  return 0;
}

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

int main()
{
  int l[10], v1, v2;
  int len;

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

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cmath>
#include <stack>
#include <map>
#include <sstream>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
using namespace std;

int main(){
    double l[10], v1, v2;
    string s;
    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)
        != EOF) {
        double sum = 0, per;
        REP(i, 10)
            sum += l[i];
        per = sum * (v1 / (v1 + v2));
        sum = 0;
        REP(i, 10){
            sum += l[i];
            if (sum >= per) {
                cout << i+1 << endl;
                break;
            }
        }
    }
}