#include<bits/stdc++.h>
#define LL long long
#define fi first
#define se second
#define mk make_pair
#define PII pair<int, int>
#define PLI pair<LL, int>
#define ull unsigned long long
using namespace std;

const int N = 5e5 + 7;
const int inf = 0x3f3f3f3f;
const LL INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9+7;
const double eps = 1e-8;

char s[N];
int n;
double sum[N], ssum[N];
bool check(char c) {
    if(c == 'I' || c == 'E' || c == 'A' || c == 'O' || c == 'U' || c == 'Y') return true;
    return false;
}

double cal(int i) {
    return ssum[n] - ssum[n-i] - ssum[i-1];
}

int main() {
    for(int i = 1; i < N; i++) {
        sum[i] = sum[i - 1] + 1.0 / i;
        ssum[i] = ssum[i-1] + sum[i];
    }
    scanf("%s", s + 1);
    n = strlen(s + 1);
    double ans = 0;
    for(int i = 1; i <= n; i++) {
        if(check(s[i])) ans += cal(i);
    }
    printf("%.12f\n", ans);
	return 0;
}

/*
*/


#include <bits/stdc++.h>
using namespace std;
#define Int long long int
#define F first
#define S second

const int MAX = 5e5 + 7;
int n;
string s;
double pr[MAX], sf[MAX], prM[MAX], sfM[MAX], ans;

bool isVowel(char a){
	// char V[6] = {'I', 'E', 'A', 'O', 'U', 'Y'};
	// for(int i = 0 ; i < 6 ; i++){
	// 	if(V[i] == a)	return 1;
	// }
	// return 0;
	return (a == 'I' || a == 'E' || a == 'A' || a == 'O' || a == 'U' || a == 'Y');
}

int main(){
	std::ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cout.precision(10);
	cout << fixed;

	cin >> s;
	ans = 0;
	n = s.length();
	s = " " + s;
	pr[0] = 0, sf[n + 1] = 0;
	for(int i = 1 ; i <= n ; i++){
		pr[i] = pr[i - 1] + (1.0 / i);
		int b = n - i + 1;
		sf[b] = sf[b + 1] + (1.0 / b);
	}
	prM[0] = sfM[n + 1] = 0;
	for(int i = 1 ; i <= n ; i++){
		prM[i] = prM[i - 1] + 1.0;
		int b = n - i + 1;
		sfM[b] = sfM[b + 1] + ((double)i) / b;
	}
	int m = (n / 2) + (n % 2);
	// cout << sfM[4] << " ";
	for(int I = 1 ; I <= n ; I++){
		if(isVowel(s[I])){
			int i = I;
			if(i > m)	i = m - (i - m) + !(n & 1);
			ans += prM[i-1] + i * (pr[n - i + 1] - pr[i - 1]) + sfM[n - i + 2];
			// cout << ans << " ";
		}
	}
	cout << ans;

	return 0;
}


#include<bits/stdc++.h>
#define PI acos(-1)
#define fast() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long int
#define ull unsigned long long int
#define mem(a,b) memset(a,b,sizeof(a))
#define MX 500005
//#define MXX 20000005
//#define  s second
//#define f first
#define mod 1000000007
#define inf 2e9
#define eps 1e-15
//int ex[]={1,-1,0,0,1,-1,1,-1};
//int wye[]={0,0,1,-1,1,-1,-1,1};
using namespace std;
int n,tmp;
char s[MX];
double tot,ans,t1,t2,t3,t4;
int check(char i){
	if(s[i]=='A' || s[i]=='E' || s[i]=='I' || s[i]=='O' || s[i]=='U' || s[i]=='Y') return 1;
	return 0;
}
int main(){
	fast();
	scanf("%s",s);
	n=strlen(s);
	tmp=n/2;
	if(n%2)  tmp++;

	tot=0.0,t1=1.0;
	for(int i=1;i<=tmp;i++){
		tot+=(1.0/t1);
		t1+=1.0;
	}

	t1=1.0;
	for(int i=0;i<tmp;i++){
		t2=i+t1*tot;

		if(i==tmp-1 && n%2) ans+=t2*(check(i)*1.0);
		else {
			ans+=t2*(check(i)*1.0);
			ans+=t2*(check(n-i-1));
		}
		tot-=(1.0/t1);
		t1+=1.0;
	}
	//cout<<ans<<endl;
	tot=0,t1=tmp+1.0;
	for(int i=tmp+1;i<=n;i++){
		tot+=(1.0/t1);
		t1+=1.0;
	}

	if(n%2) tmp--;
	t1=n,t3=1.0,t4=0.0;
	for(int i=0;i<tmp;i++){
		t2=tot*t3+t4;

		ans+=t2*(check(i)*1.0);
		ans+=t2*(check(n-i-1)*1.0);
		t4+=t3/t1;
		tot-=(1.0/t1);
		t1-=1.0;
		t3+=1.0;
	}
	if(n%2 && tmp) ans+=t2*(check(tmp)*1.0);

	printf("%.10lf\n",ans);
	return 0;
}


#include<bits/stdc++.h>
#define PI acos(-1)
#define fast() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long int
#define ull unsigned long long int
#define mem(a,b) memset(a,b,sizeof(a))
#define MX 500005
//#define MXX 20000005
//#define  s second
//#define f first
#define mod 1000000007
#define inf 2e9
#define eps 1e-15
//int ex[]={1,-1,0,0,1,-1,1,-1};
//int wye[]={0,0,1,-1,1,-1,-1,1};
using namespace std;
int n,tmp;
char s[MX];
double tot,ans,t1,t2,t3,t4;
int check(int i){
	if(s[i]=='A' || s[i]=='E' || s[i]=='I' || s[i]=='O' || s[i]=='U' || s[i]=='Y') return 1;
	return 0;
}
int main(){
	fast();
	scanf("%s",s);
	n=strlen(s);
	tmp=n/2;
	if(n%2)  tmp++;

	tot=0.0,t1=1.0;
	for(int i=1;i<=tmp;i++){
		tot+=(1.0/t1);
		t1+=1.0;
	}

	t1=1.0;
	for(int i=0;i<tmp;i++){
		t2=i+t1*tot;

		if(i==tmp-1 && n%2) ans+=t2*(check(i)*1.0);
		else {
			ans+=t2*(check(i)*1.0);
			ans+=t2*(check(n-i-1));
		}
		tot-=(1.0/t1);
		t1+=1.0;
	}
	//cout<<ans<<endl;
	tot=0,t1=tmp+1.0;
	for(int i=tmp+1;i<=n;i++){
		tot+=(1.0/t1);
		t1+=1.0;
	}

	if(n%2) tmp--;
	t1=n,t3=1.0,t4=0.0;
	for(int i=0;i<tmp;i++){
		t2=tot*t3+t4;

		ans+=t2*(check(i)*1.0);
		ans+=t2*(check(n-i-1)*1.0);
		t4+=t3/t1;
		tot-=(1.0/t1);
		t1-=1.0;
		t3+=1.0;
	}
	if(n%2 && tmp) ans+=t2*(check(tmp)*1.0);

	printf("%.10lf\n",ans);
	return 0;
}


#include <iostream>
#include <cstring>
#include <string>
using namespace std;
const int M = 5e5 + 10;
char s[M];
double sum[M] , tot[M];
int main() {
    sum[0] = 0.0;
    for(int i = 1 ; i < M ; i++) {
        sum[i] = 1.0 / i + sum[i - 1];
    }
    tot[0] = 0.0;
    for(int i = 1 ; i < M ; i++) {
        tot[i] = sum[i] + tot[i - 1];
    }
    scanf("%s" , s + 1);
    int len = strlen(s + 1);
    double ans = 0;
    for(int i = 1 ; i <= len ; i++) {
        if(s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' || s[i] == 'U' || s[i] == 'Y') {
            ans += sum[i];
            ans += tot[len] - tot[len - i] - (tot[i]);
        }
    }
    printf("%.7lf\n" , ans);
    return 0;
}


#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
unsigned long long arr[500008];
unsigned long long sum[500008];
char s[500008];
string temp;
int main()
{
    long double ans=0;
    scanf("%100s", s);
    temp=s;
    int n=temp.size();
        arr[0]=0;
        sum[0]=0;
        if(s[0]=='I' || s[0]=='E' || s[0]=='A' || s[0]=='O' || s[0]=='U' || s[0]=='Y')
            {arr[0]=1;
            sum[0]=1;}
    for(int i=1;i<n;i++){
        int cnt=1;
        arr[i]=0;
        sum[i]=0;
        if(s[i]=='I' || s[i]=='E' || s[i]=='A' || s[i]=='O' || s[i]=='U' || s[i]=='Y')
            arr[i]=1;
        arr[i]+=arr[i-1];
        sum[i]=arr[i];
       for(int j=i;j>0;j--){
      //  cout<<i-j<<' '<<sum[i-j]<<endl;
        //cout<<arr[i]<<' '<<arr[i-cnt]<<endl;
        sum[i-j]+=arr[i]-arr[i-(cnt++)];
       // cout<<sum[i-j]<<endl;

    }}

    for(int i=0;i<n;i++){
          ans+=sum[i]/(double)(i+1);
        }
    cout<<fixed<<setprecision(6)<<ans<<endl;

    return 0;
}


#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
int arr[500008];
int sum[500008];
int main()
{   string s;
    double ans=0;
    cin>>s;
    int n=s.size();
        arr[0]=0;
        sum[0]=0;
        if(s[0]=='I' || s[0]=='E' || s[0]=='A' || s[0]=='O' || s[0]=='U' || s[0]=='Y')
            {arr[0]=1;
            sum[0]=1;}
    for(int i=1;i<n;i++){
        int cnt=1;
        arr[i]=0;
        sum[i]=0;
        if(s[i]=='I' || s[i]=='E' || s[i]=='A' || s[i]=='O' || s[i]=='U' || s[i]=='Y')
            arr[i]=1;
        arr[i]+=arr[i-1];
        sum[i]=arr[i];
       for(int j=i;j>0;j--){
      //  cout<<i-j<<' '<<sum[i-j]<<endl;
        //cout<<arr[i]<<' '<<arr[i-cnt]<<endl;
        sum[i-j]+=arr[i]-arr[i-(cnt++)];
       // cout<<sum[i-j]<<endl;

    }}

    for(int i=0;i<n;i++){
          ans+=(double)sum[i]/(double)(i+1);
        }
    cout<<fixed<<setprecision(6)<<ans<<endl;

    return 0;
}


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

int main()
{   int arr[500008];
    int sum[508];
    string s;
    double ans=0;
    cin>>s;
    int n=s.size();
        arr[0]=0;
        sum[0]=0;
        if(s[0]=='I' || s[0]=='E' || s[0]=='A' || s[0]=='O' || s[0]=='U' || s[0]=='Y')
            {arr[0]=1;
            sum[0]=1;}
    for(int i=1;i<n;i++){
        int cnt=1;
        arr[i]=0;
        sum[i]=0;
        if(s[i]=='I' || s[i]=='E' || s[i]=='A' || s[i]=='O' || s[i]=='U' || s[i]=='Y')
            arr[i]=1;
        arr[i]+=arr[i-1];
        sum[i]=arr[i];
       for(int j=i;j>0;j--){
      //  cout<<i-j<<' '<<sum[i-j]<<endl;
        //cout<<arr[i]<<' '<<arr[i-cnt]<<endl;
        sum[i-j]+=arr[i]-arr[i-(cnt++)];
       // cout<<sum[i-j]<<endl;

    }}

    for(int i=0;i<n;i++){
          ans+=(double)sum[i]/(double)(i+1);
        }
    cout<<fixed<<setprecision(6)<<ans<<endl;

    return 0;
}


#include <iostream>
#include <cstdio>
using namespace std;

string s;
long long a[500005], b, sum, l;
double ans;

int main() {
    int i, j;
    cin >> s;
    l = s.size();
	for (i = 0; i < l; i++) {
        if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' || s[i] == 'U' || s[i] == 'Y') b++;
		a[i + 1] = b;
	}
	for(int i=0;i<l;i++)
        //cout<<a[i]<<endl;
	for (i = 0, j = l; i < l; i++, j--) {
	    sum += a[j] - a[i];
        //cout<<sum<<endl;
	    ans += 1.0 * sum / (i + 1);
	}
	printf("%.7lf", ans);
return 0;
}


#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
#include <stdio.h>
#include <cstdio>
using namespace std;
unsigned long long arr[500008];
unsigned long long sum[500008];
char s[500008];
string temp;
int main()
{
    double ans=0;
    scanf("%100s", s);
    temp=s;
    int n=temp.size();
        arr[0]=0;
        sum[0]=0;
        if(s[0]=='I' || s[0]=='E' || s[0]=='A' || s[0]=='O' || s[0]=='U' || s[0]=='Y')
            {arr[0]=1;
            sum[0]=1;}
    for(int i=1;i<n;i++){
        int cnt=1;
        arr[i]=0;
        sum[i]=0;
        if(s[i]=='I' || s[i]=='E' || s[i]=='A' || s[i]=='O' || s[i]=='U' || s[i]=='Y')
            arr[i]=1;
        arr[i]+=arr[i-1];
        sum[i]=arr[i];
       for(int j=i;j>0;j--){
      //  cout<<i-j<<' '<<sum[i-j]<<endl;
        //cout<<arr[i]<<' '<<arr[i-cnt]<<endl;
        sum[i-j]+=arr[i]-arr[i-(cnt++)];
       // cout<<sum[i-j]<<endl;
       }}
    for(int i=0;i<n;i++){
          ans+= 1.0*sum[i]/(i+1);
        }
    printf("%.7lf", ans);

    return 0;
}


#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
#include <stdio.h>
#include <cstdio>
using namespace std;
int arr[500008];
long long sum[500008];
char s[500008];
string temp;
int main()
{
    double ans=0;
    scanf("%100s", s);
    temp=s;
    int n=temp.size(),b=0;
        arr[0]=0;
        sum[0]=0;
        if(s[0]=='I' || s[0]=='E' || s[0]=='A' || s[0]=='O' || s[0]=='U' || s[0]=='Y')
            {b=1;
                arr[0]=1;
            sum[0]=1;}
    for(int i=1;i<n;i++){
        int cnt=1;
        arr[i]=0;
        sum[i]=0;
        if(s[i]=='I' || s[i]=='E' || s[i]=='A' || s[i]=='O' || s[i]=='U' || s[i]=='Y')
            b++;
        arr[i]=b;
        sum[i]=arr[i];
       for(int j=i;j>0;j--){
      //  cout<<i-j<<' '<<sum[i-j]<<endl;
        //cout<<arr[i]<<' '<<arr[i-cnt]<<endl;
        sum[i-j]+=arr[i]-arr[i-(cnt++)];
       // cout<<sum[i-j]<<endl;
       }}
    //for(int i=0;i<n;i++)
      //  cout<<arr[i]<<' '<<sum[i]<<endl;
    for(int i=0;i<n;i++){
          ans+= 1.0*sum[i]/(i+1);
        }
    printf("%.7lf", ans);

    return 0;
}


#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
int arr[500008];
int sum[500008];
char s[500008];
string temp;
int main()
{
    double ans=0;
    scanf("%100s", s);
    temp=s;
    int n=temp.size();
        arr[0]=0;
        sum[0]=0;
        if(s[0]=='I' || s[0]=='E' || s[0]=='A' || s[0]=='O' || s[0]=='U' || s[0]=='Y')
            {arr[0]=1;
            sum[0]=1;}
    for(int i=1;i<n;i++){
        int cnt=1;
        arr[i]=0;
        sum[i]=0;
        if(s[i]=='I' || s[i]=='E' || s[i]=='A' || s[i]=='O' || s[i]=='U' || s[i]=='Y')
            arr[i]=1;
        arr[i]+=arr[i-1];
        sum[i]=arr[i];
       for(int j=i;j>0;j--){
      //  cout<<i-j<<' '<<sum[i-j]<<endl;
        //cout<<arr[i]<<' '<<arr[i-cnt]<<endl;
        sum[i-j]+=arr[i]-arr[i-(cnt++)];
       // cout<<sum[i-j]<<endl;

    }}

    for(int i=0;i<n;i++){
          ans+=(double)sum[i]/(double)(i+1);
        }
    cout<<fixed<<setprecision(6)<<ans<<endl;

    return 0;
}


#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
#include <stdio.h>
#include <cstdio>
using namespace std;
int arr[500008];
long long sum[500008];
string s;
int main()
{
    double ans=0;
    cin>>s;
    int n=s.size(),b=0;
        arr[0]=0;
        sum[0]=0;
        if(s[0]=='I' || s[0]=='E' || s[0]=='A' || s[0]=='O' || s[0]=='U' || s[0]=='Y')
            {b=1;
                arr[0]=1;
            sum[0]=1;}
    for(int i=1;i<n;i++){
        int cnt=1;
        arr[i]=0;
        sum[i]=0;
        if(s[i]=='I' || s[i]=='E' || s[i]=='A' || s[i]=='O' || s[i]=='U' || s[i]=='Y')
            b++;
        arr[i]=b;
        sum[i]=arr[i];
       for(int j=i;j>0;j--){
      //  cout<<i-j<<' '<<sum[i-j]<<endl;
        //cout<<arr[i]<<' '<<arr[i-cnt]<<endl;
        sum[i-j]+=arr[i]-arr[i-(cnt++)];
       // cout<<sum[i-j]<<endl;
       }}
    //for(int i=0;i<n;i++)
      //  cout<<arr[i]<<' '<<sum[i]<<endl;
    for(int i=0;i<n;i++){
          ans+= 1.0*sum[i]/(i+1);
        }
    printf("%.7lf", ans);

    return 0;
}


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

int main()
{   int arr[500008];
    string s;
    double ans;
    cin>>s;
    int n=s.size(),temp;
        arr[0]=0;
        if(s[0]=='I' || s[0]=='E' || s[0]=='A' || s[0]=='O' || s[0]=='U' || s[0]=='Y')
            arr[0]=1;
    for(int i=1;i<n;i++){
        arr[i]=0;
        if(s[i]=='I' || s[i]=='E' || s[i]=='A' || s[i]=='O' || s[i]=='U' || s[i]=='Y')
            arr[i]=1;
        arr[i]+=arr[i-1];
    }
    ans=(double)arr[n-1]/(double)n;
    //cout<<ans<<endl;
    for(int i=0;i<n-1;i++){
        temp=arr[i];
      //  cout<<temp<<endl;
        for(int j=i+1;j<n;j++){
        //    cout<<j<<' '<<arr[j]<<endl;
          //   cout<<j-(i+1)<<' '<<arr[j-(i+1)]<<endl;
           temp+=(arr[j]-arr[j-(i+1)]);
          // cout<<temp<<endl;
        }
       //cout<<temp<<' '<<i+1<<endl;
        ans+=(double)temp/(i+1);
        }

    cout<<fixed<<setprecision(6)<<ans<<endl;

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
char str[505000];
char t[7]="IEAOUY";
int g[505000];
double s[505000];
double s2[505000];
int n;

double cal(int p){
	double ans=0;
	p=min(p, n-p+1);
	ans+=p;
	ans+=1.0*p*(s[n-p+1]-s[p]);
	ans+=s2[p-1];
	return ans;
}

int main()
{
	cin>>str;
	n=strlen(str);
	s[0]=s2[0]=0;
	for(int i=1;i<=n;i++){
		s[i]=s[i-1]+1.0/i;
		s2[i]=s2[i-1]+1.0*i/(n-i+1);
	}
	double ans=0;
	for(int i=0;i<n;i++){
		bool ok=false;
		for(int j=0;j<6;j++)if(t[j]==str[i])ok=true;
		if(ok)ans+=cal(i+1);
	}
	printf("%.8f\n", ans);
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int n,i,sum,Sp[500005],l;
char S[500005];
double rez;

int voc(char c)
{
    if(c=='A')
        return 1;
    if(c=='E')
        return 1;
    if(c=='I')
        return 1;
    if(c=='O')
        return 1;
    if(c=='U')
        return 1;
    if(c=='Y')
        return 1;
    return 0;
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
    cin>>(S+1);
    n=strlen(S+1);
	for(i=1; i<=n; i++)
        Sp[i]=voc(S[i])+Sp[i-1];
    sum=0;
    for(l=1; l<=n; l++)
    {
        if(n-l+1<l)
            break;
        sum=sum+Sp[n-l+1]-Sp[l-1];
        rez=rez+(1.0*sum/l);
    }
    for(; l<=n; l++)
    {
        sum=sum-(Sp[l-1]-Sp[n-l+1]);
        rez=rez+(1.0*sum/l);
    }
	cout<<setprecision(6)<<fixed<<rez<<"\n";
    return 0;
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int n,i,Sp[500005],l;
char S[500005];
double rez;
long long sum;

int voc(char c)
{
    if(c=='A')
        return 1;
    if(c=='E')
        return 1;
    if(c=='I')
        return 1;
    if(c=='O')
        return 1;
    if(c=='U')
        return 1;
    if(c=='Y')
        return 1;
    return 0;
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
    cin>>(S+1);
    n=strlen(S+1);
	for(i=1; i<=n; i++)
        Sp[i]=voc(S[i])+Sp[i-1];
    sum=0;
    for(l=1; l<=n; l++)
    {
        if(n-l+1<l)
            break;
        sum=sum+Sp[n-l+1]-Sp[l-1];
        rez=rez+(1.0*sum/l);
    }
    for(; l<=n; l++)
    {
        sum=sum-(Sp[l-1]-Sp[n-l+1]);
        rez=rez+(1.0*sum/l);
    }
	cout<<setprecision(6)<<fixed<<rez<<"\n";
    return 0;
}


///Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>
using namespace std;
long long int pre[500009],abr_pre[500009];long double ses=0,x;
bool chk(char ch){return (ch=='A' || ch=='E' || ch=='I' || ch=='O' || ch=='U' || ch=='Y');}
main(){string s;cin>>s;int n=s.size();s="#"+s;
    for(int i=1;i<=n;i++)pre[i]=pre[i-1]+chk(s[i]),abr_pre[i]=abr_pre[i-1]+pre[i];
    for(int i=1;i<=n;i++){x=abr_pre[n]-abr_pre[i-1]-abr_pre[n-i];ses+=((double)x/(double)i);}
    cout<<fixed<<setprecision(12)<<ses;}


///Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>
using namespace std;
int pre[500009],abr_pre[500009];long double ses=0,x;
bool chk(char ch){if(ch=='A' || ch=='E' || ch=='I' || ch=='O' || ch=='U' || ch=='Y')return true;return false;}
main(){string s;cin>>s;int n=s.size();s="#"+s;
    for(int i=1;i<=n;i++)pre[i]=pre[i-1]+chk(s[i]),abr_pre[i]=abr_pre[i-1]+pre[i];
    for(int i=1;i<=n;i++){x=abr_pre[n]-abr_pre[i-1]-abr_pre[n-i];ses+=((double)x/(double)i);}
    cout<<fixed<<setprecision(12)<<ses;}


/* string coder = "Balajiganapathi S"; // Never give up!  */

//#define LOCAL
#ifdef LOCAL
#   define TRACE
#   define TEST
#else
#   define NDEBUG
//#   define FAST
#endif

#include<bits/stdc++.h>

using namespace std;

/* aliases */
using vi  = vector<int>;
using pi  = pair<int, int>;
using ll  = long long int;

/* shortcut macros */
#define mp              make_pair
#define fi              first
#define se              second
#define mt              make_tuple
#define gt(t, i)        get<i>(t)
#define all(x)          (x).begin(), (x).end()
#define ini(a, v)       memset(a, v, sizeof(a))
#define rep(i, s, n)    for(int i = (s), _##i = (n); i <= _##i; ++i)
#define re(i, s, n)     rep(i, (s), (n) - 1)
#define fo(i, n)        re(i, 0, n)
#define si(x)           (int((x).size()))
#define is1(mask,i)     (((mask) >> i) & 1)

/* trace macro */
#ifdef TRACE
#   define trace(v...)  {cerr << __func__ << ":" << __LINE__ << ": " ;_dt(#v, v);}
#else
#   define trace(...)
#endif

#ifdef TRACE
pi _gp(string s) {
    pi r(0, si(s) - 1);
    int p = 0, s1 = 0, s2 = 0, start = 1;
    fo(i, si(s)) {
        int x = (s1 | s2);
        if(s[i] == ' ' && start) {
            ++r.fi;
        } else {
            start = 0;
            if(s[i] == ',' && !p && !x) {
                r.se = i - 1;
                return r;
            }
            if(x && s[i] == '\\') ++i;
            else if(!x && s[i] == '(') ++p;
            else if(!x && s[i] == ')') --p;
            else if(!s2 && s[i] == '\'') s1 ^= 1;
            else if(!s1 && s[i] == '"') s2 ^= 1;
        }
    }
    return r;
}

template<typename H> void _dt(string u, H&& v) {
    pi p = _gp(u);
    cerr << u.substr(p.fi, p.se - p.fi + 1) << " = " << forward<H>(v) << " |" << endl;
}

template<typename H, typename ...T> void _dt(string u, H&& v, T&&... r) {
    pi p = _gp(u);
    cerr << u.substr(p.fi, p.se - p.fi + 1) << " = " << forward<H>(v) << " | ";
    _dt(u.substr(p.se + 2), forward<T>(r)...);
}

template<typename T>
ostream &operator <<(ostream &o, vector<T> v) { // print a vector
    o << "[";
    fo(i, si(v) - 1) o << v[i] << ", ";
    if(si(v)) o << v.back();
    o << "]";
    return o;
}

template<typename T1, typename T2>
ostream &operator <<(ostream &o, map<T1, T2> m) { // print a map
    o << "{";
    for(auto &p: m) {
        o << " (" << p.fi << " -> " << p.se << ")";
    }
    o << " }";
    return o;
}

template<typename T>
ostream &operator <<(ostream &o, set<T> s) { // print a set
    o << "{";
    bool first = true;
    for(auto &entry: s) {
        if(!first) o << ", ";

        o << entry;
        first = false;
    }
    o << "}";
    return o;
}

template <size_t n, typename... T>
typename enable_if<(n >= sizeof...(T))>::type
    print_tuple(ostream&, const tuple<T...>&) {}

template <size_t n, typename... T>
typename enable_if<(n < sizeof...(T))>::type
    print_tuple(ostream& os, const tuple<T...>& tup) {
    if (n != 0)
        os << ", ";
    os << get<n>(tup);
    print_tuple<n+1>(os, tup);
}

template <typename... T>
ostream& operator<<(ostream& os, const tuple<T...>& tup) { // print a tuple
    os << "("; print_tuple<0>(os, tup); return os << ")"; } template <typename T1, typename T2>
ostream& operator<<(ostream& os, const pair<T1, T2>& p) { // print a pair
    return os << "(" << p.fi << ", " << p.se << ")";
}
#endif

/* util functions */
template<typename T1, typename T2, typename T3>
T1 modpow(T1 _a, T2 p, T3 mod) {
    assert(p >= 0);
    ll ret = 1, a = _a;

#ifndef FAST
    if(a < 0) {
        a %= mod;
        a += mod;
    }

    if(a >= mod) {
        a %= mod;
    }
#endif

    for(; p > 0; p /= 2) {
        if(p & 1) ret = ret * a % mod;
        a = a * a % mod;
    }

    return ret;
}

#define x1 _asdfzx1
#define y1 _ysfdzy1

/* constants */
constexpr int dx[] = {-1, 0, 1, 0, 1, 1, -1, -1};
constexpr int dy[] = {0, -1, 0, 1, 1, -1, 1, -1};
constexpr auto PI  = 3.14159265358979323846L;
constexpr auto oo  = numeric_limits<int>::max() / 2 - 2;
constexpr auto eps = 1e-6;
constexpr auto mod = 1000000007;

/* code */
constexpr int mx_n = 500005;
ll v[mx_n], cv[mx_n], ccv[mx_n];
int n;

bool isvowel(char c) {
    return c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U' || c == 'Y';
}

double get(int a, int b) {
    return ccv[b] - ccv[a-1];
}

int main() {
    string s;
    cin >> s;
    n = si(s);
    fo(i, n) if(isvowel(s[i])) {
        v[i+1] = 1;
    }

    partial_sum(v, v + n + 1, cv);
    partial_sum(cv, cv + n + 1, ccv);

    double ans = 0;
    rep(s, 1, n) {
        ll cur = 0;
        cur = get(s, n) - get(0, n - s);
        ans += 1.0 * cur / s;
    }

    cout << setprecision(10) << fixed << ans << endl;

	return 0;
}


// Math = ♥

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

#define ll long long
#define ld long double
typedef pair<ll, ll> ii;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<vii> vvii;
#define pq priority_queue
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define all(c) (c).begin(), (c).end()
#define sz(c) ((ll)c.size())
#define ordered_set                            \
    tree<ll, null_type, less<ll>, rb_tree_tag, \
         tree_order_statistics_node_update>

int main(void) {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    string str;
    cin >> str;

    ll n = sz(str);

    vi arr(n);
    ld sum = 0;
    for (int i = 0; i < n; i++) {
        if (str[i] == 'A' || str[i] == 'E' || str[i] == 'I' || str[i] == 'O' ||
            str[i] == 'U' || str[i] == 'Y') {
            arr[i] = 1;
        } else {
            arr[i] = 0;
        }

        sum += arr[i];
    }

    ld curr = 0, curr2 = 0;

    ld sum2 = sum;
    ld ans = 0;
    for (int i = 1; i <= n; i++) {
        curr += arr[i - 1];
        curr2 += arr[n - i];
        ans += sum2 / ((ld)(i));
        sum2 += sum - curr - curr2;
    }

    cout << fixed << setprecision(6) << ans << "\n";
}


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

bool isVowel(char c){
    return (c=='A' || c=='E' || c=='I' || c=='O' || c=='U' || c=='Y');
}

string s;

const int maxn = 500005;
long double sum[maxn], score[maxn];

long double getSum(int i, int j){
    return sum[j] - sum[i-1];
}
int main() {

    ios_base::sync_with_stdio(false);
    cin.tie(0);

    for(int i = 1; i<maxn; i++) {
        sum[i] = 1.0/i;
        sum[i] += sum[i-1];
    }

    long double ss = getSum(1, 10);

    cin>>s;

    int lo = 1, hi = s.size(), plo = 0, phi = s.size()-1;

    while(plo<=phi){
        score[plo] = getSum(lo, hi);
        score[plo] += score[plo-1];
        score[phi] = score[plo];
        plo++;
        phi--;
        lo++;
        hi--;

    }

    long double ret = 0;

    for(int i = 0; i<s.size(); i++){
        if(isVowel(s[i])) ret += score[i];
    }

    cout<<fixed<<setprecision(10)<<ret<<endl;

    return 0;
}


#include <iostream>
#include <vector>

bool isVowel(char c){return (c == 'A') || (c == 'E') || (c == 'I') || (c == 'O') || (c == 'U') || (c == 'Y');}

int main(){

    std::ios_base::sync_with_stdio(false);
    std::string s; getline(std::cin, s);
    std::vector<bool> v(s.size() + 1, 0);
    std::vector<long> cm(s.size() + 1, 0);
    for(long p = 1; p < v.size(); p++){
        v[p] = isVowel(s[p - 1]);
        cm[p] = (p > 0 ? cm[p - 1] : 0) + v[p];
    }

    double total(0), sum(0);

    for(long len = 1; len <= s.size(); len++){
        sum += (cm[s.size()- len + 1] - cm[len - 1]);
        total += sum / len;
    }

    printf("%.8lf\n",total);

    return 0;
}


#include <iostream>
#include <vector>

bool isVowel(char c){return (c == 'A') || (c == 'E') || (c == 'I') || (c == 'O') || (c == 'U') || (c == 'Y');}

int main(){

    std::ios_base::sync_with_stdio(false);
    std::string s; getline(std::cin, s);
    std::vector<bool> v(s.size() + 1, 0);
    std::vector<long> cm(s.size() + 1, 0);
    for(long p = 1; p < v.size(); p++){
        v[p] = isVowel(s[p - 1]);
        cm[p] = (p > 0 ? cm[p - 1] : 0) + v[p];
    }

    double total = cm.back() + 1.0 * cm.back() / s.size();
    for(long len = 2; len < s.size(); len++){
        double cur(0);
        for(long p = 1; p + len - 1 <= s.size(); p++){cur += (cm[p + len - 1] - cm[p - 1]);}
        cur /= len; total += cur;
    }

    printf("%.7lf\n", total);

    return 0;
}


#include <bits/stdc++.h>
#define crap ios_base::sync_with_stdio(0);cin.tie(0)
#define ll long long
#define pb push_back
#define ff first
#define ss second
using namespace std;

const int N = 500005;
double s[N],dp[N];

bool vowel(char a)
{
  return a =='A' || a=='E' || a=='I' || a=='O' || a=='U' || a=='Y';
}

int main()
{
  #ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif

  crap;
  string p; cin>>p;
  s[1] = 1.;
  for(int i=1;i<N;i++) s[i]=s[i-1] + 1./i;
  int n = p.length();
  dp[0]= s[n];
  for(int i=0;i<n-1;i++) dp[i+1]=dp[i]+ s[n-1-i]-s[i+1];
  double res =0;
  for(int i=0;i<n;i++)
    if(vowel(p[i]))
      res+= dp[i];
  cout<<setprecision(7)<<fixed<<res<<endl;

}


#include<bits/stdc++.h>
#define MOD 1000000007
#define MOD2 1000000006
#define TEMPMOD1 998244353
#define TEMPMOD2 998244352
#define INF 1000000000000000007
#define NEGINF -1000000000000000007
#define vll vector<ll>
#define vvll vector<vector<ll>>
#define pll pair<ll,ll>
#define pii pair<int,int>
#define plll pair<ll,pll>
#define vpll vector<pll>
using namespace std;
typedef long long int ll;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    string str;
    cin>>str;
    ll len=str.size();
    ll prefix[len+1];
    prefix[0]=0;
    for(ll i=1;i<=len;i++)
    {
        prefix[i]=prefix[i-1];
        if(str[i-1]=='Y' || str[i-1]=='A' || str[i-1]=='E' || str[i-1]=='I' || str[i-1]=='O' || str[i-1]=='U')
        {
            prefix[i]++;
        }
    }
    ll prefprefsum[len+1];
    prefprefsum[0]=0;
    for(ll i=1;i<=len;i++)
    {
        prefprefsum[i]=prefprefsum[i-1]+prefix[i];
    }
    double ans=0.0000,store;
    for(ll l=1;l<=len;l++)
    {
        store=(double)(prefprefsum[len]-prefprefsum[l-1]);
        store-=(double)(prefprefsum[len-l]);
        store=store/(double)l;
        ans+=store;
    }
    cout<<fixed<<setprecision(8)<<ans;
    return 0;
}


#include <bits/stdc++.h>

#define debug(x) cout << #x << " = " << x << endl
#define fori(i, ini, lim) for(int i = int(ini); i < int(lim); i++)
#define ford(i, ini, lim) for(int i = int(ini); i >= int(lim); i--)

using namespace std;

typedef long long ll;
typedef pair<int, int> ii;

const int MAX = 5e5 + 5;
int pref[MAX];
char s[MAX];

inline bool vowel(char c) {
	return c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U' || c == 'Y';
}

int main() {
	scanf("%s", s);
	int n = strlen(s);
	fori(i, 1, n + 1) {
		pref[i] = pref[i - 1] + vowel(s[i - 1]);
	}

	int left = 1, right = n;
	double ans = 0.0;
	int vowels = 0;
	int len = 1;
	while(left <= right) {
		vowels += pref[right] - pref[left - 1];
		ans += (double) vowels / (double) len;
		if(left != right) {
			ans += (double) vowels / (double) (n - len + 1);
		}
		left++, right--;
		len++;
	}
	printf("%.15lf\n", ans);

	return 0;
}


#include <bits/stdc++.h>

#define debug(x) cout << #x << " = " << x << endl
#define fori(i, ini, lim) for(int i = int(ini); i < int(lim); i++)
#define ford(i, ini, lim) for(int i = int(ini); i >= int(lim); i--)

using namespace std;

typedef long long ll;
typedef pair<int, int> ii;

const int MAX = 5e5 + 5;
int pref[MAX];
char s[MAX];

inline bool vowel(char c) {
	return c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U' || c == 'Y';
}

int main() {
	scanf("%s", s);
	int n = strlen(s);
	fori(i, 1, n + 1) {
		pref[i] = pref[i - 1] + vowel(s[i - 1]);
	}

	int left = 1, right = n;
	double ans = 0.0;
	ll vowels = 0;
	int len = 1;
	while(left <= right) {
		vowels += pref[right] - pref[left - 1];
		ans += (double) vowels / (double) len;
		if(left != right) {
			ans += (double) vowels / (double) (n - len + 1);
		}
		left++, right--;
		len++;
	}
	printf("%.15lf\n", ans);

	return 0;
}


#include<iostream>
#include<vector>
#include<iomanip>

using namespace std;
int sm[550000];

int main()
{
	string inp;
	cin>>inp;
	int n = inp.size();
	inp = '0' + inp;

	sm[0] = 0;
	for(int i = 1; i <= n; i++)
	{
		sm[i] = sm[i - 1];
		if(inp[i] == 'A' || inp[i] == 'E' || inp[i] == 'I' || inp[i] == 'O' || inp[i] == 'U' || inp[i] == 'Y')
			sm[i]++;
	}

	double ans = 0, lencnt = 0;
	int lft = 0, rght = n;
	for(int i = 1; i <= n; i++)
	{
		lencnt += sm[rght] - sm[lft];
		ans += ((double)lencnt / i);
		lft++;
		rght--;
	}

	cout<<fixed<<setprecision(10)<<ans;
	return 0;
}


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

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int,int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;

#define pb push_back
#define eb emplace_back
#define ff first
#define ss second
#define mp make_pair
#define endl '\n'

const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const ll infLL = 9000000000000000000;
#define MOD 1000000007
//#define harmonic(n) 0.57721566490153286l+log(n)

#define mem(a,b) memset(a, b, sizeof(a) )
#define sqr(a) ((a) * (a))

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

//int dx[]={1,0,-1,0};int dy[]={0,1,0,-1}; ///4 Direction
//int dx[]={1,1,0,-1,-1,-1,0,1};int dy[]={0,1,1,1,0,-1,-1,-1};///8 direction
//int dx[]={2,1,-1,-2,-2,-1,1,2};int dy[]={1,2,2,1,-1,-2,-2,-1};///Knight Direction
//int dx[]={2,1,-1,-2,-1,1};int dy[]={0,1,1,0,-1,-1}; ///Hexagonal Direction

inline int in() { int x; scanf("%d", &x); return x; }
inline ll inl() { ll x;scanf("%I64d",&x); return x;}
inline double ind() { double x;scanf("%lf",&x);return x;}

int gcd(int a,int b) { return b==0 ? a:gcd(b,a%b);}
int power( int x, int n)
{
    if(n==0)return 1;
    else if(n%2==0)
    {
        int y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
//abcdefghijklmnopqrstuvwxyz//
char s[500010];
int pre[500010],cnt;
double ans;
main()
{
    #ifdef CP
    freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);
    #endif // CP
    scanf("%s",s);
    int n=strlen(s);
    for(int i=0;i<n;i++)
    {
        if(s[i]=='I'||s[i]=='E'||s[i]=='A'||s[i]=='O'||s[i]=='U'||s[i]=='Y')
            pre[i+1]=1;
        pre[i+1]+=pre[i];
    }
    int lp=0,rp=n;
    for(int i=1;i<=n;i++)
    {
        cnt+=pre[rp]-pre[lp];
        ans+=(double)cnt/(double)i;
        lp++,rp--;
    }
    printf("%.9f\n",ans);
}


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

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int,int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;

#define pb push_back
#define eb emplace_back
#define ff first
#define ss second
#define mp make_pair
#define endl '\n'

const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const ll infLL = 9000000000000000000;
#define MOD 1000000007
//#define harmonic(n) 0.57721566490153286l+log(n)

#define mem(a,b) memset(a, b, sizeof(a) )
#define sqr(a) ((a) * (a))

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

//int dx[]={1,0,-1,0};int dy[]={0,1,0,-1}; ///4 Direction
//int dx[]={1,1,0,-1,-1,-1,0,1};int dy[]={0,1,1,1,0,-1,-1,-1};///8 direction
//int dx[]={2,1,-1,-2,-2,-1,1,2};int dy[]={1,2,2,1,-1,-2,-2,-1};///Knight Direction
//int dx[]={2,1,-1,-2,-1,1};int dy[]={0,1,1,0,-1,-1}; ///Hexagonal Direction

inline int in() { int x; scanf("%d", &x); return x; }
inline ll inl() { ll x;scanf("%I64d",&x); return x;}
inline double ind() { double x;scanf("%lf",&x);return x;}

int gcd(int a,int b) { return b==0 ? a:gcd(b,a%b);}
int power( int x, int n)
{
    if(n==0)return 1;
    else if(n%2==0)
    {
        int y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
//abcdefghijklmnopqrstuvwxyz//
char s[1000010];
int pre[1000010];
ll cnt;
double ans;
main()
{
    #ifdef CP
    freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);
    #endif // CP
    scanf("%s",s);
    int n=strlen(s);
    for(int i=0;i<n;i++)
    {
        if(s[i]=='I'||s[i]=='E'||s[i]=='A'||s[i]=='O'||s[i]=='U'||s[i]=='Y')
            pre[i+1]=1;
        pre[i+1]+=pre[i];
    }
    int lp=0,rp=n;
    for(int i=1;i<=n;i++)
    {
        cnt+=(ll)(pre[rp]-pre[lp]);
        ans+=(double)cnt/(double)i;
        lp++,rp--;
    }
    printf("%.9f\n",ans);
}


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

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int,int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;

#define pb push_back
#define eb emplace_back
#define ff first
#define ss second
#define mp make_pair
#define endl '\n'

const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const ll infLL = 9000000000000000000;
#define MOD 1000000007
//#define harmonic(n) 0.57721566490153286l+log(n)

#define mem(a,b) memset(a, b, sizeof(a) )
#define sqr(a) ((a) * (a))

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

//int dx[]={1,0,-1,0};int dy[]={0,1,0,-1}; ///4 Direction
//int dx[]={1,1,0,-1,-1,-1,0,1};int dy[]={0,1,1,1,0,-1,-1,-1};///8 direction
//int dx[]={2,1,-1,-2,-2,-1,1,2};int dy[]={1,2,2,1,-1,-2,-2,-1};///Knight Direction
//int dx[]={2,1,-1,-2,-1,1};int dy[]={0,1,1,0,-1,-1}; ///Hexagonal Direction

inline int in() { int x; scanf("%d", &x); return x; }
inline ll inl() { ll x;scanf("%I64d",&x); return x;}
inline double ind() { double x;scanf("%lf",&x);return x;}

int gcd(int a,int b) { return b==0 ? a:gcd(b,a%b);}
int power( int x, int n)
{
    if(n==0)return 1;
    else if(n%2==0)
    {
        int y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
//abcdefghijklmnopqrstuvwxyz//
char s[500010];
int pre[500010],cnt;
double ans;
main()
{
    #ifdef CP
    freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);
    #endif // CP
    scanf("%s",s);
    int n=strlen(s);
    for(int i=0;i<n;i++)
    {
        if(s[i]=='I'||s[i]=='E'||s[i]=='A'||s[i]=='O'||s[i]=='U'||s[i]=='Y')
            pre[i+1]=1;
        pre[i+1]+=pre[i];
    }
    int lp=0,rp=n;
    for(int i=1;i<=n;i++)
    {
        cnt+=pre[rp]-pre[lp];
        ans+=(double)cnt/(double)i;
        lp++,rp--;
    }
    printf("%.9lf\n",ans);
}


//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC optimize("unroll-loops")

#include <stdio.h>
#include <bits/stdc++.h>

#define uint unsigned int
#define ll long long
#define ull unsigned long long
#define ld long double
#define rep(i, l, r) for (int i = l; i < r; i++)
#define repb(i, r, l) for (int i = r; i > l; i--)
#define sz(a) (int)a.size()
#define fi first
#define se second
#define mp(a, b) make_pair(a, b)

using namespace std;

inline void setmin(int &x, int y) { if (y < x) x = y; }
inline void setmax(int &x, int y) { if (y > x) x = y; }
inline void setmin(ll &x, ll y) { if (y < x) x = y; }
inline void setmax(ll &x, ll y) { if (y > x) x = y; }

const int N = 500000;
const int inf = (int)1e9 + 1;
const ll big = (ll)1e18 + 1;
const int P = 239;
const int MOD = (int)1e9 + 7;
const int MOD1 = 998244353;
const double eps = 1e-9;
const double pi = atan2(0, -1);
const int ABC = 26;

ld pref[N + 1];

int main()
{
    //freopen("a.in", "r", stdin);
    //freopen("a.out", "w", stdout);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.precision(20);
    cout << fixed;
    //ll TL = 0.95 * CLOCKS_PER_SEC;
    //clock_t time = clock();
    string s;
    cin >> s;
    int n = sz(s);
    rep(i, 1, n + 1)
        pref[i] = pref[i - 1] + (ld)1 / i;
    ld ans = 0, cur = 0;
    rep(i, 0, n)
    {
        if (n % 2 == 0)
        {
            if (i < n / 2)
                cur += (pref[n - i] - pref[i]);
            else if (i > n / 2)
                cur -= (pref[i] - pref[n - i]);
        }
        else
        {
            if (i <= n / 2)
                cur += (pref[n - i] - pref[i]);
            else
                cur -= (pref[i] - pref[n - i]);
        }
        if (s[i] == 'I' || s[i] == 'E' || s[i] == 'A' || s[i] == 'O' || s[i] == 'U' || s[i] == 'Y')
            ans += cur;
    }
    cout << ans << "\n";
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
ld arr[500005],res=0;
int main(){
    string s;
    cin>>s;
    ll n=s.length();
    ll pre[n+1]={0};
    for(ll i=1;i<500005;i++)
    arr[i]=arr[i-1]+1.0/i;
    for(ll i=0;i<n;i++)
    if(s[i]=='I'||s[i]=='E'||s[i]=='A'||s[i]=='O'||s[i]=='U'||s[i]=='Y')
    pre[i+1]=pre[i]+1;
    else
    pre[i+1]=pre[i];
    for(ll i=1;i<=n;i++)
    res+=pre[i]*(arr[i]-arr[n-i]);
    cout<<setprecision(100)<<res;
}


#include <bits/stdc++.h>
using namespace std;
// #define Int long long int
int main(){
	std::ios_base::sync_with_stdio(false);
	cout.precision(10);
	cout<<fixed;
	// cin.tie(NULL);
	// cout.tie(NULL);
	string s;
	cin>>s;
	map<char,int> m;
	string vow = "AEIOUY";
	int vowels = 0;
	int n = s.length();
	int vowels_pref[n+1] = {0}, vowels_suff[n+2] = {0}, pref_sum[n+1] = {0}, suff_sum[n+2]={0};
	for(auto i : vow) m[i] = 1;
	for(int i =0; i<s.length();i++) {
		if(m.find(s[i]) != m.end()) {
			vowels++;
			pref_sum[i+1] = pref_sum[i] + i+1;
		} else {
			pref_sum[i+1] = pref_sum[i];
		}
		vowels_pref[i+1] = vowels;
	}
	vowels = 0;
	int idx = 0;
	for(int i =s.length()-1; i>=0;i--) {
		if(m.find(s[i]) != m.end()) {
			vowels++;
			suff_sum[idx+1] = suff_sum[idx] + idx + 1;
		} else {
			suff_sum[idx+1] = suff_sum[idx];
		}
		vowels_suff[idx+1] = vowels;
		idx++;
	}
	double ans = 0.0;
	n = vowels;
	for (int i = 1; i <=s.length(); ++i)
	 {
	 	if(i==1) {ans+=n*1.0; continue;}
	 	if(i<=s.length()/2) {
	 		int temp_ans=(vowels - vowels_pref[i-1] - vowels_suff[i-1])*i;
	 		temp_ans+=pref_sum[i-1] + suff_sum[i-1];
	 		ans+= (temp_ans/(i*1.0));
	 	}
	 	else {
	 		// cout<<i<<" "<<pref_sum[s.length()-i+1]<<" "	;
	 		int temp_ans=pref_sum[s.length()-i+1] + (s.length()-i+1)*(vowels_pref[i-1] - vowels_pref[s.length()-i+1]);
	 		// cout<<suff_sum[s.length() - i + 1]<<" ";
	 		temp_ans+= suff_sum[s.length() - i + 1];
	 		ans+=(temp_ans/(i*1.0));
	 		// cout<<temp_ans<<" ";
	 	}
	 	// cout<<ans<<endl;
	 }

	 cout<<ans<<endl;
	return 0;
}


#include <stdio.h>
#define maxn 100005
long a[maxn], b[maxn];
long id[maxn];
long n, res;
void qsort(long d, long c) {
    long i, j, key;
    long tmp;
    i = d; j = c;
    key = b[(i+j)>>1];
    while (i <= j) {
        while (b[i] > key) i++;
        while (b[j] < key) j--;
        if (i <= j) {
            tmp = a[i]; a[i] = a[j]; a[j] = tmp;
            tmp = b[i]; b[i] = b[j]; b[j] = tmp;
            tmp = id[i]; id[i] = id[j]; id[j] = tmp;
            i++; j--;
        }
    if (d < j) qsort(d, j);
    if (i < c) qsort(i, c);
    }
}
int check(long i) {
    long j;
    for (j=1; j<=n; j++)
        if (i != j) {
            if (a[i] > a[j]) return 0;
        }
    return 1;
}
int main()
{
    long i, j, ij;
    scanf("%ld", &n);
    for (i=1; i<=n; i++) {
        scanf("%ld %ld",&a[i], &b[i]);
        id[i] = i;
    }
    qsort(1, n);
    res = -1;
    b[0] = b[1];
    for (i=1; i<=n; i++)
        if ((b[i] == b[i-1]) && check(i)) {
            res = id[i];
            break;
        }
    printf("%ld",res);
    return 0;
}


#include <stdio.h>
#define maxn 100005
long a[maxn], b[maxn];
long f[maxn];
long n, res;
void qsort(long d, long c) {
    long i, j, key1, key2;
    long tmp;
    i = d; j = c;
    key1 = b[(i+j)>>1]; key2 = a[(i+j)>>1];
    while (i <= j) {
        while ((b[i] < key1) || (b[i] == key1 && a[i] > key2)) i++;
        while ((key1 < b[j]) || (key1 == b[j] && key2 < a[j])) j--;
        if (i <= j) {
            tmp = a[i]; a[i] = a[j]; a[j] = tmp;
            tmp = b[i]; b[i] = b[j]; b[j] = tmp;
            i++; j--;
        }
    if (d < j) qsort(d, j);
    if (i < c) qsort(i, c);
    }
}
long max(long a, long b) {
    return (a>b ? a:b);
}
int main()
{
    long i, j, ij;
    scanf("%ld", &n);
    for (i=1; i<=n; i++)
        scanf("%ld %ld",&a[i], &b[i]);
    qsort(1, n);
    for (i=1; i<=n; i++)
        printf("%ld %ld\n",a[i], b[i]);
    f[0] = f[1] = 1; f[n] = -1;
    a[0] = b[0] = -1;
    for (i=2; i<=n; i++) {
        for (j=i-1; j>0; j--)
            if (a[i] <= a[j]) {
                ij = j;
                break;
            }
        f[i] = max(f[i-1], f[ij] + 1);
    }
    printf("%ld",f[n]);
}


    #include<stdio.h>
    #include<stdlib.h>

    int segmento(int *v1,int *v2, int menor, int mayor, int n)
    {
        int i;
        for(i=1; i<=n; i++){
            if(menor==v1[i] && mayor == v2[i])
                return i;
        }
        return 0;
    }
    int main()
    {
        int *v1,*v2;
        int i,j,n,acu=0;
        int menor=1000000000,mayor=0;

        scanf("%d",&n);
        if(n==1){
            scanf("%d %d", &menor, &mayor);
            printf("1");

        }else{
            v1=(int*)malloc(n*sizeof(int));
            v2=(int*)malloc(n*sizeof(int));
            for(i=1; i<=n; i++){
                scanf("%d %d", &v1[i],&v2[i]);
                if(v1[i]<menor)
                    menor= v1[i];
                if(v2[i]>mayor)
                    mayor= v2[i];
            }
            acu=segmento(v1,v2,menor,mayor,n);
            printf("%d",acu != 0 ? acu: -1);
        }
        return 0;
    }


#include<stdio.h>
    #include<stdlib.h>

    int segmento(int *v1,int *v2, int menor, int mayor, int n)
    {
        int i;
        for(i=1; i<=n; i++){
            if(menor==v1[i] && mayor==v2[i])
                return i;
        }
    }
    int main()
    {
        int *v1,*v2;
        int i,n,acu=0,menor=1000000000,mayor=0;
        scanf("%d",&n);
        if(n==1){
            scanf("%d %d", &menor, &mayor);
            printf("1");
        }else{
            v1=(int*)malloc(n*sizeof(int));
            v2=(int*)malloc(n*sizeof(int));
            for(i=1; i<=n; i++){
                scanf("%d %d", &v1[i],&v2[i]);
                if(v1[i]<menor)
                    menor= v1[i];
                if(v2[i]>mayor)
                    mayor= v2[i];
            }
            acu=segmento(v1,v2,menor,mayor,n);
            if (acu>1)
            {
                printf("%d",acu);
            }
            else{
                printf("%d",-1);
            }
        }
        return 0;
    }


    #include<stdio.h>
    #include<stdlib.h>

    int segmento(int *v1,int *v2, int menor, int mayor, int n)
    {
        int i;
        for(i=1; i<=n; i++){
            if(menor==v1[i] && mayor == v2[i])
                return i;
        }
        return 0;
    }
    int main()
    {
        int *v1,*v2;
        int i,n,acu=0,menor=1000000000,mayor=0;
        scanf("%d",&n);
        if(n==1){
            scanf("%d %d", &menor, &mayor);
            printf("1");
        }else{
            v1=(int*)malloc(n*sizeof(int));
            v2=(int*)malloc(n*sizeof(int));
            for(i=1; i<=n; i++){
                scanf("%d %d", &v1[i],&v2[i]);
                if(v1[i]<menor)
                    menor= v1[i];
                if(v2[i]>mayor)
                    mayor= v2[i];
            }
            acu=segmento(v1,v2,menor,mayor,n);
            printf("%d",acu != 0 ? acu: -1);
        }
        return 0;
    }


#include<stdio.h>
    #include<stdlib.h>

    int segmento(int **mat, int menor, int mayor, int n)
    {
        int i;
        for(i=1; i<=n; i++){
            if(menor==mat[i][1] && mayor == mat[i][2])
                return i;
        }
        return 0;
    }
    int main()
    {
        int **mat;
        int i,j,n,acu=0;
        int menor=1000000000,mayor=0;

        scanf("%d",&n);
        if(n==1){
            scanf("%d %d", &menor, &mayor);
            printf("1");

        }else{
            mat=(int**)malloc(n*sizeof(int*));
            for(i=1; i<=n; i++)
                mat[i]=(int *)malloc(2*sizeof(int));
            for(i=1; i<=n; i++){
                scanf("%d %d", &mat[i][1],&mat[i][2]);
                if(mat[i][1]<menor)
                    menor= mat[i][1];
                if(mat[i][2]>mayor)
                    mayor= mat[i][2];
            }
            acu=segmento(mat,menor,mayor,n);
            printf("%d",acu != 0 ? acu: -1);
        }
        return 0;
    }


#include<stdio.h>
#include<stdlib.h>

int segmento(int **mat, int menor, int mayor, int n)
{
    int i;
    for(i=1; i<=n; i++){
        if(mat[i][1]== menor && mat[i][2]==mayor)
            return i;
    }
    return 0;
}
int main()
{
    int **mat;
    int n,i,j, acu=0, menor=1000000000, mayor=0;
    scanf("%d",&n);
    mat=(int**)malloc(n*sizeof(int*));
    for(i=1; i<=n; i++)
        mat[i]=(int *)malloc(2*sizeof(int));
    for(i=1; i<=n; i++)
    {
       scanf("%d %d", &mat[i][1], &mat[i][2]);
       if(mat[i][1] < menor)
           menor=mat[i][1];
       if(mat[i][2] > mayor)
           mayor=mat[i][2];
    }
    if(n==1)
        printf("1");
    else{
       acu=segmento(mat, menor, mayor, n);
       printf("%d", acu != 0? acu: -1);
    }
    return 0;
}


    #include<stdio.h>
    #include<stdlib.h>

    int segmento(int *v1,int *v2, int menor, int mayor, int n)
    {
        int i;
        for(i=0; i<n; i++){
            if(menor==v1[i] && mayor==v2[i])
                return i+1;
        }
    }
    int main()
    {
        int *v1,*v2;
        int i,n,acu,menor,mayor;
        scanf("%d",&n);
        if(n==1){
            scanf("%d %d", &menor, &mayor);
            printf("1");
        }else{
            v1=(int*)malloc(n*sizeof(int));
            v2=(int*)malloc(n*sizeof(int));
            scanf("%d %d", &v1[0],&v2[0]);
            menor=v1[0];
            mayor=v2[0];
            for(i=1; i<n; i++){
                scanf("%d %d", &v1[i],&v2[i]);
                if(v1[i]<menor)
                    menor= v1[i];
                if(v2[i]>mayor)
                    mayor= v2[i];
            }
            acu=segmento(v1,v2,menor,mayor,n);
            if (acu==0)
            {
                printf("%d",-1);
            }
            else{
                printf("%d",acu);
            }
        }
        return 0;
    }


    #include<stdio.h>
    #include<stdlib.h>

    int segmento(int *v1,int *v2, int menor, int mayor, int n)
    {
        int i;
        for(i=0; i<n; i++){
            if(menor==v1[i] && mayor==v2[i])
                return i+1;
        }
    }
    int main()
    {
        int *v1,*v2;
        int i,n,acu,menor,mayor;
        scanf("%d",&n);
        if(n==1){
            scanf("%d %d", &menor, &mayor);
            printf("1");
        }else{
            v1=(int*)malloc(n*sizeof(int));
            v2=(int*)malloc(n*sizeof(int));
            scanf("%d %d", &v1[0],&v2[0]);
            menor=v1[0];
            mayor=v2[0];
            for(i=1; i<n; i++){
                scanf("%d %d", &v1[i],&v2[i]);
                if(v1[i]<menor)
                    menor= v1[i];
                if(v2[i]>mayor)
                    mayor= v2[i];
            }
            acu=segmento(v1,v2,menor,mayor,n);
            if (acu>1)
            {
                printf("%d",acu);
            }
            else{
                printf("%d",-1);
            }
        }
        return 0;
    }


#include<stdio.h>
#include<stdlib.h>

int segmento(int **mat, int n)
{
    int i,j,cont=0;
    if( n != 1){
        for(i=1; i<=n; i++){
            for(j=1; j<=n; j++){
                if(j!=i){
                    if(mat[j][1] >= mat[i][1] && mat[j][2] <= mat[i][2])
                        cont++;
                }
            }
        if(cont == n-1)
            return i;
        else
            cont=0;
        }
    }
    else
        if(mat[1][1] == 1 && mat[1][2] == 100000)return 1;
    return 0;
}
int main()
{
    int **mat;
    int n,i,j, acu=0;
    scanf("%d",&n);
    if( n>=1 && n<= 100000)
    {
        mat=(int**)malloc(n*sizeof(int*));
        for(i=1; i<=n; i++)
            mat[i]=(int *)malloc(2*sizeof(int));
        for(i=1; i<=n; i++)
            scanf("%d%d", &mat[i][1], &mat[i][2]);
    acu=segmento(mat, n);
    printf("%d", acu != 0? acu: -1);
    }
    else
        printf("-1");
    return 0;
}


    #include<stdio.h>
    #include<stdlib.h>

    int segmento(int **mat, int menor, int mayor, int n)
    {
        int i;
        for(i=1; i<=n; i++){
            if(menor==mat[i][1] && mayor == mat[i][2])
                return i;
        }
        return 0;
    }
    int main()
    {
        int **mat;
        int i,j,n,acu=0;
        int menor=1000000000,mayor=0;

        scanf("%d",&n);
        if(n==1){
            scanf("%d %d", &menor, &mayor);
            printf("1");

        }else{
            mat=(int**)malloc(n*sizeof(int*));
            for(i=1; i<=n; i++){
                mat[i]=(int *)malloc(2*sizeof(int));
                scanf("%d %d", &mat[i][1],&mat[i][2]);
                if(mat[i][1]<menor)
                    menor= mat[i][1];
                if(mat[i][2]>mayor)
                    mayor= mat[i][2];
            }
            acu=segmento(mat,menor,mayor,n);
            printf("%d",acu != 0 ? acu: -1);
        }
        return 0;
    }


#include<stdio.h>
#include<stdlib.h>

int segmento(int **mat, int n)
{
    int i,j,cont=0;
    if( n != 1){
        for(i=1; i<=n; i++){
            for(j=1; j<=n; j++){
                if(j!=i){
                    if(mat[i][1] <= mat[j][1] && mat[j][1]<= mat[j][2] && mat[j][2]<=mat[i][2])
                        cont++;
                }
            }
        if(cont == n-1)
            return i;
        else
            cont=0;
        }
    }
     return 0;
}
int main()
{
    int **mat;
    int n,i,j, acu=0;
    scanf("%d",&n);
    if( n>=1 && n<= 100000)
    {
        mat=(int**)malloc(n*sizeof(int*));
        for(i=1; i<=n; i++)
            mat[i]=(int *)malloc(2*sizeof(int));
        for(i=1; i<=n; i++)
            scanf("%d%d", &mat[i][1], &mat[i][2]);
    acu=segmento(mat, n);
    printf("%d", acu != 0? acu: -1);
    }
    else
        printf("-1");
    return 0;
}


    #include<stdio.h>
    #include<stdlib.h>

    int segmento(int *v1,int *v2, int menor, int mayor, int n)
    {
        int i;
        for(i=0; i<n; i++){
            if(menor==v1[i] && mayor==v2[i])
                return i+1;
        }
    }
    int main()
    {
        //int *v1,*v2;
        int i,n,acu=0,menor,mayor,c;
        scanf("%d",&n);
        int v1[n],v2[n];
        if(n==1){
            scanf("%d %d", &menor, &mayor);
            printf("1");
        }else{
            //v1=(int*)malloc(n*sizeof(int));
            //v2=(int*)malloc(n*sizeof(int));
            scanf("%d %d", &v1[0],&v2[0]);
            menor=v1[0];
            mayor=v2[0];
            for(i=1; i<n; i++){
                scanf("%d %d", &v1[i],&v2[i]);
                if(v1[i]<menor)
                    menor= v1[i];
                if(v2[i]>mayor)
                    mayor= v2[i];
            }

            for(i=0; i<n;i++)
            {
                if(v1[i]==menor && v2[i] == mayor)
                {
                    //printf("%d",i+1);
                    acu=1;
                    c=i+1;
                }
            }
           // acu=segmento(v1,v2,menor,mayor,n);
            if (acu==0)
            {
                printf("%d",-1);
            }
            else{
                printf("%d",c);
            }
        }
        return 0;
    }


    #include<stdio.h>
    #include<stdlib.h>

    int segmento(int **mat, int n)
    {
        int i,pos1,pos2,menor,mayor;
        menor= mat[1][1];
        mayor= mat[1][2];
        for(i=2; i<=n; i++){
            if(mat[i][1] < menor)
                menor= mat[i][1];
            if(mat[i][2] > mayor)
                mayor= mat[i][2];
        }
        for(i=1; i<=n; i++){
            if(menor==mat[i][1] && mayor == mat[i][2])
                return i;
        }
        return 0;
    }
    int main()
    {
        int **mat;
        int i,j,n,acu=0;

        scanf("%d",&n);
        mat=(int**)malloc(n*sizeof(int*));
        for(i=1; i<=n; i++)
            mat[i]=(int *)malloc(2*sizeof(int));
        for(i=1; i<=n; i++){
            scanf("%d %d", &mat[i][1],&mat[i][2]);
        }
        if(n==1)
            printf("%d",1);
        else{
            acu=segmento(mat,n);
            printf("%d",acu != 0 ? acu: -1);
        }
        return 0;
    }


#include<stdio.h>
#include<stdlib.h>

int segmento(int **mat, int n)
{
    int i,j,cont=0;
    if( n != 1){
        for(i=1; i<=n; i++){
            for(j=1; j<=n; j++){
                if(j!=i){
                    if(mat[j][1] >= mat[i][1] && mat[j][2] <= mat[i][2])
                        cont++;
                }
            }
        if(cont == n-1)
            return i;
        else
            cont=0;
        }
    }
     return 0;
}
int main()
{
    int **mat;
    int n,i,j, acu=0;
    scanf("%d",&n);
    if( n>=1 && n<= 100000)
    {
        mat=(int**)malloc(n*sizeof(int*));
        for(i=1; i<=n; i++)
            mat[i]=(int *)malloc(2*sizeof(int));
        for(i=1; i<=n; i++)
            scanf("%d%d", &mat[i][1], &mat[i][2]);
    acu=segmento(mat, n);
    printf("%d", acu != 0? acu: -1);
    }
    else
        printf("-1");
    return 0;
}


    #include<stdio.h>
    #include<stdlib.h>

    int segmento(int **mat, int n)
    {
        int i,pos1,pos2,menor,mayor;
        menor= mat[1][1];
        mayor= mat[1][2];
        for(i=2; i<=n; i++){
            if(mat[i][1] < menor)
                menor= mat[i][1];
            if(mat[i][2] > mayor)
                mayor= mat[i][2];
        }
        for(i=1; i<=n; i++){
            if(menor==mat[i][1] && mayor == mat[i][2])
                return i;
        }
        return 0;
    }
    int main()
    {
        int **mat;
        int i,j,n,acu=0;

        scanf("%d",&n);
        mat=(int**)malloc(n*sizeof(int*));
        for(i=1; i<=n; i++)
            mat[i]=(int *)malloc(2*sizeof(int));
        for(i=1; i<=n; i++){
            scanf("%d %d", &mat[i][1],&mat[i][2]);
        }
        if(n == 1)
            printf("%d",1);
        else{
            acu=segmento(mat,n);
            printf("%d",acu != 0 ? acu: -1);
        }
        return 0;
    }


#include<stdio.h>
#include<stdlib.h>

int segmento(int **mat, int n)
{
    int i,j,cont=0;
    for(i=1; i<=n; i++)
    {
      for(j=1; j<=n; j++)
      {
        if(j!=i){
           if(mat[i][1] <= mat[j][1] && mat[j][1]<= mat[j][2] && mat[j][2]<=mat[i][2])
            cont++;
        }
      }
      if(cont == n-1)
        return i;
      else
        cont=0;
    }
     return 0;
}
int main()
{
    int **mat;
    int n,i,j, acu=0;
    scanf("%d",&n);
    if( n>=1 && n<= 100000)
    {
        mat=(int**)malloc(n*sizeof(int*));
        for(i=1; i<=n; i++)
            mat[i]=(int *)malloc(2*sizeof(int));
        for(i=1; i<=n; i++)
            scanf("%d%d", &mat[i][1], &mat[i][2]);
    acu=segmento(mat, n);
    printf("%d", acu != 0? acu: -1);
    }
    else
        printf("-1");
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct segmento
{
    int l;
    int r;
} Segmento;

int main()
{
    int cantSegmentos;
    int pos_solucion = -1;
    scanf("%d", &cantSegmentos);
    Segmento **segmentos = (Segmento**)malloc(sizeof(Segmento*)*cantSegmentos);
    if(segmentos == NULL)
    {
        printf("Error: no hay memoria suficiente\n");
        exit(1);
    }
    int i, j;
    for (i = 0; i < cantSegmentos; i++)
    {
        segmentos[i] = (Segmento*)malloc(sizeof(Segmento));
        if(segmentos[i] == NULL)
        {
            printf("Error: no hay memoria suficiente\n");
            exit(1);
        }
        scanf("%d%d", &segmentos[i]->l, &segmentos[i]->r);
    }
    int es_solucion;
    for (i = 0; i < cantSegmentos; i++)
    {
        es_solucion = segmentos[i]->l <= segmentos[0]->l &&
                    segmentos[0]->l <= segmentos[0]->r &&
                    segmentos[0]->r <= segmentos[i]->r;
        for( j = 1; j < cantSegmentos && es_solucion; j++ )
        {
            if(i != j)
            {
                es_solucion = es_solucion && segmentos[i]->l <= segmentos[j]->l &&
                    segmentos[j]->l <= segmentos[j]->r &&
                    segmentos[j]->r <= segmentos[i]->r;
            }
        }
        if(es_solucion)
        {
            pos_solucion = i+1;
            i = cantSegmentos;
        }
    }
    printf("%d", pos_solucion);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct segmento
{
    int l;
    int r;
} Segmento;

int main()
{
    int cantSegmentos;
    int pos_solucion = -1;
    scanf("%d", &cantSegmentos);
    Segmento **segmentos = (Segmento**)malloc(sizeof(Segmento*)*cantSegmentos);
    if(segmentos == NULL)
    {
        printf("Error: no hay memoria suficiente\n");
        exit(1);
    }
    int i, j;
    for (i = 0; i < cantSegmentos; i++)
    {
        segmentos[i] = (Segmento*)malloc(sizeof(Segmento));
        if(segmentos[i] == NULL)
        {
            printf("Error: no hay memoria suficiente\n");
            exit(1);
        }
        scanf("%d%d", &segmentos[i]->l, &segmentos[i]->r);
    }
    for (i = 0; i < cantSegmentos; i++)
    {
        for( j = 0; j < cantSegmentos; j++)
        {
            if(i != j)
            {
                if(segmentos[i]->l <= segmentos[j]->l &&
                segmentos[j]->l <= segmentos[j]->r &&
                segmentos[j]->r <= segmentos[i]->r)
                {
                    if(pos_solucion >= 0)
                    {
                        if(segmentos[i]->l <= segmentos[pos_solucion]->l &&
                        segmentos[pos_solucion]->l <= segmentos[pos_solucion]->r &&
                        segmentos[pos_solucion]->r <= segmentos[i]->r)
                        {
                            pos_solucion = i;
                            j = cantSegmentos;
                        }
                    }
                    else
                    {
                        pos_solucion = i;
                        j = cantSegmentos;
                    }
                }
            }
        }
    }
    printf("%d", pos_solucion);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct segmento
{
    int l;
    int r;
} Segmento;

int main()
{
    int cantSegmentos;
    int pos_solucion = -1;
    scanf("%d", &cantSegmentos);
    Segmento **segmentos = (Segmento**)malloc(sizeof(Segmento*)*cantSegmentos);
    if(segmentos == NULL)
    {
        printf("Error: no hay memoria suficiente\n");
        exit(1);
    }
    int i, j;
    for (i = 0; i < cantSegmentos; i++)
    {
        segmentos[i] = (Segmento*)malloc(sizeof(Segmento));
        if(segmentos[i] == NULL)
        {
            printf("Error: no hay memoria suficiente\n");
            exit(1);
        }
        scanf("%d%d", &segmentos[i]->l, &segmentos[i]->r);
    }
    int es_solucion;
    for (i = 0; i < cantSegmentos; i++)
    {
        es_solucion = segmentos[i]->l <= segmentos[0]->l &&
                    segmentos[0]->r <= segmentos[i]->r;
        for( j = 1; j < cantSegmentos && es_solucion; j++ )
        {
            if(i != j)
            {
                es_solucion = es_solucion && segmentos[i]->l <= segmentos[j]->l &&
                    segmentos[j]->r <= segmentos[i]->r;
            }
        }
        if(es_solucion)
        {
            pos_solucion = i+1;
            i = cantSegmentos;
        }
    }
    printf("%d", pos_solucion);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct segmento
{
    int l;
    int r;
} Segmento;

int main()
{
    int cantSegmentos;
    int pos_solucion = 0;
    scanf("%d", &cantSegmentos);
    Segmento **segmentos = (Segmento**)malloc(sizeof(Segmento*)*cantSegmentos);
    if(segmentos == NULL)
    {
        printf("Error: no hay memoria suficiente\n");
        exit(1);
    }
    int i, j;
    for (i = 0; i < cantSegmentos; i++)
    {
        segmentos[i] = (Segmento*)malloc(sizeof(Segmento));
        if(segmentos[i] == NULL)
        {
            printf("Error: no hay memoria suficiente\n");
            exit(1);
        }
        scanf("%d%d", &segmentos[i]->l, &segmentos[i]->r);
    }
    for (i = 0; i < cantSegmentos; i++)
    {
        for( j = 0; j < cantSegmentos; j++)
        {
            if(i != j)
            {
                if(segmentos[i]->l <= segmentos[j]->l &&
                segmentos[j]->l <= segmentos[j]->r &&
                segmentos[j]->r <= segmentos[i]->r &&

                segmentos[i]->l <= segmentos[pos_solucion]->l &&
                segmentos[pos_solucion]->l <= segmentos[pos_solucion]->r &&
                segmentos[pos_solucion]->r <= segmentos[i]->r)
                {
                    pos_solucion = i;
                    j = cantSegmentos;
                }
            }
        }
    }
    printf("%d", pos_solucion);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct segmento
{
    int l;
    int r;
} Segmento;

int main()
{
    int cantSegmentos;
    int pos_solucion = -1;
    scanf("%d", &cantSegmentos);
    Segmento **segmentos = (Segmento**)malloc(sizeof(Segmento*)*cantSegmentos);
    if(segmentos == NULL)
    {
        printf("Error: no hay memoria suficiente\n");
        exit(1);
    }
    int i, j;
    for (i = 0; i < cantSegmentos; i++)
    {
        segmentos[i] = (Segmento*)malloc(sizeof(Segmento));
        if(segmentos[i] == NULL)
        {
            printf("Error: no hay memoria suficiente\n");
            exit(1);
        }
        scanf("%d%d", &segmentos[i]->l, &segmentos[i]->r);
    }
    for (i = 0; i < cantSegmentos; i++)
    {
        for( j = 0; j < cantSegmentos; j++)
        {
            if(i != j)
            {
                if(segmentos[i]->l <= segmentos[j]->l &&
                segmentos[j]->l <= segmentos[j]->r &&
                segmentos[j]->r <= segmentos[i]->r)
                {
                    if(pos_solucion >= 0)
                    {
                        if(segmentos[i]->l <= segmentos[pos_solucion]->l &&
                        segmentos[pos_solucion]->l <= segmentos[pos_solucion]->r &&
                        segmentos[pos_solucion]->r <= segmentos[i]->r)
                        {
                            pos_solucion = i+1;
                            j = cantSegmentos;
                        }
                    }
                    else
                    {
                        pos_solucion = i+1;
                        j = cantSegmentos;
                    }
                }
            }
        }
    }
    printf("%d", pos_solucion);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct segmento
{
    int l;
    int r;
} Segmento;

int main()
{
    int cantSegmentos;
    int pos_solucion = -1;
    scanf("%d", &cantSegmentos);
    Segmento **segmentos = (Segmento**)malloc(sizeof(Segmento*)*cantSegmentos);
    if(segmentos == NULL)
    {
        printf("Error: no hay memoria suficiente\n");
        exit(1);
    }
    int i, j;
    for (i = 0; i < cantSegmentos; i++)
    {
        segmentos[i] = (Segmento*)malloc(sizeof(Segmento));
        if(segmentos[i] == NULL)
        {
            printf("Error: no hay memoria suficiente\n");
            exit(1);
        }
        scanf("%d%d", &segmentos[i]->l, &segmentos[i]->r);
    }
    for (i = 0; i < cantSegmentos; i++)
    {
        for( j = 0; j < cantSegmentos; j++)
        {
            if( j != i )
            {
                if(segmentos[i]->l <= segmentos[j]->l && segmentos[j]->l <= segmentos[j]->r && segmentos[j]->r <= segmentos[i]->r)
                {
                    pos_solucion = i;
                }
            }
        }
    }
    printf("%d", pos_solucion);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct segmento
{
    int l;
    int r;
} Segmento;

int main()
{
    int cantSegmentos;
    int pos_solucion = -1;
    scanf("%d", &cantSegmentos);
    Segmento **segmentos = (Segmento**)malloc(sizeof(Segmento*)*cantSegmentos);
    if(segmentos == NULL)
    {
        printf("Error: no hay memoria suficiente\n");
        exit(1);
    }
    int i;
    for (i = 0; i < cantSegmentos; i++)
    {
        segmentos[i] = (Segmento*)malloc(sizeof(Segmento));
        if(segmentos[i] == NULL)
        {
            printf("Error: no hay memoria suficiente\n");
            exit(1);
        }
        scanf("%d%d", &segmentos[i]->l, &segmentos[i]->r);
    }
    int menor = segmentos[0]->l, pos_menor = 0, mayor = segmentos[0]->r, pos_mayor = 0;
    for (i = 1; i < cantSegmentos; i++)
    {
        if(segmentos[i]->l < menor)
        {
            menor = segmentos[i]->l;
            pos_menor = i;
        }
    }
    for (i = 1; i < cantSegmentos; i++)
    {
        if(segmentos[i]->r > mayor)
        {
            mayor = segmentos[i]->r;
            pos_mayor = i;
        }
    }
    for(i = 0; i < cantSegmentos; i++)
    {
        if(segmentos[i]->l == menor && segmentos[i]->r == mayor)
        {
            pos_solucion = i+1;
            i = cantSegmentos;
        }
    }
    printf("%d", pos_solucion);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct segmento
{
    int l;
    int r;
} Segmento;

int main()
{
    int cantSegmentos;
    int pos_solucion = -1;
    scanf("%d", &cantSegmentos);
    Segmento **segmentos = (Segmento**)malloc(sizeof(Segmento*)*cantSegmentos);
    if(segmentos == NULL)
    {
        printf("Error: no hay memoria suficiente\n");
        exit(1);
    }
    int i, j;
    for (i = 0; i < cantSegmentos; i++)
    {
        segmentos[i] = (Segmento*)malloc(sizeof(Segmento));
        if(segmentos[i] == NULL)
        {
            printf("Error: no hay memoria suficiente\n");
            exit(1);
        }
        scanf("%d%d", &segmentos[i]->l, &segmentos[i]->r);
    }
    int menor = segmentos[0]->l, pos_menor = 0, mayor = segmentos[0]->r, pos_mayor = 0;
    for (i = 1; i < cantSegmentos; i++)
    {
        if(segmentos[i]->l < menor)
        {
            menor = segmentos[i]->l;
            pos_menor = i;
        }
    }
    for (i = 1; i < cantSegmentos; i++)
    {
        if(segmentos[i]->r > mayor)
        {
            mayor = segmentos[i]->r;
            pos_mayor = i;
        }
    }
    if(segmentos[pos_mayor]->l == menor)
    {
        pos_menor = pos_mayor;
    }
    if(pos_menor == pos_mayor)
    {
        pos_solucion = pos_menor +1;
    }
    printf("%d", pos_solucion);
    return 0;
}


#include<stdio.h>
#define N 100001
//想法是找到
//l[N]找最小值
//r[N]找最大值
int main() {
	int n;
	scanf("%d",&n);
	int i;
	int l[N],r[N];
	for(i=1;i<=n;i++){
		scanf("%d%d",&l[i],&r[i]);
	}
	int min=l[1];
	int max=r[1];
	for(i=2;i<=n;i++){
		if(l[i]<min){
			min=l[i];
		}
		if(r[i]>max){
			max=r[i];
		}
	}
	int find=0;
	for(i=1;i<=n;i++){
		if(l[i]==min && r[i]==max){
			find=i;
			break;
		}
	}
	if(find){
		printf("%d\n",find);
	}else{
		printf("-1\n");
	}
	return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct seg{
    int l;
    int r;
}segment;

int main()
{
    int n,mini,may,pos=1,i;
    segment big;
    scanf("%d",&n);
    segment aux[n];
    scanf("%d",&aux[0].l);
    scanf("%d",&aux[0].r);
    mini=aux[0].l;
    may=aux[0].r;
    big=aux[0];
    pos=1;
    for(i=1;i<n;i++){
        scanf("%d",&aux[i].l);
        scanf("%d",&aux[i].r);
        if(aux[i].l<=big.l && aux[i].r>=big.r){
                pos=i+1;
                big=aux[i];
        }
        if(aux[i].l<=mini) mini=aux[i].l;
        if(aux[i].r>=may) may=aux[i].r;
        fflush(stdin);
    }
    if(big.l==mini&&big.r==may) printf("%d",pos);
    else printf("%d",-1);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct seg{
    int l;
    int r;
}segment;

int main()
{
    int n,mini,may,pos=1,i;
    segment aux,big;
    scanf("%d",&n);
    scanf("%d",&aux.l);
    scanf("%d",&aux.r);
    mini=aux.l;
    may=aux.r;
    big=aux;
    pos=1;
    for(i=1;i<n;i++){
        scanf("%d",&aux.l);
        scanf("%d",&aux.r);
        if(aux.l<=big.l && aux.r>=big.r){
                pos=i+1;
                big=aux;
        }
        if(aux.l<=mini) mini=aux.l;
        if(aux.r>=may) may=aux.r;
        fflush(stdin);
    }
    if(big.l==mini&&big.r==may) printf("%d",pos);
    else printf("%d",-1);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n,mini,may,pos=1,i;
    int bigl,bigr,auxl,auxr;
    scanf("%d",&n);
    scanf("%d",&mini);
    scanf("%d",&may);
    bigl=mini;
    bigr=may;
    pos=1;
    for(i=1;i<n;i++){
        scanf("%d",&auxl);
        scanf("%d",&auxr);
        if(auxl<=bigl && auxr>=bigr){
                pos=i+1;
                bigr=auxr;
                bigl=auxl;
        }
        if(auxl<=mini){
            mini=auxl;
        }
        if(auxr>=may){
                may=auxr;
        }
    }
    if(bigl==mini&&bigr==may){
        printf("%d",pos);
    }else{
            printf("%d",-1);
    }
    return 0;
}


#include <stdio.h>
int main()
{
    int i, n, l, r, minl, maxr, number=1;
    scanf("%d%d%d", &n, &minl, &maxr);
    for ( i = 2; i <= n; ++i)
    {
        scanf("%d%d", &l, &r);
        if (l <= minl && r >= maxr)
        {
            number = i;
        }
        else if (l < minl || r > maxr)
        {
            number = -1;
        }
        if(minl>l){
            minl=l;
        }
        if(r>maxr){
            maxr=r;
        }
    }
    printf("%d\n", number);
    return 0;
}


#include<stdio.h>

int main()
{
    int i,n,l,r,minl,maxr,c=0,no=0;

    scanf("%d",&n);
    scanf("%d",&l);
    scanf("%d",&r);
    minl=l;
    maxr=r;
    for (i=1;i<n;i++)
    {
        scanf("%d%d",&l,&r);

        if (l>=minl && r<=maxr)
        {
            c++;

        }else{
            no++;
        }
        minl=l;
        maxr=r;
    }
    if(no++==n-1){
            c=-1;
        }

    printf("%d\n",c);
    return 0;
}


# include <stdio.h>
# include <stdlib.h>

struct segmento {
        int x;
        int y;
};

int main (void)
{
     int i,n,salida=-1,max=0,min=999999999;
     scanf ("%d",&n);
     struct segmento seg[n];

     for ( i=0; i<n; i++ )
     {
         scanf ("%d%d",&seg[i].x, &seg[i].y);
         if (seg[i].x < min)
            min = seg[i].x;
         if (seg[i].y > max)
            max = seg[i].y;
     }

     for (i=0; i<n; i++)
     {
        if (seg[i].x == min && seg[i].y == max)
        {
           salida = i+1;
           break;
        }
     }

     printf ("%d",salida);
     return 0;
}


# include <stdio.h>
# include <stdlib.h>

typedef struct segmento {
        int x;
        int y;
}Segmento;

int segmento_grande (Segmento [],int);

main ()
{
     int i,n,salida;
     scanf ("%d",&n);
     Segmento seg[n];

     for ( i=0; i<n; i++ )
         scanf ("%d%d",&seg[i].x, &seg[i].y);

     salida = segmento_grande (seg,n);

     printf ("%d",salida);

}

int segmento_grande (Segmento seg[], int n)
{
    int i,max,min,salida=-1;
    min = seg[0].x;
    max = seg[0].y;

    for (i=1; i<n; i++)
    {
        if (seg[i].x < min)
           min = seg[i].x;
        if (seg[i].y > max)
           max = seg[i].y;
    }

    for (i=0; i<n; i++)
    {
        if (seg[i].x == min && seg[i].y == max)
        {
           salida = i+1;
           break;
        }
    }

    return salida;
}


# include <stdio.h>
# include <stdlib.h>

typedef struct segmento {
        int x;
        int y;
}Segmento;

int segmento_grande (Segmento [],int);

int main (void)
{
     int i,n,salida;
     scanf ("%d",&n);
     Segmento seg[n];

     for ( i=0; i<n; i++ )
         scanf ("%d%d",&seg[i].x, &seg[i].y);

     salida = segmento_grande (seg,n);

     printf ("%d",salida);

     return 0;
}

int segmento_grande (Segmento seg[], int n)
{
    int i,max,min,salida=-1;
    min = seg[0].x;
    max = seg[0].y;

    for (i=1; i<n; i++)
    {
        if (seg[i].x < min)
           min = seg[i].x;
        if (seg[i].y > max)
           max = seg[i].y;
    }

    for (i=0; i<n; i++)
    {
        if (seg[i].x == min && seg[i].y == max)
        {
           salida = i+1;
           break;
        }
    }

    return salida;
}


# include <stdio.h>
# include <stdlib.h>

int main (void)
{
     int i,n,salida=1,max,min,menor,mayor,a,b;
     scanf ("%d",&n);

     scanf ("%d%d",&min, &max);
     menor = min;
     mayor = max;
     for ( i=2; i<n; i++ )
     {
         scanf ("%d%d",&a, &b);

         if (a<=min && b>=max)
         {
                    min = a;
                    max = b;
                    salida = i;
         }

         if ( a < menor ) menor = a;
         if ( b > mayor) mayor = b;
     }

     if ( min == menor && max == mayor )
        printf ("%d",salida);
     else
         printf ("d"-1);
     return 0;
}


# include <stdio.h>

int main (void)
{
     int i,n,salida=1,max,min,menor,mayor,a,b;
     scanf ("%d",&n);

     scanf ("%d%d",&min, &max);
     menor = min;
     mayor = max;
     for ( i=2; i<=n; i++ )
     {
         scanf ("%d%d",&a, &b);

         if (a<=min && b>=max)
         {
                    min = a;
                    max = b;
                    salida = i;
         }

         if ( a < menor ) menor = a;
         if ( b > mayor) mayor = b;
     }

     if ( min == menor && max == mayor )
        printf ("%d",salida);
     else
         printf ("%d",-1);
     return 0;
}


# include <stdio.h>
# include <stdlib.h>

typedef struct segmento {
        int x;
        int y;
}Segmento;

int segmento_grande (Segmento [],int);

int main (void)
{
     int i,n,salida;
     scanf ("%d",&n);
     Segmento seg[n];

     for ( i=0; i<n; i++ )
         scanf ("%d%d",&seg[i].x, &seg[i].y);

     salida = segmento_grande (seg,n);

     printf ("%d",salida);

     return 0;

}

int segmento_grande (Segmento seg[], int n)
{
    int i,max,min,salida=-1;
    min = seg[0].x;
    max = seg[0].y;

    for (i=1; i<n; i++)
    {
        if (seg[i].x < min)
           min = seg[i].x;
        if (seg[i].y > max)
           max = seg[i].y;
    }

    for (i=0; i<n; i++)
    {
        if (seg[i].x == min && seg[i].y == max)
        {
           salida = i+1;
           break;
        }
    }

    return salida;
}


# include <stdio.h>
# include <stdlib.h>

typedef struct segmento {
        int x;
        int y;
}Segmento;

int segmento_grande (Segmento [],int);

main ()
{
     int i,n,salida;
     scanf ("%d",&n);
     Segmento seg[n];

     for ( i=0; i<n; i++ )
         scanf ("%d%d",&seg[i].x, &seg[i].y);

     salida = segmento_grande (seg,n);

     printf ("%d",salida);

     printf ("\n\n");
     system ("pause");
}

int segmento_grande (Segmento seg[], int n)
{
    int i,max,min,salida=-1;
    min = seg[0].x;
    max = seg[0].y;

    for (i=1; i<n; i++)
    {
        if (seg[i].x < min)
           min = seg[i].x;
        if (seg[i].y > max)
           max = seg[i].y;
    }

    for (i=0; i<n; i++)
    {
        if (seg[i].x == min && seg[i].y == max)
        {
           salida = i+1;
           break;
        }
    }

    return salida;
}


# include <stdio.h>
# include <stdlib.h>

struct segmento {
        int x;
        int y;
};

int main (void)
{
     int i,n,salida=-1,max,min;
     scanf ("%d",&n);
     struct segmento seg[n];

     scanf ("%d%d",&seg[0].x, &seg[0].y);
     max = seg[0].x;
     min = seg[0].y;
     for ( i=1; i<n; i++ )
     {
         scanf ("%d%d",&seg[i].x, &seg[i].y);
         if (seg[i].x < min)
            min = seg[i].x;
         if (seg[i].y > max)
            max = seg[i].y;
     }

     for (i=0; i<n; i++)
     {
        if (seg[i].x == min && seg[i].y == max)
        {
           salida = i+1;
           break;
        }
     }

     printf ("%d",salida);
     return 0;
}


#include<stdio.h>
//#include<stdlib.h>

int max(int a,int b)
{return (a>b)?a:b;}
int min(int a,int b)
{return (a<b)?a:b;}
int main()
{
    int a,b,n,m,i,j,ans=-1;
    int x[111111],y[111111];
    scanf("%d",&n);
    for(i=1;i<=n;i++)
        {scanf("%d%d",&x[i],&y[i]);}
    for(i=1;i<=n;i++)
      {
        b=1;
        for(j=1;j<=n;j++)
          {
            if((x[i]>x[j])||(y[j]>y[i]))
              {
                b=0;
                break;
              }
          }
        if(b)
          {
              ans=i;
              break;
          }
      }

    printf("%d\n",ans);

   // system("pause");
    return 0;
}


#include<stdio.h>

int n,ans=-1,x=2147483647,y=-2147483647,a,b;

int main()
{
    int i,j,k,l;

    scanf("%d",&n);
    for(i=1;i<=n;i++)
      {
        scanf("%d%d",&a,&b);
        if(a>=x&&b<=y&&ans!=-1)
          continue;
        if(a<=x&&b>=y)
          {
            x=a;
            y=b;
            ans=i;
            continue;
          }
        if(a<x)
          {
            x=a;
            ans=-1;
          }
        if(b>y)
          {
            y=b;
            ans=-1;
          }
      }
    printf("%d\n",ans);

    //system("pause");
    return 0;
}


#include<stdio.h>

int n,ans=-1,x=2147483647,y=-2147483647,a,b;

int main()
{
    int i,j,k,l;

    scanf("%d",&n);
    for(i=1;i<=n;i++)
      {
        scanf("%d%d",&a,&b);
        if(a>=x&&b<=y)
          continue;
        if(a<=x&&b>=y)
          {
            x=a;
            y=b;
            ans=i;
            continue;
          }
        if(a<x)
          {
            x=a;
            ans=-1;
          }
        if(b>y)
          {
            y=b;
            ans=-1;
          }
      }
    printf("%d\n",ans);

    //system("pause");
    return 0;
}


#include<stdio.h>
#define N 1000000000
int main(){
    long int n,sum=0,mayor=0;
    int i,cor=0,c=0;
    do{
       scanf("%ld",&n);
    }while(n<1 || n>100000);
    long int l[n],r[n];
    for(i=0;i<n;i++){
        do{
            scanf("%ld",&l[i]);
        }while(l[i]<1 || l[i]>N);
        do{
            scanf("%ld",&r[i]);
        }while(r[i]<l[i] || r[i]>N);
        sum=r[i]-l[i];
        if(sum>mayor){
            mayor=sum;
            cor=i;
        }
    }
    for(i=0;i<n;i++){
        if(l[i]>=l[cor]&& r[i]<=r[cor]){
            c++;
        }
    }
        if(c==n)
            printf("%d",cor+1);
        else
            printf("%d",-1);
    return 0;

}


#include <stdio.h>

int main()
{
    int lista[100000][2];
    int n,x,minimo=1000000001,maximo=-1,existe=-1;

    scanf("%d",&n);

    for(x=0;x<n;x++){
        scanf("%d%d",&lista[x][0],&lista[x][1]);
        if(lista[x][0]<minimo)
            minimo=lista[x][0];
        if(lista[x][1]>maximo)
            maximo=lista[x][1];
    }

    for(x=0;x<n;x++){
        if(lista[x][0]==minimo && lista[x][1]==maximo)
            existe=x+1;
    }

    printf("%d",existe);

    return 0;
}


#include <stdio.h>
#include <math.h>
typedef struct segment{
    int x;
    int y;
}Segment;

int main(){
    Segment vec[99999];

    int n;
    int i;
    int maximo = 0;
    int minimo = 0;
    int respuesta = 0;
    scanf("%d", &n);
    for ( i = 0; i < n; i++ ){
        scanf("%d", &vec[i].x);
        scanf("%d", &vec[i].y);
    }
    minimo = vec[0].x;
    maximo = vec[0].y;
    for( i = 0; i < n; i++){
        if ( vec[i].x < minimo){
            minimo = vec[i].x;
        }
        if( vec[i].y > maximo){
            maximo = vec[i].y;
        }
    }
    for( i = 0; i < n; i++){
        if( ( vec[i].x == minimo) && (vec[i].y == maximo) ){
            respuesta = i + 1;
            printf("%d", respuesta);
        }
    }
    if(!respuesta){
        printf("-1");
    }

    return (0);
}


#include<stdio.h>
#include<stdlib.h>

int segmento(int *v1,int *v2, int menor, int mayor, int n)
{
    int i;

    for(i=0; i<n;i++){
        if(v1[i]==menor && v2[i] == mayor)
            return i+1;
    }
    return 0;
}
int main()
{
    int i,n,acu=0,menor,mayor,c;
    scanf("%d",&n);
    int v1[n],v2[n];
    if(n==1){
        scanf("%d %d", &menor, &mayor);
        printf("1");
    }else{
        scanf("%d %d", &v1[0],&v2[0]);
        menor=v1[0];
        mayor=v2[0];
        for(i=1; i<n; i++){
            scanf("%d %d", &v1[i],&v2[i]);
            if(v1[i]<menor)
                menor= v1[i];
            if(v2[i]>mayor)
                mayor= v2[i];
        }
        acu=segmento(v1,v2,menor,mayor,n);
        if (acu==0)
            printf("%d",-1);
        else
            printf("%d",acu);
    }
    return 0;
}


#include<stdio.h>
#include<stdlib.h>

int segmento(int **mat, int n)
{
    int i, menor, mayor, pos1, pos2;
    menor=mat[1][1];
    mayor=mat[1][2];
    for(i=2; i<=n; i++)
    {
      if(mat[i][1] < menor)
          menor=mat[i][1];
      if(mat[i][2] > mayor)
        mayor=mat[i][2];
    }
    for(i=1; i<=n; i++){
        if(mat[i][1]== menor && mat[i][2]==mayor)
            return i;
    }
    return 0;
}
int main()
{
    int **mat;
    int n,i,j, acu=0;
    scanf("%d",&n);
    mat=(int**)malloc(n*sizeof(int*));
    for(i=1; i<=n; i++)
        mat[i]=(int *)malloc(2*sizeof(int));
    for(i=1; i<=n; i++)
        scanf("%d %d", &mat[i][1], &mat[i][2]);
    acu=segmento(mat, n);
    printf("%d", acu != 0? acu: -1);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

int** leerYdimencionar(int n);
void identificar(int n,int **m);
int buscar(int **m,int n,int opc);
int main()
{
    int n,**m;
    scanf("%d",&n);
    m=leerYdimencionar(n);
    identificar(n,m);
    return 0;
}
int** leerYdimencionar(int n){
    int **m;
    int *a,i;
    m=malloc(sizeof(int*)*n);
    a=malloc(sizeof(int)*n*2);
    for(i=0;i<n;i++){
        m[i]=a+(i*2);
    }
    for(i=0;i<n;i++){
        scanf("%d %d",&m[i][0],&m[i][1]);
    }
    return m;
}
void identificar(int n,int **m){
    int x,y,i,pos,ban;
    pos=1;
    ban=0;
    x=buscar(m,n,1);
    y=buscar(m,n,0);
    for(i=0;i<n;i++){
        if(m[i][0]<=x && x<=y && y<=m[i][1]){
            pos=i+1;
            x=m[i][0];
            y=m[i][1];
            ban=1;
        }
    }
    if(ban)
        printf("\n%d",pos);
    else{
        pos=-1;
        printf("\n%d",pos);
    }

}
int buscar(int **m,int n,int opc){

    int menor,mayor,i;
    menor=m[0][0];
    mayor=m[0][1];
    for(i=0;i<n;i++){
        if(opc){
            if(m[i][0]<menor){
                menor=m[i][0];
            }
        }
        else{
            if(m[i][1]>mayor){
                mayor=m[i][1];
            }
        }
    }
    if(opc){
        return menor;
    }
    else{
        return mayor;
    }
}


#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n;
    scanf("%d",&n);
    int arr[n][2];
    int i,j;
    int min=1000000000;
    int max=0;
    for(i=0;i<n;i++){
        for(j=0;j<2;j++){
            scanf("%d",&arr[i][j]);
            if(j==0){
                if(arr[i][j]<min){
                    min=arr[i][j];
                }
            }
            if(j==1){
                if(arr[i][j]>max){
                    max=arr[i][j];
                }
            }
        }
    }
    for(i=0;i<n;i++){
        for(j=0;j<2;j++){
            if(arr[i][0]==min&&arr[i][1]==max){
                printf("%d",i+1);
                return 0;
            }
        }
    }
    printf("-1");
    return 0;
}


#include <stdio.h>
int main()
{
    int i, n, l, r, minl, maxr, number=1;
    scanf("%d%d%d", &n, &minl, &maxr);
    for ( i = 2; i <= n; ++i)
    {
        scanf("%d%d", &l, &r);
        if (l <= minl && r >= maxr)
        {
            number = i;
        }
        else if (l < minl || r > maxr)
        {
            number = -1;
        }
        if(minl>l){
            minl=l;
        }
        if(r>maxr){
            maxr=r;
        }
    }
    printf("%d\n", number);
    return 0;
}


#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
int arr[n],brr[n],i,a[n],b[n],j,temp;
for(i=0;i<n;i++)
    scanf("%d %d",&arr[i],&brr[i]);
    for(i=0;i<n;i++)
    {
        a[i]=i+1;
    b[i]=i+1;
    }
    for ( i = 0 ; i <=n-2; i++ )
	{
		for ( j = i + 1 ; j <=n-1 ; j++ )
		{
			if ( arr[i] > arr[j] )
			{
				temp = arr[i] ;
				arr[i] = arr[j] ;
				arr[j] = temp ;

				temp = a[i] ;
				a[i] = a[j] ;
				a[j] = temp ;
			}
			if ( brr[i] > brr[j] )
			{
				temp = brr[i] ;
				brr[i] = brr[j] ;
				brr[j] = temp ;

				temp = b[i] ;
				b[i] = b[j] ;
				b[j] = temp ;
			}
			}
		}
		//for(i=0;i<n;i++)
        //{
          //  printf("%d %d \n %d %d \n",arr[i],a[i],brr[i],b[i]);
        //}

	i=0;
	j=n-1;
	while(i<n&&j>=0)
    {
        if(a[i]==b[j])
        {
            printf("%d",a[i]);
        return 0;
        }
        else if(brr[j]==brr[j-1])
        {
            j--;
        }
        if(a[i]==b[j])
        {
            printf("%d",a[i]);
        return 0;
        }
        else if(arr[i]==arr[i+1])
        {
            i++;
            continue;
        }
        if(a[i]==b[j])
        {
            printf("%d",a[i]);
        return 0;
        }
        else
            break;

    }
    printf("-1");
    return 0;
    }


#include <math.h>
#include <limits.h>
#include <stdio.h>

int main ()
{
  int i, n;
  int l[100001], r[100001];
  int minLeft, maxRight;

  minLeft = INT_MAX;
  maxRight = INT_MIN;

  scanf("%d", &n);

  for (i = 1; i <= n; i++)
  {
        scanf("%d%d", &l[i], &r[i]);

        if (l[i] < minLeft)
        {
            minLeft = l[i];
        }

        if (r[i] > maxRight)
        {
            maxRight = r[i];
        }
  }

  int pos = -1;
  for (i = 1; i <= n; i++)
  {
        if (   l[i] == minLeft
            && r[i] == maxRight)
        {
            pos = i;
            break;
        }
  }

  printf("%d\n", pos);

  return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct seg{
    int l;
    int r;
}segment;

int main()
{
    int n,mini,may,pos=1,i;
    int bigl,bigr,auxl,auxr;
    scanf("%d",&n);
    scanf("%d",&mini);
    scanf("%d",&may);
    bigl=mini;
    bigr=may;
    pos=1;
    for(i=1;i<n;i++){
        scanf("%d",&auxl);
        scanf("%d",&auxr);
        if(auxl<=bigl && auxr>=bigr){
                pos=i+1;
                bigr=auxr;
                bigl=auxl;
        }
        if(auxl<=mini) mini=auxl;
        if(auxr>=may) may=auxr;
        fflush(stdin);
    }
    if(bigl==mini&&bigr==may) printf("%d",pos);
    else printf("%d",-1);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct seg{
    int l;
    int r;
}segment;

int main()
{
    int n,mini,may,pos=1,i;
    char c;
    segment big;
    scanf("%d",&n);
    segment aux[n];
    scanf("%d",&(aux[0].l));
    scanf("%c",&c);
    scanf("%d",&(aux[0].r));
    mini=aux[0].l;
    may=aux[0].r;
    big=aux[0];
    pos=1;
    for(i=1;i<n;i++){
        scanf("%d",&aux[i].l);
        scanf("%c",&c);
        scanf("%d",&aux[i].r);
        if(aux[i].l<=big.l && aux[i].r>=big.r){
                pos=i+1;
                big=aux[i];
        }
        if(aux[i].l<=mini) mini=aux[i].l;
        if(aux[i].r>=may) may=aux[i].r;
        fflush(stdin);
    }
    if(big.l==mini&&big.r==may) printf("%d",pos);
    else printf("%d",-1);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct seg{
    int l;
    int r;
}segment;

int main()
{
    int n,mini,may,pos=1,i;
    int big[2];
    scanf("%d",&n);
    int auxl[n],auxr[n];
    scanf("%d",&mini);
    scanf("%d",&may);
    big[0]=mini;
    big[1]=may;
    pos=1;
    for(i=1;i<n;i++){
        scanf("%d",&auxl[i]);
        scanf("%d",&auxr[i]);
        if(auxl[i]<=big[0] && auxr[i]>=big[1]){
                pos=i+1;
                big[1]=auxr[i];
                big[0]=auxl[i];
        }
        if(auxl[i]<=mini) mini=auxl[i];
        if(auxr[i]>=may) may=auxr[i];
        fflush(stdin);
    }
    if(big[0]==mini&&big[1]==may) printf("%d",pos);
    else printf("%d",-1);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct seg{
    int l;
    int r;
}segment;

int main()
{
    int n,mini,may,pos=1,i;
    int bigl,bigr,auxl,auxr;
    scanf("%d",&n);
    scanf("%d",&auxl);
    scanf("%d",&auxr);
    mini=auxl;
    may=auxr;
    bigl=auxl;
    bigr=auxr;
    pos=1;
    for(i=1;i<n;i++){
        scanf("%d",&auxl);
        scanf("%d",&auxr);
        if(auxl<=bigl && auxr>=bigr){
                pos=i+1;
                bigr=auxr;
                bigl=auxl;
        }
        if(auxl<=mini) mini=auxl;
        if(auxr>=may) may=auxr;
        fflush(stdin);
    }
    if(bigl==mini&&bigr==may) printf("%d",pos);
    else printf("%d",-1);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

typedef struct seg{
    int l;
    int r;
}segment;

int main()
{
    int n,mini,may,pos=1,i;
    segment aux,big;
    scanf("%d",&n);
    scanf("%d",&aux.l);
    scanf("%d",&aux.r);
    mini=aux.l;
    may=aux.r;
    big=aux;
    pos=1;
    for(i=1;i<n;i++){
        scanf("%d",&aux.l);
        scanf("%d",&aux.r);
        if(aux.l<=big.l && aux.r>=big.r){
                pos=i+1;
                big=aux;
        }
        if(aux.l<=mini) mini=aux.l;
        if(aux.r>=may) may=aux.r;
        fflush(stdin);
    }
    if(big.l==mini&&big.r==may) printf("%d",pos);
    else printf("%d",-1);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n,mini,may,pos=1,i;
    int bigl,bigr,auxl,auxr;
    scanf("%d",&n);
    scanf("%d",&mini);
    scanf("%d",&may);
    bigl=mini;
    bigr=may;
    pos=1;
    for(i=1;i<n;i++){
        scanf("%d",&auxl);
        scanf("%d",&auxr);
        if(auxl<=bigl && auxr>=bigr){
                pos=i+1;
                bigr=auxr;
                bigl=auxl;
        }
        if(auxl<=mini){
            mini=auxl;
        }
        if(auxr>=may){
                may=auxr;
        }
    }
    if(bigl==mini&&bigr==may){
        printf("%d",pos);
    }else{
            printf("%d",-1);
    }
    return 0;
}


#include <stdio.h>

int main()
{
	int n, a, b, max = 0, min = 1024 * 1024 * 1024, indexMax = 0, indexMin = 0, index = 0;

	scanf("%d", &n);
		if(n == 1){
		printf("1\n");
		return 0;
		}
	while(n > 0){
		scanf("%d%d", &a, &b);
		n--;
		index++;

		if(a < min){
			min = a;
			indexMin = index;
		}else if(a == min && b > max){
			indexMin = index;
		}

		if(b > max){
			max = b;
			indexMax = index;
		}else if(b == max && a == min && indexMin == index){
			indexMax = index;
		}
	}

	if(indexMax == indexMin)printf("%d\n", indexMin);
	else printf("-1\n");

	return 0;
}


#include <stdio.h>

int main()
{
	int n, a, b, max = 0, min = 1024 * 1024 * 1024, indexMax = 0, indexMin = 0, index = 0;

	scanf("%d", &n);

	while(n > 0){
		scanf("%d%d", &a, &b);
		n--;
		index++;

		if(a < min){
			min = a;
			indexMin = index;
		}else if(a == min && b > max){
			indexMin = index;
		}

		if(b > max){
			max = b;
			indexMax = index;
		}else if(b == max && a == min){
			indexMax = index;
		}
	}

	if(indexMax == indexMin)printf("%d\n", indexMin);
	else printf("-1\n");
}


#include <stdio.h>

int main()
{
	int n, a, b, max = 0, min = 1024 * 1024 * 1024, indexMax = 0, indexMin = 0, index = 0, indexFinal = 0, N;

	scanf("%d", &n);
	N = n;
	while(n > 0){
		scanf("%d%d", &a, &b);
		n--;
		index++;

		if(a <= min && b >=max)
		{
			min = a;
			max = b;
			indexFinal = indexMax = indexMin = index;
		}else if(a <= min && b < max){
			min = a;
			indexMin = index;
		}else if(a > min && b >= max){
			max = b;
			indexMax = index;
		}

/*
		if(a < min){
			min = a;
			indexMin = index;
		}else if(a == min && b > max){
			indexMin = index;
		}

		if(b > max){
			max = b;
			indexMax = index;
		}else if(b == max && a == min && indexMin == index){
			indexMax = index;
		}
		*/
	}

	if(indexMax == indexFinal == indexMin)printf("%d\n", indexMin);
	else printf("-1\n");

	return 0;
}


#include <stdio.h>

int main()
{
	int n, a, b, max = 0, min = 1024 * 1024 * 1024, indexMax = 0, indexMin = 0, index = 0;

	scanf("%d", &n);

	while(n > 0){
		scanf("%d%d", &a, &b);
		n--;
		index++;

		if(a < min){
			min = a;
			indexMin = index;
		}else if(a == min && b > max){
			max = b;
			indexMin = indexMax = index;
			continue;
		}

		if(b > max){
			max = b;
			indexMax = index;
		}else if(b == max && a < min){
			indexMax = index;
		}

		if(a == min && b == max && indexMin != indexMax)
		{
			indexMin = indexMax = index;
		}
	}

	if(indexMax == indexMin)printf("%d\n", indexMin);
	else printf("-1\n");

	return 0;
}


#include <stdio.h>

int main()
{
	int n, a, b, max = 0, min = 1024 * 1024 * 1024, indexMax = 0, indexMin = 0, index = 0, indexFinal = 0, N;

	scanf("%d", &n);
	N = n;
	while(n > 0){
		scanf("%d%d", &a, &b);
		n--;
		index++;

		if(a < min && b >=max || a == min && b >max)
		{
			indexFinal = indexMax = indexMin = index;
		}else if(a < min && b < max){
			indexMin = index;
		}else if(a > min && b > max){
			indexMax = index;
		}

/*
		if(a < min){
			min = a;
			indexMin = index;
		}else if(a == min && b > max){
			indexMin = index;
		}

		if(b > max){
			max = b;
			indexMax = index;
		}else if(b == max && a == min && indexMin == index){
			indexMax = index;
		}
		*/
	}

	if(indexMax == indexFinal)printf("%d\n", indexMin);
	else printf("-1\n");

	return 0;
}


#include <stdio.h>

int main()
{
	int n, a, b, max = 0, min = 1024 * 1024 * 1024, indexMax = 0, indexMin = 0, index = 0;

	scanf("%d", &n);
		if(n == 1){
		printf("-1\n");
		return 0;
		}
	while(n > 0){
		scanf("%d%d", &a, &b);
		n--;
		index++;

		if(a < min){
			min = a;
			indexMin = index;
		}else if(a == min && b > max){
			indexMin = index;
		}

		if(b > max){
			max = b;
			indexMax = index;
		}else if(b == max && a == min){
			indexMax = index;
		}
	}

	if(indexMax == indexMin)printf("%d\n", indexMin);
	else printf("-1\n");

	return 0;
}


#include <stdio.h>

int main()
{
	int n, a, b, max = 0, min = 1024 * 1024 * 1024, indexMax = 0, indexMin = 0, index = 0, indexFinal = 0, N;

	scanf("%d", &n);
	N = n;
	while(n > 0){
		scanf("%d%d", &a, &b);
		n--;
		index++;

		if(a <= min && b >=max)
		{
			min = a;
			max = b;
			indexFinal = indexMax = indexMin = index;
		}else if(a < min){
			min = a;
			indexMin = index;
		}else if(b > max){
			max = b;
			indexMax = index;
		}

/*
		if(a < min){
			min = a;
			indexMin = index;
		}else if(a == min && b > max){
			indexMin = index;
		}

		if(b > max){
			max = b;
			indexMax = index;
		}else if(b == max && a == min && indexMin == index){
			indexMax = index;
		}
		*/
	}

	if(indexMax == indexFinal == indexMin)printf("%d\n", indexMin);
	else printf("-1\n");

	return 0;
}


#include <stdio.h>

int main()
{
	int n, a, b, max = 0, min = 1024 * 1024 * 1024, indexMax = 0, indexMin = 0, index = 0;

	scanf("%d", &n);

	while(n > 0){
		scanf("%d%d", &a, &b);
		n--;
		index++;

		if(a < min){
			min = a;
			indexMin = index;
		}else if(a == min && b > max){
			indexMin = index;
		}
		if(a == min && indexMin == index){
			if(b >= max){
			max = b;
			indexMax = index;
			}
		}
	}

	if(indexMax == indexMin)printf("%d\n", indexMin);
	else printf("-1\n");

	return 0;
}


#include <stdio.h>

int main()
{
	int n, a, b, max = 0, min = 1024 * 1024 * 1024, indexMax = 0, indexMin = 0, index = 0, indexFinal = 0, N;

	scanf("%d", &n);
	N = n;
	while(n > 0){
		scanf("%d%d", &a, &b);
		n--;
		index++;

		if(a < min && b >=max || a == min && b >max)
		{
			indexFinal = indexMax = indexMin = index;
		}else if(a < min && b < max){
			indexMin = index;
		}else if(a > min && b > max){
			indexMax = index;
		}

/*
		if(a < min){
			min = a;
			indexMin = index;
		}else if(a == min && b > max){
			indexMin = index;
		}

		if(b > max){
			max = b;
			indexMax = index;
		}else if(b == max && a == min && indexMin == index){
			indexMax = index;
		}
		*/
	}

	if(indexMax == indexFinal == indexMin)printf("%d\n", indexMin);
	else printf("-1\n");

	return 0;
}


#include <stdio.h>

int main()
{
	int n, a, b, max = 0, min = 1024 * 1024 * 1024, indexMax = 0, indexMin = 0, index = 0;

	scanf("%d", &n);

	while(n > 0){
		scanf("%d%d", &a, &b);
		n--;
		index++;

		if(a < min){
			min = a;
			indexMin = index;
		}else if(a == min && b > max){
			max = b;
			indexMin = indexMax = index;
			continue;
		}

		if(b > max){
			max = b;
			indexMax = index;
		}else if(b == max && a < min){
			indexMax = index;
		}
	}

	if(indexMax == indexMin)printf("%d\n", indexMin);
	else printf("-1\n");

	return 0;
}


#include <stdio.h>

int main()
{
	int n, a, b, max = 0, min = 1024 * 1024 * 1024, indexMax = 0, indexMin = 0, index = 0, indexFinal = 0, N;

	scanf("%d", &n);
	N = n;
	while(n > 0){
		scanf("%d%d", &a, &b);
		n--;
		index++;

		if(a < min && b >=max || a == min && b >max)
		{
			min = a;
			max = b;
			indexFinal = indexMax = indexMin = index;
		}else if(a < min && b < max){
			min = a;
			indexMin = index;
		}else if(a > min && b > max){
			max = b;
			indexMax = index;
		}

/*
		if(a < min){
			min = a;
			indexMin = index;
		}else if(a == min && b > max){
			indexMin = index;
		}

		if(b > max){
			max = b;
			indexMax = index;
		}else if(b == max && a == min && indexMin == index){
			indexMax = index;
		}
		*/
	}

	if(indexMax == indexFinal == indexMin)printf("%d\n", indexMin);
	else printf("-1\n");

	return 0;
}