using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

//using Algorithms.Set_43;

public class Program
{
    private class Tokenizer
    {
        private string currentString = null;

        private string[] tokens = null;

        private int tokenNumber = 0;

        private static readonly char[] Separators = { ' ' };

        public T NextToken<T>(Func<string, T> parser)
        {
            return parser(this.GetNextToken());
        }

        public string NextToken()
        {
            return this.GetNextToken();
        }

        public int NextInt()
        {
            return this.NextToken(int.Parse);
        }

        public long NextLong()
        {
            return this.NextToken(long.Parse);
        }

        private string GetNextToken()
        {
            if (this.currentString == null || this.tokenNumber == this.tokens.Length)
            {
                this.currentString = this.GetNextString();

                while (this.currentString != null && this.currentString.Equals(string.Empty))
                {
                    this.currentString = this.GetNextString();
                }

                if (this.currentString == null)
                {
                    throw new Exception("End of input");
                }

                this.tokens = this.currentString.Split(Separators, StringSplitOptions.RemoveEmptyEntries);
                this.tokenNumber = 0;
            }

            return this.tokens[this.tokenNumber++];
        }

        private string GetNextString()
        {
            string content = Console.ReadLine();
            if (content == null)
            {
                return null;
            }

            return content.Trim();
        }
    }

    class Linguistics
    {
        public static List<string> Solve(string s)
        {
            int n = s.Length;
            bool[] can2 = new bool[n];
            bool[] can3 = new bool[n];

            for (int i = 0; i < n; i++)
            {
                can2[i] = false;
                can3[i] = false;
            }

            can2[n - 2] = true;
            can3[n - 3] = true;

            for (int i = n - 1; i >= 5; i--)
            {
                if (can2[i] == true)
                {
                    can3[i - 3] = true;

                    if (Compare(can2, i - 2, i, 2))
                    {
                        can2[i - 2] = true;
                    }
                }

                if (can3[i] == true)
                {
                    can2[i - 2] = true;

                    if (Compare(can3, i - 3, i, 3))
                    {
                        can3[i - 3] = true;
                    }
                }
            }

            TrieNode trie = new TrieNode();
            for (int i = 5; i < n; i++)
            {
                if (can2[i])
                {
                    Add(s, i, 2, trie);
                }

                if (can3[i])
                {
                    Add(s, i, 3, trie);
                }
            }

            List<string> list = new List<string>();
            StringBuilder sb = new StringBuilder();
            trie.Visit(sb, list);

            return list;
        }

        private static bool Compare(bool[] can, int start1, int start2, int length)
        {
            for (int i = 0; i < length; i++)
            {
                if (can[start1 + i] != can[start2 + i])
                {
                    return true;
                }
            }

            return false;
        }

        private static void Add(string s, int start, int length, TrieNode rootNode)
        {
            TrieNode currentNode = rootNode;
            for (int i = 0; i < length; i++)
            {
                currentNode = currentNode.GoNext(s[start + i]);
            }

            currentNode.Finish = true;
        }

        private class TrieNode
        {
            private SortedDictionary<char, TrieNode> next;

            public TrieNode()
            {
                this.next = new SortedDictionary<char, TrieNode>();
            }

            public bool Finish { get; set; }

            public TrieNode GoNext(char c)
            {
                if (!this.next.ContainsKey(c))
                {
                    this.next[c] = new TrieNode();
                }

                return this.next[c];
            }

            public void Visit(StringBuilder sb, List<string> list)
            {
                if (this.Finish)
                {
                    list.Add(sb.ToString());
                }

                foreach (var keyValuePair in this.next)
                {
                    sb.Append(keyValuePair.Key);
                    keyValuePair.Value.Visit(sb, list);
                    sb.Remove(sb.Length - 1, 1);
                }
            }
        }
    }

    public static void Main()
    {
        Tokenizer tokenizer = new Tokenizer();

        string s = tokenizer.NextToken();

        List<string> list = Linguistics.Solve(s);
        Console.WriteLine(list.Count);
        foreach (string substring in list)
        {
            Console.WriteLine(substring);
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AlgoTraining.Codeforces.C_s
{
    class ReberlandLinguistics349
    {
        private static SortedSet<string> _set = new SortedSet<string>();
        private static HashSet<string> _tempSet = new HashSet<string>();
        private static string _str;
        private static bool[] solved;
        public static void Main(string[] args)
        {
            using (FastScanner fs = new FastScanner(new BufferedStream(Console.OpenStandardInput())))
            using (StreamWriter writer = new StreamWriter(new BufferedStream(Console.OpenStandardOutput())))
            {
                _str = fs.ReadLine();
                solved = new bool[_str.Length];
                Find(_str.Length - 1);
                writer.WriteLine(_set.Count);
                foreach (string suffix in _set)
                {
                    writer.WriteLine(suffix);
                }
            }
        }
        public static void Find(int i)
        {
            if (solved[i]) return;
            if (i - 1 > 4)
            {
                string suffix = _str.Substring(i - 1, 2);
                if (!_tempSet.Contains(suffix))
                {
                    _tempSet.Add(suffix);
                    _set.Add(suffix);
                    Find(i - 2);
                    _tempSet.Remove(suffix);
                }
            }
            if (i - 2 > 4)
            {
                string suffix = _str.Substring(i - 2, 3);
                if (!_tempSet.Contains(suffix))
                {
                    _tempSet.Add(suffix);
                    _set.Add(suffix);
                    Find(i - 3);
                    _tempSet.Remove(suffix);
                }
            }
            solved[i] = true;
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AlgoTraining.Codeforces.C_s
{
    public class FastScanner : StreamReader
    {
        private string[] _line;
        private int _iterator;

        public FastScanner(Stream stream) : base(stream)
        {
            _line = null;
            _iterator = 0;
        }
        public int NextInt()
        {
            if (_line == null || _iterator >= _line.Length)
            {
                _line = base.ReadLine().Split(' ');
                _iterator = 0;
            }
            if (_line.Count() == 0) throw new IndexOutOfRangeException("Input string is empty");
            return Convert.ToInt32(_line[_iterator++]);
        }
        public long NextLong()
        {
            if (_line == null || _iterator >= _line.Length)
            {
                _line = base.ReadLine().Split(' ');
                _iterator = 0;
            }
            if (_line.Count() == 0) throw new IndexOutOfRangeException("Input string is empty");
            return Convert.ToInt64(_line[_iterator++]);
        }
    }
    // Not solved yet
    class ReberlandLinguistics349
    {
        private static SortedSet<string> _set = new SortedSet<string>();
        private static string _str;
        private static bool[,] solved;
        public static void Main(string[] args)
        {
            using (FastScanner fs = new FastScanner(new BufferedStream(Console.OpenStandardInput())))
            using (StreamWriter writer = new StreamWriter(new BufferedStream(Console.OpenStandardOutput())))
            {
                _str = fs.ReadLine();
                solved = new bool[2, _str.Length];
                Find(_str.Length - 1, "");
                writer.WriteLine(_set.Count);
                foreach (string suffix in _set)
                {
                    writer.WriteLine(suffix);
                }
            }
        }
        public static void Find(int i, string prev)
        {
            if (i - 1 > 4 && !solved[0, i])
            {
                string suffix = _str.Substring(i - 1, 2);
                if (suffix != prev)
                {
                    _set.Add(suffix);
                    Find(i - 2, suffix);
                    solved[0, i] = true;
                }
            }
            if (i - 2 > 4 && !solved[1, i])
            {
                string suffix = _str.Substring(i - 2, 3);
                if (suffix != prev)
                {
                    _set.Add(suffix);
                    Find(i - 3, suffix);
                    solved[1, i] = true;
                }
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AlgoTraining.Codeforces.C_s
{
    public class FastScanner : StreamReader
    {
        private string[] _line;
        private int _iterator;

        public FastScanner(Stream stream) : base(stream)
        {
            _line = null;
            _iterator = 0;
        }
        public int NextInt()
        {
            if (_line == null || _iterator >= _line.Length)
            {
                _line = base.ReadLine().Split(' ');
                _iterator = 0;
            }
            if (_line.Count() == 0) throw new IndexOutOfRangeException("Input string is empty");
            return Convert.ToInt32(_line[_iterator++]);
        }
        public long NextLong()
        {
            if (_line == null || _iterator >= _line.Length)
            {
                _line = base.ReadLine().Split(' ');
                _iterator = 0;
            }
            if (_line.Count() == 0) throw new IndexOutOfRangeException("Input string is empty");
            return Convert.ToInt64(_line[_iterator++]);
        }
    }
    // Not solved yet
    class ReberlandLinguistics349
    {
        private static SortedSet<string> _set = new SortedSet<string>();
        private static string _str;
        private static bool[] solved;
        public static void Main(string[] args)
        {
            using (FastScanner fs = new FastScanner(new BufferedStream(Console.OpenStandardInput())))
            using (StreamWriter writer = new StreamWriter(new BufferedStream(Console.OpenStandardOutput())))
            {
                _str = fs.ReadLine();
                solved = new bool[_str.Length];
                Find(_str.Length - 1, "");
                writer.WriteLine(_set.Count);
                foreach (string suffix in _set)
                {
                    writer.WriteLine(suffix);
                }
            }
        }
        public static void Find(int i, string prev)
        {
            if (solved[i]) return;
            if (i - 1 > 4)
            {
                string suffix = _str.Substring(i - 1, 2);
                if (suffix != prev)
                {
                    _set.Add(suffix);
                    Find(i - 2, suffix);
                }
            }
            if (i - 2 > 4)
            {
                string suffix = _str.Substring(i - 2, 3);
                if (suffix != prev)
                {
                    _set.Add(suffix);
                    Find(i - 3, suffix);
                }
            }
            solved[i] = true;
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AlgoTraining.Codeforces.C_s
{

    public class FastScanner : StreamReader
    {
        private string[] _line;
        private int _iterator;

        public FastScanner(Stream stream) : base(stream)
        {
            _line = null;
            _iterator = 0;
        }
        public int NextInt()
        {
            if (_line == null || _iterator >= _line.Length)
            {
                _line = base.ReadLine().Split(' ');
                _iterator = 0;
            }
            if (_line.Count() == 0) throw new IndexOutOfRangeException("Input string is empty");
            return Convert.ToInt32(_line[_iterator++]);
        }
        public long NextLong()
        {
            if (_line == null || _iterator >= _line.Length)
            {
                _line = base.ReadLine().Split(' ');
                _iterator = 0;
            }
            if (_line.Count() == 0) throw new IndexOutOfRangeException("Input string is empty");
            return Convert.ToInt64(_line[_iterator++]);
        }
    }
    // Not solved yet
    class ReberlandLinguistics349
    {
        private static SortedSet<string> _set = new SortedSet<string>();
        private static HashSet<string> _tempSet = new HashSet<string>();
        private static string _str;
        public static void Main(string[] args)
        {
            using (FastScanner fs = new FastScanner(new BufferedStream(Console.OpenStandardInput())))
            using (StreamWriter writer = new StreamWriter(new BufferedStream(Console.OpenStandardOutput())))
            {
                _str = fs.ReadLine();
                Find(_str.Length - 1);
                writer.WriteLine(_set.Count);
                foreach (string suffix in _set)
                {
                    writer.WriteLine(suffix);
                }
            }
        }
        public static void Find(int i)
        {
            if (i - 1 > 4)
            {
                string suffix = _str.Substring(i - 1, 2);
                if (!_tempSet.Contains(suffix))
                {
                    _tempSet.Add(suffix);
                    _set.Add(suffix);
                    Find(i - 2);
                    _tempSet.Remove(suffix);
                }
            }
            if (i - 2 > 4)
            {
                string suffix = _str.Substring(i - 2, 3);
                if (!_tempSet.Contains(suffix))
                {
                    _tempSet.Add(suffix);
                    _set.Add(suffix);
                    Find(i - 3);
                    _tempSet.Remove(suffix);
                }
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AlgoTraining.Codeforces.C_s
{

    public class FastScanner : StreamReader
    {
        private string[] _line;
        private int _iterator;

        public FastScanner(Stream stream) : base(stream)
        {
            _line = null;
            _iterator = 0;
        }
        public int NextInt()
        {
            if (_line == null || _iterator >= _line.Length)
            {
                _line = base.ReadLine().Split(' ');
                _iterator = 0;
            }
            if (_line.Count() == 0) throw new IndexOutOfRangeException("Input string is empty");
            return Convert.ToInt32(_line[_iterator++]);
        }
        public long NextLong()
        {
            if (_line == null || _iterator >= _line.Length)
            {
                _line = base.ReadLine().Split(' ');
                _iterator = 0;
            }
            if (_line.Count() == 0) throw new IndexOutOfRangeException("Input string is empty");
            return Convert.ToInt64(_line[_iterator++]);
        }
    }
    class ReberlandLinguistics349
    {
        public static void Main(string[] args)
        {
            using (FastScanner fs = new FastScanner(new BufferedStream(Console.OpenStandardInput())))
            using (StreamWriter writer = new StreamWriter(new BufferedStream(Console.OpenStandardOutput())))
            {
                string s = fs.ReadLine();
                SortedSet<string> set = new SortedSet<string>();
                if (s.Length > 6)
                {
                    for (int i = 6; i < s.Length; i++)
                    {
                        if (i == s.Length - 2) continue;
                        string temp = s.Substring(i - 1, 2);
                        if (!set.Contains(temp)) set.Add(temp);
                        if (i - 2 > 4)
                        {
                            temp = s.Substring(i - 2, 3);
                            if (!set.Contains(temp)) set.Add(temp);
                        }
                    }
                    writer.WriteLine(set.Count);
                    foreach (string suffix in set)
                    {
                        writer.WriteLine(suffix);
                    }
                }
                else
                {
                    writer.WriteLine(0);
                }
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AlgoTraining.Codeforces.C_s
{
    public class FastScanner : StreamReader
    {
        private string[] _line;
        private int _iterator;

        public FastScanner(Stream stream) : base(stream)
        {
            _line = null;
            _iterator = 0;
        }
        public int NextInt()
        {
            if (_line == null || _iterator >= _line.Length)
            {
                _line = base.ReadLine().Split(' ');
                _iterator = 0;
            }
            if (_line.Count() == 0) throw new IndexOutOfRangeException("Input string is empty");
            return Convert.ToInt32(_line[_iterator++]);
        }
        public long NextLong()
        {
            if (_line == null || _iterator >= _line.Length)
            {
                _line = base.ReadLine().Split(' ');
                _iterator = 0;
            }
            if (_line.Count() == 0) throw new IndexOutOfRangeException("Input string is empty");
            return Convert.ToInt64(_line[_iterator++]);
        }
    }
    class ReberlandLinguistics349
    {
        private static SortedSet<string> _set = new SortedSet<string>();
        private static HashSet<string> _tempSet = new HashSet<string>();
        private static string _str;
        private static bool[] solved;
        public static void Main(string[] args)
        {
            using (FastScanner fs = new FastScanner(new BufferedStream(Console.OpenStandardInput())))
            using (StreamWriter writer = new StreamWriter(new BufferedStream(Console.OpenStandardOutput())))
            {
                _str = fs.ReadLine();
                solved = new bool[_str.Length];
                Find(_str.Length - 1);
                writer.WriteLine(_set.Count);
                foreach (string suffix in _set)
                {
                    writer.WriteLine(suffix);
                }
            }
        }
        public static void Find(int i)
        {
            if (solved[i]) return;
            if (i - 1 > 4)
            {
                string suffix = _str.Substring(i - 1, 2);
                if (!_tempSet.Contains(suffix))
                {
                    _tempSet.Add(suffix);
                    _set.Add(suffix);
                    Find(i - 2);
                    _tempSet.Remove(suffix);
                }
            }
            if (i - 2 > 4)
            {
                string suffix = _str.Substring(i - 2, 3);
                if (!_tempSet.Contains(suffix))
                {
                    _tempSet.Add(suffix);
                    _set.Add(suffix);
                    Find(i - 3);
                    _tempSet.Remove(suffix);
                }
            }
            solved[i] = true;
        }
    }
}


#include <stdio.h>
#include <string.h>
char s[10000];
char suffix[10000][4];
int flag[10000][2];
int row=0;
void Get_suffix(int index,int length){
	int i;
	for(i=index;i<index+length;i++){
		suffix[row][i-index]=s[i];
	}
	row++;
	return;
}
int comp(const void* a, const void* b){
	return strcmp((char*)a,(char*)b);
}
int main(){
	int len;
	int i;
	int result;
	scanf("%s",s);
	len = strlen(s);
	if(len<7){
		printf("%d",0);
		return 0;
	}else if(len==7){
		printf("%d\n",1);
		printf("%s",s+5);
		return 0;
	}
	flag[len-2][0]=1;
	Get_suffix(len-2,2);
	flag[len-3][1]=1;
	Get_suffix(len-3,3);
	for(i=len-4;i>=5;i--){
		flag[i][0]=flag[i+2][1];
		if(s[i]!=s[i+2]||s[i+1]!=s[i+3])flag[i][0]|=flag[i+2][0];
		if(flag[i][0]==1)Get_suffix(i,2);
		flag[i][1]=flag[i+3][0];
		if(s[i]!=s[i+3]||s[i+1]!=s[i+4]||s[i+2]!=s[i+5])flag[i][1]|=flag[i+3][1];
		if(flag[i][1]==1)Get_suffix(i,3);
	}
	qsort(suffix,row,sizeof(suffix[0]),comp);
	for(i=0,result=row;i<row;i++)if(strcmp(suffix[i],suffix[i+1])==0)result--;
	printf("%d\n",result);
	for(i=0;i<row;i++)if(strcmp(suffix[i],suffix[i+1]))printf("%s\n",suffix[i]);
	return 0;
}


#include <stdio.h>
#include <string.h>
char s[10000];
char suffix[10000][4];
int flag[10000][2];
int row=0;
void Get_suffix2(int index){
	int i;
	for(i=index;i<index+2;i++){
		suffix[row][i-index]=s[i];
	}
	row++;
	return;
}
void Get_suffix3(int index){
	int i;
	for(i=index;i<index+3;i++){
		suffix[row][i-index]=s[i];
	}
	row++;
	return;
}
int comp(const void* a, const void* b){
	return strcmp((char*)a,(char*)b);
}
int main(){
	int len;
	int i;
	int result;
	scanf("%s",s);
	len = strlen(s);
	if(len<7){
		printf("%d",0);
		return 0;
	}else if(len==7){
		printf("%d\n",1);
		printf("%s",s+5);
		return 0;
	}
	flag[len-2][0]=1;
	Get_suffix2(len-2);
	flag[len-3][1]=1;
	Get_suffix3(len-3);
	for(i=len-4;i>=5;i--){
		flag[i][0]=flag[i+2][1];
		if(s[i]!=s[i+2]||s[i+1]!=s[i+3])flag[i][0]|=flag[i+2][0];
		if(flag[i][0]==1)Get_suffix2(i);
		flag[i][1]=flag[i+3][0];
		if(s[i]!=s[i+3]||s[i+1]!=s[i+4]||s[i+2]!=s[i+5])flag[i][1]|=flag[i+3][1];
		if(flag[i][1]==1)Get_suffix3(i);
	}
	qsort(suffix,row,sizeof(suffix[0]),comp);
	for(i=0,result=row;i<row;i++)if(strcmp(suffix[i],suffix[i+1])==0)result--;
	printf("%d\n",result);
	for(i=0;i<row;i++)if(strcmp(suffix[i],suffix[i+1]))printf("%s\n",suffix[i]);
	return 0;
}


#include <stdio.h>
#include <string.h>
char s[100000];
char suffix[100000][4];
int flag[100000][2];
int row=0;
void Get_suffix(int index,int length){
	int i;
	for(i=index;i<index+length;i++){
		suffix[row][i-index]=s[i];
	}
	row++;
	return;
}
int comp(const void* a, const void* b){
	return strcmp((char*)a,(char*)b);
}
int main(){
	int len;
	int i;
	int result;
	scanf("%s",s);
	len = strlen(s);
	if(len<7){
		printf("%d",0);
		return 0;
	}else if(len==7){
		printf("%d\n",1);
		printf("%s",s+5);
		return 0;
	}
	flag[len-2][0]=1;
	Get_suffix(len-2,2);
	flag[len-3][1]=1;
	Get_suffix(len-3,3);
	for(i=len-4;i>=5;i--){
		flag[i][0]=flag[i+2][1];
		if(s[i]!=s[i+2]||s[i+1]!=s[i+3])flag[i][0]|=flag[i+2][0];
		if(flag[i][0]==1)Get_suffix(i,2);
		flag[i][1]=flag[i+3][0];
		if(s[i]!=s[i+3]||s[i+1]!=s[i+4]||s[i+2]!=s[i+5])flag[i][1]|=flag[i+3][1];
		if(flag[i][1]==1)Get_suffix(i,3);
	}
	qsort(suffix,row,sizeof(suffix[0]),comp);
	for(i=0,result=row;i<row;i++)if(strcmp(suffix[i],suffix[i+1])==0)result--;
	printf("%d\n",result);
	for(i=0;i<row;i++)if(strcmp(suffix[i],suffix[i+1]))printf("%s\n",suffix[i]);
	return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int len,tot,ans;
char s[10010],anss[20010][4];
short f[10010][2];
int comp(const void *a,const void *b)
{
    return strcmp((char*)a,(char*)b);
}
void anscpy(int pos,int l)
{
    int i;
    tot++;
    for(i=pos;i<pos+l;i++) anss[tot][i-pos] = s[i];
}
int main()
{
    int i;
    scanf("%s",s+1);
    len = strlen(s+1);
    if(len<7) { printf("0"); return 0;}
    else if(len == 7) { printf("1\n%s",s+6); return 0;}
    f[len-1][0] = f[len-2][1] = 1;
    anscpy(len-1,2); anscpy(len-2,3);
    for(i=len-3;i>=6;i--)
    {
        f[i][0] = f[i+2][1];
        if(s[i]!=s[i+2]||s[i+1]!=s[i+3]) f[i][0] |= f[i+2][0];
        if(f[i][0]) anscpy(i,2);
        f[i][1] = f[i+3][0];
        if(s[i]!=s[i+3]||s[i+1]!=s[i+4]||s[i+2]!=s[i+5]) f[i][1] |= f[i+3][1];
        if(f[i][1]) anscpy(i,3);
    }
    qsort(anss+1,tot,sizeof(anss[0]),comp);
    for(i=1,ans=tot;i<=tot;i++) if(strcmp(anss[i],anss[i+1]) == 0) ans--;
    printf("%d\n",ans);
    for(i=1;i<=tot;i++) if(strcmp(anss[i],anss[i+1])) printf("%s\n",anss[i]);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int len,tot,ans;
char s[10010],anss[20010][4];
short f[10010][2];
int comp(const void *a,const void *b)
{
    return strcmp((char*)a,(char*)b);
}
void anscpy(int pos,int l)
{
    int i;
    tot++;
    for(i=pos;i<pos+l;i++) anss[tot][i-pos] = s[i];
}
int main()
{
    int i;
    scanf("%s",s+1);
    len = strlen(s+1);
    if(len<7) { printf("0"); return;}
    else if(len == 7) { printf("1\n%s",s[6]); return;}
    f[len-1][0] = f[len-2][1] = 1;
    anscpy(len-1,2); anscpy(len-2,3);
    for(i=len-3;i>=6;i--)
    {
        f[i][0] = f[i+2][1];
        if(s[i]!=s[i+2]||s[i+1]!=s[i+3]) f[i][0] |= f[i+2][0];
        if(f[i][0]) anscpy(i,2);
        f[i][1] = f[i+3][0];
        if(s[i]!=s[i+3]||s[i+1]!=s[i+4]||s[i+2]!=s[i+5]) f[i][1] |= f[i+3][1];
        if(f[i][1]) anscpy(i,3);
    }
    qsort(anss+1,tot,sizeof(anss[0]),comp);
    for(i=1,ans=tot;i<=tot;i++) if(strcmp(anss[i],anss[i+1]) == 0) ans--;
    printf("%d\n",ans);
    for(i=1;i<=tot;i++) if(strcmp(anss[i],anss[i+1])) printf("%s\n",anss[i]);
    return 0;
}


import java.util.Scanner;
import java.util.TreeSet;

public class C {

  static TreeSet<String> set = new TreeSet<>();

  public static void main(String[] args) throws Exception {
    Scanner in = new Scanner(System.in);
    char[] a = in.next().toCharArray();
    int n = a.length;
    boolean[][] dp = new boolean[n+1][2];

    dp[n][0] = dp[n][1] = true;
    dp[n-2][0] = true;
    dp[n-3][1] = true;
    for (int i = n-4; i >= 5; i--) {
      dp[i][0] = dp[i+2][1] || (i+3 < n && dp[i+2][0] && !(a[i]==a[i+2] && a[i+1] == a[i+3]));
      dp[i][1] = dp[i+3][0] || (i+5 < n && dp[i+3][1] && !(a[i]==a[i+3] && a[i+1] == a[i+4] && a[i+2] == a[i+5]));
    }

    for (int i = 5; i < n; i++) {
      if (dp[i][0])
        set.add("" + a[i] + a[i+1]);
      if (dp[i][1])
        set.add("" + a[i] + a[i+1] + a[i+2]);
    }
    System.out.println(set.size());
    for (String s : set) System.out.println(s);
  }

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Arrays;
import java.io.StringReader;
import java.util.Set;
import java.io.IOException;
import java.io.Reader;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Denis Nedelyaev
 */
public class Main {
    public static void main(String[] args) throws Exception {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC(in, out);
        solver.solve(1);
        out.close();
    }

    static class TaskC {
        private final FastScanner in;
        private final PrintWriter out;
        private String s;
        private boolean[][] visited;
        private Set<String> suffixes;

        public TaskC(FastScanner in, PrintWriter out) {
            this.in = in;
            this.out = out;
        }

        public void solve(int testNumber) throws IOException {
            s = in.next();
            suffixes = new HashSet<>();
            visited = new boolean[s.length() + 1][4];
            dfs(s.length(), 0);
            String[] ans = suffixes.toArray(new String[0]);
            Arrays.sort(ans);
            out.println(ans.length);
            for (String suf : ans) {
                out.println(suf);
            }
        }

        private void dfs(int n, int m) {
            if (visited[n][m]) {
                return;
            }
            visited[n][m] = true;
            String prevSuf = s.substring(n, n + m);
            for (int k = 2; k <= 3; k++) {
                if (n - k >= 5) {
                    String suf = s.substring(n - k, n);
                    if (!suf.equals(prevSuf)) {
                        suffixes.add(suf);
                        dfs(n - k, k);
                    }
                }
            }
        }

    }

    static class FastScanner {
        private final BufferedReader br;
        private String line;
        private int pos;

        public FastScanner(String s) throws IOException {
            this(new StringReader(s));
        }

        public FastScanner(InputStream is) throws IOException {
            this(new InputStreamReader(is, "UTF-8"));
        }

        public FastScanner(Reader reader) throws IOException {
            this(new BufferedReader(reader));
        }

        public FastScanner(BufferedReader reader) throws IOException {
            br = reader;
            line = br.readLine();
            pos = 0;
        }

        public String next() throws IOException {
            if (!skipWhitespace()) {
                return null;
            }

            int start = pos;

            while (pos < line.length()) {
                char c = line.charAt(pos);

                if (c == ' ' || c == '\t') {
                    break;
                }

                pos++;
            }

            return line.substring(start, pos);
        }

        private boolean skipWhitespace() throws IOException {
            while (line != null) {
                while (pos < line.length()) {
                    char c = line.charAt(pos);

                    if (c != ' ' && c != '\t') {
                        return true;
                    }

                    pos++;
                }

                line = br.readLine();
                pos = 0;
            }

            return false;
        }

    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
import java.io.IOException;
import java.io.InputStream;

public class Main {
    public static void main(String[] args) {

        File file = new File("in.txt");
        InputStream inputStream = null;
//        try {inputStream= new FileInputStream(file);} catch (FileNotFoundException ex){return;};
        inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

}

class TaskB {

    String word;
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        word = in.next().substring(5);
        int len = word.length()-1;

        Map<Integer,Boolean> dp2 = new HashMap<>();
        Map<Integer,Boolean> dp3 = new HashMap<>();

        Map<Integer,String> dp2sol = new HashMap<>();
        Map<Integer,String> dp3sol = new HashMap<>();

//        Initialize
        if(len>=0) {
            dp2.put(len, Boolean.FALSE);
            dp3.put(len, Boolean.FALSE);
        }

        if(len-1>=0) {
            dp2.put(len - 1, Boolean.TRUE);
            dp2sol.put(len - 1, word.substring(len - 1));
            dp3.put(len - 1, Boolean.FALSE);
        }

        if(len-2>=0) {
            dp2.put(len - 2, Boolean.FALSE);
            dp3.put(len - 2, Boolean.TRUE);
            dp3sol.put(len - 2, word.substring(len - 2));
        }

        for(int i = len-3; i >=0; i--){
            if(i>=0) {
                String suf = word.substring(i, i + 2);
                Boolean d2 = (dp2.get(i + 2) && !dp2sol.get(i + 2).equals(suf)) || dp3.get(i + 2);
                dp2.put(i, d2);
                if (d2) {
                    dp2sol.put(i, suf);
                }
                suf = word.substring(i, i + 3);
                Boolean d3 = (dp3.get(i + 3) && !dp3sol.get(i + 3).equals(suf)) || dp2.get(i + 3);
                dp3.put(i, d3);
                if (d3) {
                    dp3sol.put(i, suf);
                }
            }

        }

        Set<String>  suffixes = new HashSet<>();
        suffixes.addAll(dp2sol.values());
        suffixes.addAll(dp3sol.values());

        String[] l = suffixes.toArray(new String[suffixes.size()]);
        Arrays.sort(l);

        out.println(suffixes.size());

        StringBuilder sb = new StringBuilder();
        for(String s : l){
            sb.append(s + "\n");

        }
        out.println(sb);

//        out.println(Arrays.sort(suffixes.toArray()));

//        out.println()
//
//        out.println(dp2sol);
//        out.println(dp3sol);

    }

}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public String nextLine(){
        try {
            return reader.readLine();
        } catch (IOException e){
            throw new RuntimeException(e);
        }
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong() { return Long.parseLong(next()); }

}

class Pair<F, S> {
    public final F first;
    public final S second;

    public Pair(F first, S second) {
        this.first = first;
        this.second = second;
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof Pair)) {
            return false;
        }
        Pair<?, ?> p = (Pair<?, ?>) o;
        return Objects.equals(p.first, first) && Objects.equals(p.second, second);
    }

    @Override
    public int hashCode() {
        return (first == null ? 0 : first.hashCode()) ^ (second == null ? 0 : second.hashCode());
    }

}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
import java.io.IOException;
import java.io.InputStream;

public class Main {
    public static void main(String[] args) {

        File file = new File("in.txt");
        InputStream inputStream = null;
//        try {inputStream= new FileInputStream(file);} catch (FileNotFoundException ex){return;};
        inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

}

class TaskB {

    String word;
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        word = in.next().substring(5);
        int len = word.length()-1;

        Map<Integer,Boolean> dp2 = new HashMap<>();
        Map<Integer,Boolean> dp3 = new HashMap<>();

        Map<Integer,String> dp2sol = new HashMap<>();
        Map<Integer,String> dp3sol = new HashMap<>();

//        Initialize
        dp2.put(len,Boolean.FALSE);
        dp3.put(len,Boolean.FALSE);

        if(len-1>0) {
            dp2.put(len - 1, Boolean.TRUE);
            dp2sol.put(len - 1, word.substring(len - 1));
            dp3.put(len - 1, Boolean.FALSE);
        }

        if(len-2>0) {
            dp2.put(len - 2, Boolean.FALSE);
            dp3.put(len - 2, Boolean.TRUE);
            dp3sol.put(len - 2, word.substring(len - 2));
        }

        for(int i = len-3; i >=0; i--){
            if(i>0) {
                String suf = word.substring(i, i + 2);
                Boolean d2 = (dp2.get(i + 2) && !dp2sol.get(i + 2).equals(suf)) || dp3.get(i + 2);
                dp2.put(i, d2);
                if (d2) {
                    dp2sol.put(i, suf);
                }
                suf = word.substring(i, i + 3);
                Boolean d3 = (dp3.get(i + 3) && !dp3sol.get(i + 3).equals(suf)) || dp2.get(i + 3);
                dp3.put(i, d3);
                if (d3) {
                    dp3sol.put(i, suf);
                }
            }

        }

        Set<String>  suffixes = new HashSet<>();
        suffixes.addAll(dp2sol.values());
        suffixes.addAll(dp3sol.values());

        String[] l = suffixes.toArray(new String[suffixes.size()]);
        Arrays.sort(l);

        out.println(suffixes.size());

        StringBuilder sb = new StringBuilder();
        for(String s : l){
            sb.append(s + "\n");

        }
        out.println(sb);

//        out.println(Arrays.sort(suffixes.toArray()));

//        out.println()
//
//        out.println(dp2sol);
//        out.println(dp3sol);

    }

}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public String nextLine(){
        try {
            return reader.readLine();
        } catch (IOException e){
            throw new RuntimeException(e);
        }
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong() { return Long.parseLong(next()); }

}

class Pair<F, S> {
    public final F first;
    public final S second;

    public Pair(F first, S second) {
        this.first = first;
        this.second = second;
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof Pair)) {
            return false;
        }
        Pair<?, ?> p = (Pair<?, ?>) o;
        return Objects.equals(p.first, first) && Objects.equals(p.second, second);
    }

    @Override
    public int hashCode() {
        return (first == null ? 0 : first.hashCode()) ^ (second == null ? 0 : second.hashCode());
    }

}


#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <math.h>
#include <string>
#include <set>
#include <queue>
#include <map>

using namespace std;

typedef long long ll;

vector<int> d(500001);
vector<int> arr(500001);
string st;

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

int getnum(int m){

    int left = m;
    int right = st.size() - m + 1;

    return (d[right] - d[left - 1]);
}

int main(){

    cin >> st;

    int num = 0;

    for(int i = 1; i <= st.size(); i++){
        if(isvowel(st[i-1])) num++;
        d[i] = num;
    }

    int sz = st.size() + 1;

    for(int i = 1; i <= sz / 2; i++){
        arr[i] = arr[i-1] + getnum(i);
    }

    double rest = 0.0;

    for(int i = 1; i <= sz / 2; i++){
        double up = arr[i];
        double down = i;

        rest += up / down;
        down = st.size() - i + 1;
        if(st.size() - i + 1 != i)
            rest += up / down;
    }

    printf("%.9f",rest);

    return 0;
}


#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <math.h>
#include <string>
#include <set>
#include <queue>
#include <map>

using namespace std;

typedef long long ll;

vector<int> d(500001);
vector<double> arr(500001);
string st;

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

int getnum(int m){

    int left = m;
    int right = st.size() - m + 1;

    return (d[right] - d[left - 1]);
}

int main(){

    cin >> st;

    int num = 0;

    for(int i = 1; i <= st.size(); i++){
        if(isvowel(st[i-1])) num++;
        d[i] = num;
    }

    int sz = st.size() + 1;

    for(int i = 1; i <= sz / 2; i++){
        arr[i] = arr[i-1] + getnum(i);
    }

    double rest = 0.0;

    for(int i = 1; i <= sz / 2; i++){
        double up = arr[i];
        double down = i;

        rest += up / down;
        down = st.size() - i + 1;
        if(st.size() - i + 1 != i)
            rest += up / down;
    }

    printf("%.6f",rest);

    return 0;
}


#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <math.h>
#include <string>
#include <set>
#include <queue>
#include <map>

using namespace std;

typedef long long ll;

vector<int> d(500001);
vector<int> arr(500001);
string st;

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

int getnum(int m){

    int left = m;
    int right = st.size() - m + 1;

    return (d[right] - d[left - 1]);
}

int main(){

    cin >> st;

    int num = 0;

    for(int i = 1; i <= st.size(); i++){
        if(isvowel(st[i-1])) num++;
        d[i] = num;
    }

    int sz = st.size() + 1;

    for(int i = 1; i <= sz / 2; i++){
        arr[i] = arr[i-1] + getnum(i);
    }

    double rest = 0.0;

    for(int i = 1; i <= sz / 2; i++){
        double up = arr[i];
        double down = i;

        rest += up / down;
        down = st.size() - i + 1;
        if(st.size() - i + 1 != i)
            rest += up / down;
    }

    printf("%.6f",rest);

    return 0;
}


#include <iostream>
#include <stdio.h>
#include <string>

using namespace std;

int f[100005];

int main()
{
	string s;
	cin >> s;
	for (int i = 1; i <= s.size(); i++)
		f[i] = (s[i - 1] == 'I' || s[i - 1] == 'O' || s[i - 1] == 'E' || s[i - 1] == 'A' || s[i - 1] == 'U' || s[i - 1] == 'Y');
	for (int i = 1; i <= s.size(); i++)
		f[i] = f[i - 1] + f[i];
	int cur = 0;
	long double ans = 0;
	for (int i = 1; i <= s.size(); i++)
		cur += (f[s.size() - i + 1] - f[i - 1]), ans += (long double)cur / (long double)i;
	printf ("%.10Lf", ans);
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <string>

using namespace std;

long long f[500005];

int main()
{
	string s;
	cin >> s;
	for (int i = 1; i <= s.size(); i++)
		f[i] = (s[i - 1] == 'I' || s[i - 1] == 'O' || s[i - 1] == 'E' || s[i - 1] == 'A' || s[i - 1] == 'U' || s[i - 1] == 'Y');
	for (int i = 1; i <= s.size(); i++)
		f[i] = f[i - 1] + f[i];
	long long cur = 0;
	long double ans = 0;
	for (int i = 1; i <= s.size(); i++)
		cur += (f[s.size() - i + 1] - f[i - 1]), ans += (long double)cur / (long double)i;
	printf ("%.10Lf", ans);
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <string>

using namespace std;

int f[500005];

int main()
{
	string s;
	cin >> s;
	for (int i = 1; i <= s.size(); i++)
		f[i] = (s[i - 1] == 'I' || s[i - 1] == 'O' || s[i - 1] == 'E' || s[i - 1] == 'A' || s[i - 1] == 'U' || s[i - 1] == 'Y');
	for (int i = 1; i <= s.size(); i++)
		f[i] = f[i - 1] + f[i];
	int cur = 0;
	long double ans = 0;
	for (int i = 1; i <= s.size(); i++)
		cur += (f[s.size() - i + 1] - f[i - 1]), ans += (long double)cur / (long double)i;
	printf ("%.10Lf", ans);
	return 0;
}


#include <iostream>
#include <cstring>
#include <cstdio>
#include <string>
#include <sstream>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>
#include <ctime>

using namespace std;

char str[500005];
int cnt[500005],n;

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

int main() {
#ifdef LOCAL
    freopen("input.txt","r",stdin);
#endif
    scanf("%s",str+1), n = strlen(str+1);

    for(int i=1;i<=n;++i) cnt[i] = cnt[i-1] + isvowel(str[i]);

    long long prv = cnt[n];
    double ans = (double)prv / n;

    for(int i=n-1;i>=1;--i) {
        prv -= cnt[n-i];
        prv += cnt[i];
        ans += (double)prv / i;
    } printf("%.10lf\n",ans);

}


from itertools import accumulate
vowels = set('AIUEOY')
s = input()
n = len(s)
vs = list(accumulate(0 if i == 0 else 1 / i for i in range(n + 1)))
r = 0
v = 0
for i in range(n):
    v += vs[n - i] - vs[i]
    if s[i] in vowels:
        r += v
print(r)


m, t = 0, [q in 'IEAOUY' for q in input()]
d = s = sum(t)
for k in range(len(t), 0, -1):
    m += d / k
    s -= t[k - 1] + t[-k]
    d += s
print(m)


"""
Codeforces Contest 289 Div 2 Problem E

Author  : chaotic_iak
Language: Python 3.4.2
"""

################################################### SOLUTION

def main():
    s = read(0)
    m = [1 if i in "AEIOUY" else 0 for i in s]
    n = len(m)
    m1 = [0]
    m2 = [0]
    for i in range(n):
        m1.append(m1[-1] + 1/(1+i))
        m2.append(m2[-1] + 1/(n-i))
    mlast = m1[-1]
    for i in range(1,n+1):
        m1[i] = m1[i-1]+m1[i]
        m2[i] = m2[i-1]+m2[i]
    sm = 0
    for i in range(n):
        sm += m[i] * ((i+1)*mlast - m1[i] - m2[i])
    print(sm)

#################################################### HELPERS

def read(mode=2):
    # 0: String
    # 1: List of strings
    # 2: List of integers
    inputs = input().strip()
    if mode == 0: return inputs
    if mode == 1: return inputs.split()
    if mode == 2: return list(map(int, inputs.split()))

def write(s="\n"):
    if s is None: s = ""
    if isinstance(s, list): s = " ".join(map(str, s))
    s = str(s)
    print(s, end="")

write(main())


s = input()
lst=[0]
for i in range(1,len(s)+1):
    lst.append(lst[-1]+1/i)
x=lst[len(s)]
res=0
for i,j in enumerate(s):
    if j in 'AEIOUY':
        res+=x
    x+=lst[len(s)-i-1]-lst[i+1]
print(res)


string = input().strip()
s = [0]
for c in string:
    s.append(s[-1] + (c in 'IEAOUY'))
result, cur = 0, 0
for l in range(1, len(string) + 1):
    cur += s[-l] - s[l - 1]
    result += cur / l
print(result)


song = input()
le = len(song)
su = 0
for x in range(1,le+1):
    su += 1/x
l = [0]*le
l[0] = su
diff = su
for x in range(1,int((le+1)/2)):
    diff -= (1/x + 1/(le+1-x))
    l[x] = l[x-1] + diff
for x in range(int((le+1)/2),le):
    l[x] = l[le-1-x]

ans = 0
for x in range(le):
    let = song[x]
    if let in ['A','E','I','O','U','Y']:
        ans += l[x]

print(ans)


song = input()
from decimal import *
le = len(song)
su = 0
for x in range(1,le+1):
    su += Decimal(1)/Decimal(x)
l = [0]*le
l[0] = su
diff = su
for x in range(1,int((le+1)/2)):
    diff -= (Decimal(1)/Decimal(x) + Decimal(1)/Decimal(le+1-x))
    l[x] = l[x-1] + diff
for x in range(int((le+1)/2),le):
    l[x] = l[le-1-x]

ans = 0
for x in range(le):
    let = song[x]
    if let in ['A','E','I','O','U','Y']:
        ans += l[x]

print(ans)


ss = list(map(lambda c: c in "IEAOUY", input()))

n = len(ss)
w = [0] * n

for i in range(1, n+1):
    w[0] += 1 / i
w[n-1] = w[0]

sigma = w[0]

for i in range(1, (n - 1) // 2 + 1):
    sigma -= 1 / i + 1 / (n + 1 - i)
    w[n-i-1] = w[i] = w[i-1] + sigma

ans = 0
for i in range(0, n):
    ans += ss[i] * w[i]

print(ans)


i = input()
l = len(i)
run = [0]*(l+1)
for a in range(1, l+1):
    if i[a-1] in ['A', 'E', 'I', 'O', 'U', 'Y']:
        run[a] = run[a-1] + 1
    else:
        run[a] = run[a-1]
tot = 0
for i in range(1, l+1):
    for j in range(i, l+1):
        tot += (run[j]-run[i-1])/(j-i+1)


i = input()
l = len(i)
run = [0]*(l+1)
for a in range(1, l+1):
    if i[a-1] in ['A', 'E', 'I', 'O', 'U', 'Y']:
        run[a] = run[a-1] + 1
    else:
        run[a] = run[a-1]
tot = 0
for i in range(1, l+1):
    for j in range(i, l+1):
        tot += (run[j]-run[i-1])/(j-i+1)
print(tot)


def sum_vowels(s, i, j):
	ans = 0

	for index in range(i, j + 1):
		if s[index] in "AEIOUY":
			ans += 1

	return ans

if __name__ == "__main__":
	s = input()
	n = len(s)

	ans = 0

	num = 0
	den_inv = 0
	for i in range(int(n / 2)):
		num += sum_vowels(s, i, n - 1 - i)
		den_inv = 1 / (i + 1) + 1 / (n - i)

		ans += num * den_inv

	if (n % 2 == 1):
		i = int(n / 2)
		num += sum_vowels(s, i, i)
		den_inv = 1 / (i + 1)

		ans += num * den_inv

	print("{:.6f}".format(ans))


def sum_vowels(s, i, j):
	ans = 0

	for index in range(i, j + 1):
		if s[index] in "AEIOUY":
			ans += 1

	return ans

if __name__ == "__main__":
	s = input()
	n = len(s)

	ans = 0

	num = 0
	den_inv = 0
	prev_sum = sum_vowels(s, 0, n - 1)
	for i in range(int(n / 2)):
		num += prev_sum
		den_inv = 1 / (i + 1) + 1 / (n - i)

		ans += num * den_inv

		if s[i] in "AEIOUY": prev_sum -= 1
		if s[n - 1 - i] in "AEIOUY": prev_sum -= 1

	if (n % 2 == 1):
		i = int(n / 2)
		num += sum_vowels(s, i, i)
		den_inv = 1 / (i + 1)

		ans += num * den_inv

	print("{:.6f}".format(ans))


arr = []
for i in input():
    arr.append(i)
n = len(arr)
res = 0
add = [0] * (n + 1)
add[n] = 1 / n
for i in range(n - 1, 0, -1):
    add[i] = add[i + 1] + 1 / i
for i in range(n):
    if arr[i] in ['I', 'E', 'A', 'O', 'U', 'Y']:
        x = min(i, n - i - 1)
        y = max(i, n - i - 1)
        res += x + 1
        res += (x + 1) * (add[x + 2] - add[y + 1])
        res += (n + 1) * add[y + 1] - (n - y)
print(res)


arr = []
for i in input():
    arr.append(i)
n = len(arr)
res = 0
add = [0] * (n + 10)
add[n] = 1 / n
for i in range(n - 1, 0, -1):
    add[i] = add[i + 1] + 1 / i
for i in range(n):
    if arr[i] in ['I', 'E', 'A', 'O', 'U', 'Y']:
        x = min(i, n - i - 1)
        y = max(i, n - i - 1)
        res += x + 1
        res += (x + 1) * (add[x + 2] - add[y + 1])
        res += (n + 1) * add[y + 1] - (n - y)
print(res)


arr = []
for i in input():
    arr.append(i)
n = len(arr)
res = 0
add = [0] * (n + 1)
add[n] = 1 / n
for i in range(n - 1, 0, -1):
    add[i] = add[i + 1] + 1 / i
print(add)
for i in range(n):
    if arr[i] in ['I', 'E', 'A', 'O', 'U', 'Y']:
        x = min(i, n - i - 1)
        y = max(i, n - i - 1)
        res += x + 1
        res += (x + 1) * (add[x + 2] - add[y + 1])
        res += (n + 1) * add[y + 1] - (n - y)
print(res)


from math import fsum

def main():
    l, x = [0, 0], 0
    for c in input():
        if c in ('I', 'E', 'A', 'O', 'U', 'Y'):
            x += 1
        l.append(x)
    n = l[-1]
    res = [float(n)]
    for m in range(2, len(l) - 1):
        n += l[-m] - l[m]
        res.append(n / m)
    print('{:.7f}'.format(fsum(res)))

if __name__ == '__main__':
    main()


def main():
    s = input()
    n = len(s)
    b = [1.0 / (i + 1) for i in range(n)]
    d = [(n - i) / (i + 1) for i in range(n)]
    d = d[::-1]
    for i in range(1, n):
        b[i] += b[i - 1]
        d[i] += d[i - 1]
    res = 0.0
    for i in range(n):
        if not(s[i] == 'I' or s[i] == 'E' or s[i] == 'A' or s[i] == 'O' or s[i] == 'U' or s[i] == 'Y'):
            continue
        z = [i + 1, n - i]
        z.sort()
        res += z[0] * (b[z[1] - 2] - b[z[0] - 1] + 1) + d[z[0] - 1]
    print(res)
main()


def main():
    s = input()
    n = len(s)
    b = [1.0 / (i + 1) for i in range(n)]
    d = [(n - i) / (i + 1) for i in range(n)]
    d = d[::-1]
    for i in range(1, n):
        b[i] += b[i - 1]
        d[i] += d[i - 1]
    res = 0.0
    for i in range(n):
        if not(s[i] == 'I' or s[i] == 'E' or s[i] == 'A' or s[i] == 'O' or s[i] == 'U' or s[i] == 'Y'):
            continue
        z = [i + 1, n - i]
        z.sort()
        res += z[0] * (b[z[1] - 2] - b[z[0] - 1] + 1) + d[z[0] - 1]
    if len(s) == 1 and res > 0:
        res -= 1
    print(res)
main()


d=gets
n=d.size-1
sum,ans,now=[0],0,0
n.times{|i|sum[i+1]=sum[i]+1.0/(i+1)}
(0...n).each do |i|
  now+=sum[-i-1]-sum[i]
  ans+=now if 'IEAOUY'[d[i]]
end
p ans


v=['I','E','A','O','U','Y']
d=['Q']+gets.split(//)
d.pop
n=d.size-1
sum,ans,now=[0.0],0.0,0.0
n.times{|i|sum[i+1]=sum[i]+1.0/(i+1)}
(1..n/2).each do |i|
  now+=sum[-i]-sum[i-1]
  ans+=now if v.include?d[i]
  ans+=now if v.include?d[-i]
end
now+=sum[n/2+1]-sum[n/2]
ans+=now if n.odd?&&v.include?(d[n/2+1])
p ans


gets
sum,a,now,n=[0],0,0,$_.size-1
n.times{|i|sum[i+1]=sum[i]+1.0/(i+1)}
(0...n).each do |i|
  now+=sum[-i-1]-sum[i]
  a+=now if 'IEAOUY'[$_[i]]
end
p a


d=gets.split(//)
d.pop
n=d.size
sum,ans,now=[0],0,0
n.times{|i|sum[i+1]=sum[i]+1.0/(i+1)}
(0...n).each do |i|
  now+=sum[-i-1]-sum[i]
  ans+=now if 'IEAOUY'[d[i]]
end
p ans


from sys import stdin
s = stdin.readline().strip()
l = len(s)
ans = 0.0
t = [0.0]
for i in xrange(1, l + 1):
    t.append(t[-1] + 1.0 / i)
k = t[l]
for i, c in enumerate(s):
    if c in 'IEAOUY':
        ans += k
    k += -t[l] + t[l-i-1] + t[l] - t[i+1]
print "%.12f" % ans


vow="AEIOUY"
s=raw_input()
l=len(s)
s="#"+s
f=[0]*(l+1)
for i in range(1,l+1):
    f[i]=f[i-1]+(s[i] in vow)
print f
ans,x=0.0,0
for i in range(1,l+1):
    x+=f[l-i+1]-f[i-1]
    print x
    ans+=float(x)/float(i)
print "%.7f"%ans


vow="AEIOUY"
s=raw_input()
l=len(s)
s="#"+s
f=[0]*(l+1)
for i in range(1,l+1):
    f[i]=f[i-1]+(s[i] in vow)
ans,x=0.0,0
for i in range(1,l+1):
    x+=f[l-i+1]-f[i-1]
    ans+=float(x)/float(i)
print "%.7f"%ans


vow="AEIOUY"
s='BYOB'
l=len(s)
s="#"+s
f=[0]*(l+1)
for i in range(1,l+1):
    f[i]=f[i-1]+(s[i] in vow)
print f
ans,x=0.0,0
for i in range(1,l+1):
    x+=f[l-i+1]-f[i-1]
    print x
    ans+=float(x)/float(i)
print "%.7f"%ans


a=raw_input()
n=len(a)
s='AEIOUY'
p=0
for i in xrange(n):
	if a[i] in s:
		for j in xrange(i+2,n+1):
			p+=min(i+1,n-j+1)/(j+0.0)
		for j in xrange(1,i+2):
			p+=min(j,n-i)/(j+0.0)
print "%.7f"%round(p,7)


S = raw_input()
V = ['A','E', 'I', 'O', 'U', 'Y']
table = [0 for i in range(len(S)+1)]
for i in xrange(0, len(S)):
    if S[i] in V:
        table[i+1] = table[i] + 1
    else:
        table[i+1] = table[i]
N = len(S)
ans = 0.0
left, right = 1, N
total = 0
while left<=right:
    total += table[right]-table[left-1]
    ans += float(total)/float(left)
    if left == right:
        break
    ans += float(total)/float(right)
    left += 1
    right -= 1
print "%.6f" % ans


vowels = set("IEAOUY")
def prefsum(s):
    res = [0]
    cnt = 0
    for c in s:
        cnt += c in vowels
        res.append(cnt)
    return res

s = raw_input()
psum = prefsum(s)
vs = [0] * len(s)
v = psum[len(s)] - psum[0]
vs[0] = v
vs[len(s) - 1] = v
for i in range(1, (len(s) + 1) / 2):
    v += psum[len(s) - i] - psum[i]
    vs[i] = v
    vs[len(s) - i - 1] = v
print vs
res = 0
for i in range(len(s)):
    res += vs[i] / float(i + 1)
print res


vowels = set("IEAOUY")
def prefsum(s):
    res = [0]
    cnt = 0
    for c in s:
        cnt += c in vowels
        res.append(cnt)
    return res

s = raw_input()
psum = prefsum(s)
vs = [0] * len(s)
v = psum[len(s)] - psum[0]
vs[0] = v
vs[len(s) - 1] = v
for i in range(1, (len(s) + 1) / 2):
    v += psum[len(s) - i] - psum[i]
    vs[i] = v
    vs[len(s) - i - 1] = v
res = 0
for i in range(len(s)):
    res += vs[i] / float(i + 1)
print res


vow="AEIOUY"
s=raw_input()
l=len(s)
s="#"+s
f=[0]*(l+1)
for i in range(1,l+1):
    f[i]=f[i-1]+(s[i] in vow)
ans,x=0.0,0
for i in range(1,l+1):
    x+=f[l-i+1]-f[i-1]
    ans+=float(x)/float(i)
print "%.9f"%ans


s = raw_input()

n = len(s)

vowel_set = {'I', 'E', 'A', 'O', 'U', 'Y'}

pre = [0] * (n + 1)
for i in range(len(s)):
    pre[i + 1] = pre[i] + (s[i] in vowel_set)

res = pre[n]
lastv = 0
for l in range(2, n + 1):
    curv = lastv + pre[l - 1] + (pre[n] - pre[n - l + 1])
    res += float(pre[n] * l - curv) / l
    lastv = curv

print '%.8f' % res


VOWELS = list('AEIOUY')
N = 500010

ds = [0 for i in xrange(N)]

for i in xrange(1, N):
    ds[i] = ds[i - 1] + 1.0 / i

S = raw_input()
n = len(S)
d = 0
ans = 0

for i, c in enumerate(S):
    d += ds[n - i] - ds[i]
    if c in VOWELS:
        ans += d

print ans


As = [0 for i in xrange(500001)]
Bs = [0 for i in xrange(500001)]

if __name__ == '__main__':
    s = raw_input()
    l = len(s)

    ans = 0

    for i in xrange(l):
        c = s[i]
        if c not in ['A', 'E', 'I', 'O', 'U', 'Y']:
            continue

        (left, right) = i, l - i - 1

        As[l] += 1
        As[max(left, right)] -= 1

        Bs[max(left, right)] += min(left, right) + 1
        Bs[min(left, right)] -= min(left, right) + 1

        ans += max(1, min(left,right))

    for i in xrange(l, 1, -1):
        if i + 1 <= l:
            As[i] += As[i + 1]
            Bs[i] += Bs[i + 1]
        ans += 1.0 * As[i] * (l - i + 1) / i
        ans += 1.0 * Bs[i] / i

    print ans


VOVELS = list('AEIOUY')
As = [0 for i in xrange(500001)]
Bs = [0 for i in xrange(500001)]

if __name__ == '__main__':
    s = raw_input()
    l = len(s)

    ans = 0

    for i in xrange(l):
        c = s[i]
        if c not in VOVELS:
            continue

        (left, right) = i, l - i - 1

        As[l] += 1
        As[max(left, right)] -= 1

        Bs[max(left, right)] += min(left, right) + 1
        Bs[min(left, right)] -= min(left, right) + 1

        ans += max(1, min(left,right))

    for i in xrange(l, 1, -1):
        if i + 1 <= l:
            As[i] += As[i + 1]
            Bs[i] += Bs[i + 1]
        ans += 1.0 * As[i] * (l - i + 1) / i
        ans += 1.0 * Bs[i] / i

    print ans


VOVELS = set('AEIOUY')

if __name__ == '__main__':
    s = raw_input()
    l = len(s)

    As = [0 for i in xrange(l + 1)]
    Bs = [0 for i in xrange(l + 1)]
    Cs = [0 for i in xrange(l + 1)]
    ans = 0

    for i, c in enumerate(s):
        if c not in VOVELS:
            continue

        (left, right) = i, l - i - 1

        As[l] += 1
        As[max(left, right)] -= 1

        Bs[max(left, right)] += min(left, right) + 1
        Bs[min(left, right)] -= min(left, right) + 1

        ans += max(1, min(left,right))

    for i in xrange(l, 1, -1):
        if i + 1 <= l:
            As[i] += As[i + 1]
        ans += 1.0 * As[i] * (l - i + 1) / i

    for i in xrange(l, 1, -1):
        if i + 1 <= l:
            Bs[i] += Bs[i + 1]
        ans += 1.0 * Bs[i] / i

    print ans


VOVELS = list('AEIOUY')
As = [0 for i in xrange(500000)]
Bs = [0 for i in xrange(500000)]

if __name__ == '__main__':
    s = raw_input()
    l = len(s)

    ans = 0

    for i in xrange(l):
        c = s[i]
        if c not in VOVELS:
            continue

        (left, right) = i, l - i - 1

        As[l] += 1
        As[max(left, right)] -= 1

        Bs[max(left, right)] += min(left, right) + 1
        Bs[min(left, right)] -= min(left, right) + 1

        ans += max(1, min(left,right))

    for i in xrange(l, 1, -1):
        if i + 1 <= l:
            As[i] += As[i + 1]
            Bs[i] += Bs[i + 1]
        ans += 1.0 * As[i] * (l - i + 1) / i
        ans += 1.0 * Bs[i] / i

    print ans


VOVELS = set('AEIOUY')

if __name__ == '__main__':
    s = raw_input()
    l = len(s)

    As = [0 for i in xrange(l + 1)]
    Bs = [0 for i in xrange(l + 1)]
    ans = 0

    for i, c in enumerate(s):
        if c not in VOVELS:
            continue

        (left, right) = i, l - i - 1

        As[l] += 1
        As[max(left, right)] -= 1

        Bs[max(left, right)] += min(left, right) + 1
        Bs[min(left, right)] -= min(left, right) + 1

        ans += max(1, min(left,right))

    for i in xrange(l, 1, -1):
        if i + 1 <= l:
            As[i] += As[i + 1]
            Bs[i] += Bs[i + 1]
        ans += 1.0 * As[i] * (l - i + 1) / i
        ans += 1.0 * Bs[i] / i

    print ans


VOVELS = set('AEIOUY')

if __name__ == '__main__':
    s = raw_input()
    l = len(s)

    As = [0 for i in xrange(l + 1)]
    Bs = [0 for i in xrange(l + 1)]
    Cs = [0 for i in xrange(l + 1)]
    ans = 0

    for i, c in enumerate(s):
        if c not in VOVELS:
            continue

        (left, right) = i, l - i - 1

        As[l] += 1
        As[max(left, right)] -= 1

        Bs[max(left, right)] += min(left, right) + 1
        Bs[min(left, right)] -= min(left, right) + 1

        Cs[min(left,right)] += 1

        ans += 1

    for i in xrange(l, 1, -1):
        if i + 1 <= l:
            As[i] += As[i + 1]
        ans += 1.0 * As[i] * (l - i + 1) / i

    for i in xrange(l, 1, -1):
        if i + 1 <= l:
            Bs[i] += Bs[i + 1]
        ans += 1.0 * Bs[i] / i

    for i in xrange(l, 1, -1):
        if i + 1 <= l:
            Cs[i] += Cs[i + 1]
        ans += 1.0 * Cs[i] * i / i

    print ans


title=raw_input("")
title=title.upper()

def vowelValue(s) :
    count=0
    for i in range(len(s)) :
        count+=isVowel(s[i])
    return float(count)

def isVowel(c) :
    vowels=['A','E','I','O','U','Y']
    if c in vowels :
        return 1
    return 0

output=0.0
for i in range(len(title)) :
    j=i
    while j<=len(title) :
        sub=title[i:j]
        if i!=j :
            output+=vowelValue(sub)/len(sub)
        j+=1
    i+=1

print(output)


title=raw_input("")
title=title.upper()
titleLen=len(title)

cost=[0.0]
for i in xrange(1,titleLen+1) :
    cost.append(cost[-1]+1.0/i)
temp=cost[titleLen]

output=0.0
for i,ch in enumerate(title) :
    if ch in 'AEIOUY' :
        output+=temp
    temp+=cost[titleLen-i-1]-cost[i+1]
print(output)


/* practice with Dukkha */
#include <stdio.h>
#include <string.h>

#define N	500000

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

int main() {
	static char cc[N + 1];
	static double hh[N + 1];
	int n, i;
	double ans, h;

	scanf("%s", cc);
	n = strlen(cc);
	for (i = 1; i <= n; i++)
		hh[i] = hh[i - 1] + 1.0 / i;
	ans = 0, h = 0;
	for (i = 0; i < n; i++) {
		h += hh[n - i] - hh[i];
		if (vowel(cc[i]))
			ans += h;
	}
	printf("%f\n", ans);
	return 0;
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Codeforces
{

    class Program
    {
        public static readonly int MOD = Convert.ToInt32(1e9 + 7);
        public static readonly int oo = Convert.ToInt32(1e9);
        public static readonly long OO = Convert.ToInt64(1e18);

        static void Main(string[] args)
        {
            String title = Console.ReadLine();
            int len = title.Length;
            bool[] vowels = new bool[256];
            foreach (char c in "AEIOUY")
            {
                vowels[c] = true;
            }

            long[] addRange = new long[len + 10];
            long[] add = new long[len + 10];
            for (int i = 1; i <= len; i++)
            {
                if (vowels[title[i - 1]]) {
                    add[1]++;
                    add[len + 1]--;
                    if (i > 1 && i < len)
                    {
                        addRange[2]++;
                        addRange[i + 2]--;
                        addRange[len - i + 2]--;
                    }
                }
            }

            for (int i = 1; i <= len; i++)
            {
                addRange[i] += addRange[i - 1];

                add[i] += add[i - 1] + addRange[i];
            }

            double ans = 0;
            for (int i = 1; i <= len; i++)
            {
                ans += 1.0 * add[i] / i;
            }
            Console.WriteLine(ans);
        }

    }

}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Codeforces
{

    class Program
    {
        public static readonly int MOD = Convert.ToInt32(1e9 + 7);
        public static readonly int oo = Convert.ToInt32(1e9);
        public static readonly long OO = Convert.ToInt64(1e18);

        static void Main(string[] args)
        {
            String title = Console.ReadLine();
            int len = title.Length;
            bool[] vowels = new bool[256];
            foreach (char c in "AEIOUY")
            {
                vowels[c] = true;
            }

            long[] addRange = new long[len + 10];
            long[] add = new long[len + 10];
            for (int i = 1; i <= len; i++)
            {
                if (vowels[title[i - 1]]) {
                    if (i == 1 || i == len)
                    {
                        add[1]++;
                        add[len + 1]--;
                    } else
                    {
                        add[1]++;
                        add[i + 1]--;
                        addRange[2]++;
                        addRange[i + 2]--;
                        addRange[len - i + 2]--;
                    }
                }
            }

            for (int i = 1; i <= len; i++)
            {
                addRange[i] += addRange[i - 1];

                add[i] += add[i - 1] + addRange[i];
            }

            double ans = 0;
            for (int i = 1; i <= len; i++)
            {
                ans += 1.0 * add[i] / i;
            }
            Console.WriteLine(ans);
        }

    }

}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Codeforces
{

    class Program
    {
        public static readonly int MOD = Convert.ToInt32(1e9 + 7);
        public static readonly int oo = Convert.ToInt32(1e9);
        public static readonly long OO = Convert.ToInt64(1e18);

        static void Main(string[] args)
        {
            String title = Console.ReadLine();
            int len = title.Length;
            bool[] vowels = new bool[256];
            foreach (char c in "AEIOUY")
            {
                vowels[c] = true;
            }

            int[] addRange = new int[len + 10];
            int[] add = new int[len + 10];
            for (int i = 1; i <= len; i++)
            {
                if (vowels[title[i - 1]]) {
                    if (i == 1 || i == len)
                    {
                        add[1]++;
                        add[len + 1]--;
                    } else
                    {
                        add[1]++;
                        add[i + 1]--;
                        addRange[2]++;
                        addRange[i + 2]--;
                        addRange[len - i + 2]--;
                    }
                }
            }

            for (int i = 1; i <= len; i++)
            {
                addRange[i] += addRange[i - 1];

                add[i] += add[i - 1] + addRange[i];
            }

            double ans = 0;
            for (int i = 1; i <= len; i++)
            {
                ans += 1.0 * add[i] / i;
            }
            Console.WriteLine(ans);
        }

    }

}


As = [0 for i in xrange(500001)]
Bs = [0 for i in xrange(500001)]

if __name__ == '__main__':
    s = raw_input()
    l = len(s)

    ans = 0

    for i in xrange(l):
        c = s[i]
        if c not in ('A', 'E', 'I', 'O', 'U', 'Y'):
            continue

        (left, right) = i, l - i - 1

        As[l] += 1
        As[max(left, right)] -= 1

        Bs[max(left, right)] += min(left, right) + 1
        Bs[min(left, right)] -= min(left, right) + 1

        ans += max(1, min(left,right))

    for i in xrange(l, 1, -1):
        if i + 1 <= l:
            As[i] += As[i + 1]
            Bs[i] += Bs[i + 1]
        ans += 1.0 * (As[i] * (l - i + 1) + Bs[i]) / i

    print ans


def find(num,l):
    t = 0
    if l %2 == 0:
        if num<=l/2-1:
            return fun[num]
        else:
            return fun[l-num-1]
    else:
        if num <=l/2:
            return fun[num]
        else:
            return fun[l-num-1]

i = raw_input()
l = len(i)
s = 0
fun = []
li = []
total = 0
for num in range(1,l+1):
    total += 1.0/num
    li.append(1.0/num)
fun.append(total)
if l%2 ==0:
    for num in range(0,l/2-1):
        li= li[1:len(li)-1]
        fun.append(sum(li)+fun[num])
if l%2 ==1:
    for num in range(0,l/2):
        li= li[1:len(li)-1]
        fun.append(sum(li)+fun[num])

for k in range(l):
    if i[k] in ['A','E','I','O','U','Y']:
        s += find(k,l)
print s


def find(num,l):
    t = 0
    if l %2 == 0:
        if num<=l/2-1:
            return fun[num]
        else:
            return fun[l-num-1]
    else:
        if num <=l/2:
            return fun[num]
        else:
            return fun[l-num-1]

i = raw_input()
l = len(i)
s = 0
fun = []
total = 0
for num in range(1,l+1):
    total += 1.0/num
fun.append(total)
if l%2 ==0:
    start = 1
    end = l
    for num in range(0,l/2-1):
        li= 1.0/ start+1.0/end
        total -= li
        start +=1
        end -=1
        fun.append(fun[num]+total)
if l%2 ==1:
    start = 1
    end = l
    for num in range(0,l/2):
        li= 1.0/ start+1.0/end
        start +=1
        end -=1
        total -= li
        fun.append(fun[num]+total)

for k in range(l):
    if i[k] in ['A','E','I','O','U','Y']:
        s += find(k,l)
print s


from itertools import accumulate
vowels = set('AIUEOY')
s = input()
n = len(s)
vs = list(accumulate(0 if i == 0 else 1 / i for i in range(n + 1)))
r = 0
v = 0
for i in range(n):
    v += vs[n - i] - vs[i]
    if s[i] in vowels:
        r += v
print(r)


word = input()
n = len(word)
def vowel(x):
    if x in ["A","E","I","O","U","Y"]:
        return 1
    else:
        return 0
sums = [0]*n
sums[n-1] = 1/n
for k in range(n-2,-1,-1):
    sums[k] = sums[k+1]+(1/(k+1))
def numb(k):
    if k <= (n+1)//2:
        return (k+1)*(sums[k+1]-sums[n-k-1]) + (n+1)*sums[n-k-1]
    else:
        return numb(n-k-1)
res = 0
if n == 1:
    res = vowel(word[0])
elif n == 2:
    res = (vowel(word[0])+vowel(word[1]))*3/2
elif n == 3:
    res = (vowel(word[0])+vowel(word[2]))*(1+1/2+1/3) + 7/3*vowel(word[1])
else:
    for k in range(n):
        res += vowel(word[k])*numb(k)
print("%.7f" % res)


word = input()
n = len(word)
def vowel(x):
    if x in ["A","E","I","O","U","Y"]:
        return 1
    else:
        return 0
sums = [0]*n
sums[n-1] = 1/n
for k in range(n-2,-1,-1):
    sums[k] = sums[k+1]+(1/(k+1))
def numb(k):
    if k <= (n+1)//2:
        return (k+1)*(sums[k+1]-sums[n-k-1]) + (n+1)*sums[n-k-1]
    else:
        return numb(n-k-1)
res = 0
for k in range(n):
    res += vowel(word[k])*numb(k)
print("%.7f" % res)


__author__ = 'PrimuS'

s = input()
n = len(s)

a = [0] * n
ps = [0] * n

for i in range(n):
    if s[i] in "IEAOUY":
        a[i] = 1

ps[0] = a[0]
for i in range(1, n):
    ps[i] = ps[i-1] + a[i]

import math
up = math.ceil((n - 1) / 2)
ss = [0] * up
prev = 0
for i in range(up):
    ss[i] = (a[i] + a[n - i-1]) * (i + 1)
    if i == n - i - 1:
        ss[i] /= 2
    ss[i] += prev
    prev = ss[i]

res = 0
x = 0
res = ps[n-1]
for i in range(2, n):
    k = n - i + 1
    cur = 0
    if k < i:
        cur += (ps[n - k] - ps[k-2]) * k
        cur += ss[k-2]
    else:
        cur += (ps[n - i] - ps[i-2]) * i
        cur += ss[i-2]

    res += cur / i

if n > 1:
    res += ps[n-1] / n

print(res)


__author__ = 'PrimuS'

s = input()
n = len(s)

a = [0] * n
ps = [0] * n

for i in range(n):
    if s[i] in "IEAOUY":
        a[i] = 1

ps[0] = a[0]
for i in range(1, n):
    ps[i] = ps[i-1] + a[i]

import math
up = math.ceil((n - 1) / 2)
ss = [0] * up
prev = 0
for i in range(up):
    ss[i] = (a[i] + a[n - i-1]) * (i + 1)
    if i == n - i - 1:
        ss[i] /= 2
    ss[i] += prev
    prev = ss[i]

res = 0
x = 0
res = ps[n-1]
for i in range(2, n):
    k = n - i + 1
    cur = 0
    if k < i:
        cur += (ps[n - k] - ps[k-2]) * k
        cur += ss[k-2]
    else:
        cur += (ps[n - i] - ps[i-2]) * i
        cur += ss[i-2]

    res += cur / i

res += ps[n-1] / n

print(res)


#include <iostream>
//#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
#include <iomanip>

#define ll long long

using namespace std;

//ifstream cin("input.txt");
//ofstream cout("output.txt");

int main() { //«Danil», «Olya», «Slava», «Ann» и «Nikita».
    ll n, rez, test = 0, maax = -1, num = n, ans = -1;
    cin >> n >> rez;
    vector<pair<ll,ll>> a;
    queue<pair<ll,ll>> q;
    for (ll i = 0; i < n; i++) {
        ll x; cin >> x;
        q.push(make_pair(x, i + 1));
        a.push_back(make_pair(0, x));
    }
    ll f, fn, s, sn;
    f = q.front().first;
    fn = q.front().second;
    q.pop();
    s = q.front().first;
    sn = q.front().second;
    q.pop();
    num--; num--;
    while(0 == 0) {
        if (num == 0)
            break;
        if (maax >= rez)
            break;
        if (test == 1) {
            f = q.front().first;
            fn = q.front().second;
            q.pop();
            num--;
        }
        if (test == 2) {
            s = q.front().first;
            sn = q.front().second;
            q.pop();
            num--;
        }
        if (f > s) {
            test = 2;
            q.push(make_pair(s, sn));
            a[fn - 1].first++;
            maax = max(maax, a[fn - 1].first);
        } else {
            test = 1;
            q.push(make_pair(f, fn));
            a[sn - 1].first++;
            maax = max(maax, a[sn - 1].first);
        }
    }
    ans = -1;
    for (ll i = 0; i < n; i++) {
        ans = max(ans, a[i].first);
        if (a[i].first >= rez) {
            cout << a[i].second;
            return 0;
        }
    }
    cout << ans;
}


#include <iostream>
//#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
#include <iomanip>

#define ll long long

using namespace std;

//ifstream cin("input.txt"); ofstream cout("output.txt");

int main() { //«Danil», «Olya», «Slava», «Ann» и «Nikita».
    ll n, rez, test = 0, maax = -1, num = n, ans = -1;
    cin >> n >> rez;
    if (n == 2) {
        ll tt, ttt;
        cin >> tt >> ttt;
        cout << max(tt,ttt);
        return 0;
    }
    num = n;
    vector<pair<ll,ll>> a;
    queue<pair<ll,ll>> q;
    for (ll i = 0; i < n; i++) {
        ll x; cin >> x;
        q.push(make_pair(x, i + 1));
        a.push_back(make_pair(0, x));
    }
    ll f, fn, s, sn;
    f = q.front().first;
    fn = q.front().second;
    q.pop();
    s = q.front().first;
    sn = q.front().second;
    q.pop();
    num--; num--;
    while(0 == 0) {
        if (num == 0)
            break;
        if (maax >= rez)
            break;
        if (test == 1) {
            f = q.front().first;
            fn = q.front().second;
            q.pop();
            num--;
        }
        if (test == 2) {
            s = q.front().first;
            sn = q.front().second;
            q.pop();
            num--;
        }
        if (f > s) {
            test = 2;
            q.push(make_pair(s, sn));
            a[fn - 1].first++;
            maax = max(maax, a[fn - 1].first);
        } else {
            test = 1;
            q.push(make_pair(f, fn));
            a[sn - 1].first++;
            maax = max(maax, a[sn - 1].first);
        }
    }
    ans = -1;
    for (ll i = 0; i < n; i++) {
        ans = max(ans, a[i].first);
        if (a[i].first >= rez) {
            cout << a[i].second;
            return 0;
        }
    }
    cout << ans;
}


#include<iostream>
#include<vector>
using namespace std;
int main()
{
	vector<int> v;
	long long int i, n, k, a, max, cnt;

	cin >> n >> k;
	cin >> max;
	cin >> a;
	if (max < a)
		max = a;
	cnt = 1;
	for (i = 2; i < n; i++)
	{
		cin >> a;
		if (a < max)
			cnt++;
		else
		{
			cnt = 1;
			max = a;
		}
		if (cnt == k)
		{
			cout << max;
			return 0;
		}
	}
	cout << max;
	return 0;
}


#include<stdio.h>
#include<vector>
#include<queue>

using namespace std;

int main(){
	//freopen("in.in", "r", stdin);
	int n, p;
	unsigned long long k;
	scanf("%d %llu", &n, &k);
	queue<int> players;
	for(int i = 0; i < n; i++){
		scanf("%d", &p);
		players.push(p);
	}
	int matches = 0;
	int p1 = players.front();
	int wins = 0;
	players.pop();
	while(matches < n - 1){
		int p2 = players.front();
		players.pop();
		if (p1 > p2){
			wins ++;
			players.push(p2);
		}
		else {
			wins = 0;
			p1 = p2;
			players.push(p1);
		}
		if (wins >= k) break;
		matches ++;
	}
	printf("%d\n", p1);
	//while(true);
}


#include<stdio.h>
#include<vector>
#include<queue>

using namespace std;

int main(){
	//freopen("in.in", "r", stdin);
	int n, p;
	long long k;
	scanf("%d %lld", &n, &k);
	queue<int> players;
	for(int i = 0; i < n; i++){
		scanf("%d", &p);
		players.push(p);
	}
	int matches = 0;
	int p1 = players.front();
	int wins = 0;
	players.pop();
	while(matches < n - 1){
		int p2 = players.front();
		players.pop();
		if (p1 > p2){
			wins ++;
			players.push(p2);
		}
		else {
			wins = 0;
			p1 = p2;
			players.push(p1);
		}
		if (wins >= k) break;
		matches ++;
	}
	printf("%d\n", p1);
	//while(true);
}


#include<stdio.h>
#include<vector>
#include<queue>

using namespace std;

int main(){
	//freopen("in.in", "r", stdin);
	int n, p;
	unsigned long long k;
	scanf("%d %llu", &n, &k);
	queue<int> players;
	for(int i = 0; i < n; i++){
		scanf("%d", &p);
		players.push(p);
	}
	int matches = 0;
	int p1 = players.front();
	int wins = 0;
	players.pop();
	while(matches < n - 1){
		int p2 = players.front();
		players.pop();
		if (p1 > p2){
			wins ++;
			players.push(p2);
		}
		else {
			wins = 1;
			p1 = p2;
			players.push(p1);
		}
		if (wins >= k) break;
		matches ++;
	}
	printf("%d\n", p1);
	//while(true);
}


#include<iostream>
#include<vector>

using namespace std;

struct PEOPLE
{
	int energy;
	int wins;
}peo;

int main(void)
{
	int n, k, i, j;
	cin >> n >> k;
	vector<PEOPLE> player;
	for (i = 0; i < n; i++)
	{
		cin >> peo.energy;
		peo.wins = 0;
		player.push_back(peo);
	}
	i = j = 0;
	int loop = 0;
	while (true)
	{
		if (player.at(0).energy > player.at(1).energy)
		{
			player.at(0).wins++;
			peo = player.at(1);
			player.push_back(peo);
			player.erase(player.begin()+1);
			loop++;
		}
		else
		{
			player.at(1).wins++;
			peo = player.at(0);
			player.push_back(peo);
			player.erase(player.begin());
			loop++;
		}
		if (player.at(0).wins == k)
		{
			cout << player.at(0).energy << endl;
			break;
		}
		if (loop == n)
		{
			cout << player.at(0).energy << endl;
			break;
		}
	}
	return 0;
}


#include<iostream>
#include<vector>

using namespace std;

struct PEOPLE
{
	int energy;
	int wins;
}peo;

int main(void)
{
	long long int k;
	int n, i, j;
	cin >> n >> k;
	vector<PEOPLE> player;
	for (i = 0; i < n; i++)
	{
		cin >> peo.energy;
		peo.wins = 0;
		player.push_back(peo);
	}
	i = j = 0;
	int loop = 0;
	while (true)
	{
		if (player.at(0).energy > player.at(1).energy)
		{
			player.at(0).wins++;
			peo = player.at(1);
			player.push_back(peo);
			player.erase(player.begin()+1);
			loop++;
		}
		else
		{
			player.at(1).wins++;
			peo = player.at(0);
			player.push_back(peo);
			player.erase(player.begin());
			loop++;
		}
		if (player.at(0).wins == k)
		{
			cout << player.at(0).energy << endl;
			break;
		}
		if (loop == n)
		{
			cout << player.at(0).energy << endl;
			break;
		}
	}
	return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <map> // STL
#include <string>
#include <vector>
#include <queue>
#include <stack>
#define mpr make_pair
#define debug() puts("okkkkkkkk")

using namespace std;

typedef long long LL;

const int inf = 1 << 26;

LL n,k;
int a[400005],vis[400005],cnt[400005];

void move(int k){
	int temp=a[k];
	for(int i=k+1;i<=n;i++)a[i-1]=a[i];
	a[n]=temp;
}

int main(){
	scanf("%I64d %I64d",&n,&k);
	int front=1,back=n,curs=0;a[0]=0;
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		if(a[curs]<a[i]){curs=i;}
	}
	if(k<=5*n+1){
		for(LL i=1;i<=k;i++){
			if(a[1]>a[2]){cnt[a[1]]++;move(2);}
			else{cnt[a[2]]++;move(1);}
		}
		int anc=0;
		for(int i=1;i<=n;i++){if(cnt[anc]<cnt[i])anc=i;}
		printf("%d\n",anc);
		return 0;
	}else printf("%d\n",a[curs]);

	return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <map> // STL
#include <string>
#include <vector>
#include <queue>
#include <stack>
#define mpr make_pair
#define debug() puts("okkkkkkkk")

using namespace std;

typedef long long LL;

const int inf = 1 << 26;

LL n,k;
int a[400005],vis[400005],cnt[400005];

void move(int k){
	int temp=a[k];
	for(int i=k+1;i<=n;i++)a[i-1]=a[i];
	a[n]=temp;
}

int main(){
	scanf("%I64d %I64d",&n,&k);
	int front=1,back=n,curs=0;a[0]=0;
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		if(a[curs]<a[i]){curs=i;}
	}
	if(k<=5*n+1){
		LL ans;
		for(LL i=1;1;i++){
			if(a[1]>a[2]){cnt[a[1]]++;if(cnt[a[1]]>=k){ans=a[1];break;}move(2);}
			else{cnt[a[2]]++;if(cnt[a[2]]>=k){ans=a[2];break;}move(1);}
		}
		printf("%d\n",ans);return 0;
	}else printf("%d\n",a[curs]);

	return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <map> // STL
#include <string>
#include <vector>
#include <queue>
#include <stack>
#define mpr make_pair
#define debug() puts("okkkkkkkk")

using namespace std;

typedef long long LL;

const int inf = 1 << 26;

LL n,k;
int a[400005],vis[400005],cnt[400005];

void move(int k){
	int temp=a[k];
	for(int i=k+1;i<=n;i++)a[i-1]=a[i];
	a[n]=temp;
}

int main(){
	scanf("%I64d %I64d",&n,&k);
	int front=1,back=n,curs=0;a[0]=0;
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		if(a[curs]<a[i]){curs=i;}
	}
	if(k<=2*n+1){
		for(LL i=1;i<=k;i++){
			if(a[1]>a[2]){cnt[a[1]]++;move(2);}
			else{cnt[a[2]]++;move(1);}
		}
		int anc=0;
		for(int i=1;i<=n;i++){if(cnt[anc]<cnt[i])anc=i;}
		printf("%d\n",anc);
		return 0;
	}else printf("%d\n",a[curs]);

	return 0;
}


#include <iostream>

#define MAX_PLAYER_COUNT 500

using namespace std;

int main()
{
	unsigned long long n, k, a[MAX_PLAYER_COUNT];
	cin >> n >> k;

	for (unsigned long long i = 0; i < n; ++i)
	{
		cin >> a[i];
	}

	unsigned long long consicutiveWins = 0;
	unsigned long long queueStart = 0;
	while (true)
	{
		long long winner;
		long long firstI = queueStart;
		long long secondI = (queueStart + 1) % n;

		if (a[firstI] > a[secondI])
		{ // the first one is the winner
			winner = a[firstI];
			long long temp = a[firstI];
			a[firstI] = a[secondI];
			a[secondI] = temp;
			++consicutiveWins;
		}
		else
		{ // the second one is the winner
			winner = a[secondI];
			consicutiveWins = 1; // reset the win counter
		}

		if (consicutiveWins >= k || consicutiveWins >= (n - 1))
		{ // we have a winner
			cout << winner << endl;
			break;
		}

		queueStart = (queueStart + 1) % n;
	}

    return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;
long long tek, a, b, c[1000], n, k, wow, wo, st;
int main() {
	cin >> n >> k;
	for (int i = 0; i < n; i++) {
		cin >> c[i];
		if (c[i] > wow) {
			wow = c[i];
			wo = i;
		}
	}
	for (int i = 0; i < n; i++) {
		if (i == wo) {
			cout << wow;
			//system("Pause");
			return 0;
		}
		for (int j = i; j < n; j++) {
			if (c[j] < c[i]) {
				st++;
			}
			if (st >= k) {
				cout << c[i];
				//system("Pause");
				return 0;
			}
		}
	}
	//system("Pause");
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;
long long tek, a, b, c[1000], n, k, wow, wo, st;
int main() {
	cin >> n >> k;
	for (int i = 0; i < n; i++) {
		cin >> c[i];
		if (c[i] > wow) {
			wow = c[i];
			wo = i;
		}
	}
	for (int i = 0; i < n; i++) {
		st = 0;
		if (i == wo) {
			cout << wow;
			//system("Pause");
			return 0;
		}
		for (int j = i; j < n; j++) {
			if (c[j] < c[i]) {
				st++;
			}
			if (st >= k) {
				cout << c[i];
				//system("Pause");
				return 0;
			}
		}
	}
	//system("Pause");
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;
long long tek, a, b, c[1000], n, k, wow, wo, st;
int main() {
	cin >> n >> k;
	for (int i = 0; i < n; i++) {
		cin >> c[i];
		if (c[i] > wow) {
			wow = c[i];
			wo = i;
		}
	}
	for (int i = 0; i < n; i++) {
		st = 0;
		if (i > 0)
			st++;
		if (i == wo) {
			cout << wow;
			//system("Pause");
			return 0;
		}
		for (int j = i; j < n; j++) {
			if (c[j] < c[i]) {
				st++;
			}
			if (st >= k) {
				cout << c[i];
				//system("Pause");
				return 0;
			}
		}
	}
	//system("Pause");
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;
long long tek, a, b, c[1000], n, k, wow, wo, st;
int main() {
	cin >> n >> k;
	for (int i = 0; i < n; i++) {
		cin >> c[i];
		if (c[i] > wow) {
			wow = c[i];
			wo = i;
		}
	}
	for (int i = 0; i < n; i++) {
		st = 0;
		if (i > 0)
			st++;
		if (i == wo) {
			cout << wow;
			//system("Pause");
			return 0;
		}
		for (int j = i; j < n; j++) {
			if (c[j] < c[i]) {
				st++;
			}
			if (c[j] > c[i]) {
				j = n;
			}
			if (st >= k) {
				cout << c[i];
				//system("Pause");
				return 0;
			}
		}
	}
	//system("Pause");
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

#pragma warning(disable:4996)

using namespace std;

long long int n, k, M, b, u[510];
vector <long long int> v;

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "rt", stdin);
	freopen("output.txt", "wt", stdout);
#endif
	long long int i;
	i = 0;
	scanf("%I64d%I64d", &n, &k);
	M = 0;
	for (i = 0; i < n; ++i)
	{
		scanf("%I64d", &b);
		M = max(b, M);
		v.push_back(b);
	}
	if (k >= n)
	{
		printf("%I64d", M);
		return 0;
	}
	else
	{
		for (i = 1; i < v.size(); ++i)
		{
			if (v[i] < v[i - 1])
			{
				u[v[i - 1]]++;
				if (u[v[i - 1]] == k)
				{
					printf("%I64d", v[i - 1]);
					return 0;
				}
				v.push_back(v[i]);
				v[i] = v[i - 1];
			}
			else
			{
				u[v[i]]++;
				if (u[v[i]] == k)
				{
					printf("%I64d", v[i]);
					return 0;
				}
				v.push_back(v[i - 1]);
			}
		}
	}
	return 0;
}


#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

#define ll long long
#define dbg(a) cout<<#a<<" = "<<a<<endl;
#define INF (100000000001)
#define AS 501

int arr[500];

int main() {
	ios::sync_with_stdio(false);

	ll n, k;
	cin >> n >> k;

	if (n <= k) {
		cout << n << endl;
		return 0;
	}

	for (int i = 0; i < n; i++)
		cin >> arr[i];

	for (int i = 0; i < n; i++) {
		int p = 0;
		for (int j = i+1; j < n; j++) {

			if (arr[i] > arr[j]) p++;
			else {i = j; break;}

			if (p >= k) {
				cout << arr[i] << endl;
				return 0;
			}

		}
	}

	cout << n << endl;

	return 0;
}

/*

*/


#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

#define ll long long
#define dbg(a) cout<<#a<<" = "<<a<<endl;
#define INF (100000000001)
#define AS 1001

int arr[AS];

int main() {
	ios::sync_with_stdio(false);

	ll n, k;
	cin >> n >> k;

	if (n <= k+1) {
		cout << n << endl;
		return 0;
	}

	for (int i = 0; i < n; i++)
		cin >> arr[i];
	for (int i = n; i < 2 * n; i++)
		arr[i] = arr[i - n];

	for (int i = 0; i < n; i++) {
		int p = 0+(i!=0);
		for (int j = i+1; j < 2*n; j++) {
			if (arr[i] > arr[j]) p++;

			if (p >= k) {
				cout << arr[i] << endl;
				return 0;
			}

			if (arr[i]<arr[j]) { i = j-1; break; }
		}
	}

	cout << n << endl;

	return 0;
}

/*

*/


#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

#define ll long long
#define dbg(a) cout<<#a<<" = "<<a<<endl;
#define INF (100000000001)
#define AS 1001

int arr[AS];

int main() {
	ios::sync_with_stdio(false);

	ll n, k;
	cin >> n >> k;

	if (n <= k-1) {
		cout << n << endl;
		return 0;
	}

	for (int i = 0; i < n; i++)
		cin >> arr[i];
	for (int i = n; i < 2 * n; i++)
		arr[i] = arr[i - n];

	for (int i = 0; i < n; i++) {
		int p = 0;
		for (int j = i+1; j < 2*n; j++) {

			if (arr[i] > arr[j]) p++;
			else {i = j; break;}

			if (p >= k) {
				cout << arr[i] << endl;
				return 0;
			}

		}
	}

	cout << n << endl;

	return 0;
}

/*

*/


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<deque>
#include<cstdlib>
#include<cmath>
#include<numeric>
#include<string.h>

using namespace std;

const string FILENAME = "";
const bool FILE_IO = 1;

void init()
{
#ifdef ONLINE_JUDGE
	if (!FILENAME.empty())
	{
		freopen((FILENAME + ".in").c_str(), "r", stdin);
		freopen((FILENAME + ".out").c_str(), "w", stdout);
	}
#else
	if (FILE_IO)
	{
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	}
#endif
}

int main()
{
	init();
	/*int n, day = 0;
	cin >> n;
	vector<int> s(n), p(n);
	for (int i = 0; i < n; i++)
	{
		cin >> s[i] >> p[i];
	}
	return 0;*/
	long long n, k, max = 0, smax = 0;
	cin >> n >> k;
	vector<int> p(n);
	for (int i = 0; i < n; i++)
	{
		cin >> p[i];
		if (max < p[i])
			max = p[i];
	}
	if (k + 1 < n)
	{
		smax = 0;
		for (int i = 0; i < n; i++)
		{
			int count = 0;
			for (int j = i - 1; j < n; j++)
			{
				if (j != -1)
				{
					if (p[i] > p[j])
					{
						count++;
					}
				}
			}
			if (count >= k)
			{
				smax = p[i];
				break;
			}
		}
	}
	if (smax == 0)
		cout << max;
	else
		cout << smax;
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<deque>
#include<cstdlib>
#include<cmath>
#include<numeric>
#include<string.h>

using namespace std;

const string FILENAME = "";
const bool FILE_IO = 1;

void init()
{
#ifdef ONLINE_JUDGE
	if (!FILENAME.empty())
	{
		freopen((FILENAME + ".in").c_str(), "r", stdin);
		freopen((FILENAME + ".out").c_str(), "w", stdout);
	}
#else
	if (FILE_IO)
	{
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	}
#endif
}

int main()
{
	init();
	/*int n, day = 0;
	cin >> n;
	vector<int> s(n), p(n);
	for (int i = 0; i < n; i++)
	{
		cin >> s[i] >> p[i];
	}
	return 0;*/
	long long n, k, max = 0;
	cin >> n >> k;
	vector<int> p(n);
	for (int i = 0; i < n; i++)
	{
		cin >> p[i];
		if (max < p[i])
			max = p[i];
	}
	if (k + 1 < n)
	{
		max = 0;
		for (int i = 0; i < n; i++)
		{
			int count = 0;
			for (int j = i - 1; j < n; j++)
			{
				if (j != -1)
				{
					if (p[i] > p[j])
					{
						count++;
					}
				}
			}
			if (count >= k)
			{
				max = p[i];
				break;
			}
		}
	}
	cout << max;
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<deque>
#include<cstdlib>
#include<cmath>
#include<numeric>
#include<string.h>

using namespace std;

const string FILENAME = "";
const bool FILE_IO = 1;

void init()
{
#ifdef ONLINE_JUDGE
	if (!FILENAME.empty())
	{
		freopen((FILENAME + ".in").c_str(), "r", stdin);
		freopen((FILENAME + ".out").c_str(), "w", stdout);
	}
#else
	if (FILE_IO)
	{
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	}
#endif
}

int main()
{

	init();
	long long n, k, max = 0, smax = 0;
	cin >> n >> k;
	vector<int> p(n);
	for (int i = 0; i < n; i++)
	{
		cin >> p[i];
		if (max < p[i])
			max = p[i];
	}
	if (k + 1 < n)
	{
		for (int i = 0; i < n; i++)
		{
			int count = 0;
			for (int j = i - 1; j < n; j++)
			{
				if (j != -1)
				{
					if (p[i] > p[j])
					{
						count++;
					}
				}
			}
			if (count >= k)
			{
				smax = p[i];
				break;
			}
		}
		smax = 0;
	}
	if (smax == 0)
		cout << max;
	else
		cout << smax;
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<deque>
#include<cstdlib>
#include<cmath>
#include<numeric>
#include<string.h>

using namespace std;

const string FILENAME = "";
const bool FILE_IO = 1;

void init()
{
#ifdef ONLINE_JUDGE
	if (!FILENAME.empty())
	{
		freopen((FILENAME + ".in").c_str(), "r", stdin);
		freopen((FILENAME + ".out").c_str(), "w", stdout);
	}
#else
	if (FILE_IO)
	{
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	}
#endif
}

int main()
{

	init();
	long long n, k, max = 0, smax = 0;
	cin >> n >> k;
	vector<int> p(n);
	for (int i = 0; i < n; i++)
	{
		cin >> p[i];
		if (max < p[i])
			max = p[i];
	}
	if (k + 1 < n)
	{
		for (int i = 0; i < n; i++)
		{
			int count = 0;
			for (int j = i - 1; j < n; j++)
			{
				if (j != -1 && i != j)
				{
					if (p[i] > p[j])
					{
						count++;
					}
					else
					{
						break;
					}
				}
			}
			if (count >= k)
			{
				smax = p[i];
				break;
			}
			smax = 0;
		}
	}
	if (smax == 0)
		cout << max;
	else
		cout << smax;
	return 0;
}
/*init();
	int n, day = 0;
	cin >> n;
	vector<int> s(n), p(n);
	for (int i = 0; i < n; i++)
	{
		cin >> s[i] >> p[i];
	}
	for (int i = 0; i < n; i++)
	{
		if (i == 0)
		{
			day = s[i];
		}
		else
		{
			if (s[i] >= day)
				day = s[i];
			else
			{
				double x = (day - s[i]) / p[i];
				if (x == (int)x)
					day = p[i] + day / x;
				else
					day = s[i] + ((int)x + 1) * p[i];
			}
		}
	}
	cout << day;
	return 0;*/


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<deque>
#include<cstdlib>
#include<cmath>
#include<numeric>
#include<string.h>

using namespace std;

const string FILENAME = "";
const bool FILE_IO = 1;

void init()
{
#ifdef ONLINE_JUDGE
	if (!FILENAME.empty())
	{
		freopen((FILENAME + ".in").c_str(), "r", stdin);
		freopen((FILENAME + ".out").c_str(), "w", stdout);
	}
#else
	if (FILE_IO)
	{
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	}
#endif
}

int main()
{
	init();
	long long n, k, max = 0;
	cin >> n >> k;
	vector<int> p(n);
	for (int i = 0; i < n; i++)
	{
		cin >> p[i];
		if (max < p[i])
			max = p[i];
	}
	if (k + 1 < n)
	{
		max = 0;
		for (int i = 0; i < k + 1; i++)
		{
			if (max < p[i])
				max = p[i];
		}
	}
	cout << max;
	return 0;
}


#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int main()
{
	int n;
	scanf("%d",&n);

	int x = 1023, y = 0;

	char s[5];
	for(int i = 0 ;i<n;i++)
	{
		char op ;
		int opnum;

		scanf("%s%d",s,&opnum);
		if(s[0] == '^')
		{
			x ^= opnum;
			y ^= opnum;
		}
		if(s[0] == '|')
		{
			x |= opnum;
			y |= opnum;
		}
		if(s[0] == '&')
		{
			x &= opnum;
			y &= opnum;
		}
	}

//	for(int i = 0; i<10;i++)
//	{
//		int now = (i<<i);
//		if((x & now) && (y & now))
//		{
//			OPor += now;
//		}
//		if(!(x & now) && (y & now))
//		{
//			OPxor += now;
//		}
//		if(!(x & now) && !(y & now))
//		{
//			OPxor += now;
//			OPor += now;
//		}
//	}
    int OPor = 0,OPand = 0,OPxor = 0;
    for (int i = 0;i < 10;i++){
        int xn = (1<<i);
        if ((x&xn) && (y&xn)){
            OPor += xn;
        }
        if (!(x&xn) && (y&xn)){
            OPxor+=xn;
        }
        if (!(x&xn) && !(y&xn)){
            OPor += xn,OPxor += xn;
        }
    }
    int ans = (OPor>0) + (OPand>0)+(OPxor>0);
    printf("%d\n",ans);
    if (OPor){
        printf("| %d\n",OPor);
    }
    if (OPand){
        printf("& %d\n",OPand);
    }
    if (OPxor){
        printf("^ %d\n",OPxor);
    }
 }


#include <cstdio>
#include <cstring>
#include <algorithm>
#include <queue>
using namespace std;

struct people
{
	int power,id;
	int win ;
	bool operator < (const people& A) const
	{
		return this->power < A.power;
	}
};
people xl[5005];
queue<people> q;
int main()
{
	int n;
	long long k;
	scanf("%d %I64d",&n,&k);
	int maxx = 0;
	for(int i = 1;i<=n;i++)
	{
		int power;
		scanf("%d",&power);
		people temp;
		temp.win = 0;
		temp.power = power,temp.id = i;
		xl[i] = temp;
		maxx = max(power,maxx);
	}
	int ans;
	for(int i = 1 ;i<=n;i++)
	{
		people temp = xl[i];
		if(temp.power == maxx)
		{
			ans = temp.power;
			break;
		}
		else
		{
			int cnt = i;
			long long now = 0;
			while(temp.power > xl[++cnt].power)
			{
				temp.win++;
			}
			if(temp.power < xl[cnt].power)
			{
				xl[cnt].win = 1;
			}
			if(temp.win >= k)
			{
				ans = temp.power;
				break;
			}
		}
	}
	printf("%d\n",ans);
 }


#include <cstdio>
#include <cstring>
#include <algorithm>
#include <queue>
using namespace std;

struct people
{
	int power,id;

	bool operator < (const people& A) const
	{
		return this->power < A.power;
	}
};
people xl[5005];
queue<people> q;
int main()
{
	int n;
	long long k;
	scanf("%d %I64d",&n,&k);
	int maxx = 0;
	for(int i = 1;i<=n;i++)
	{
		int power;
		scanf("%d",&power);
		people temp;
		temp.power = power,temp.id = i;
		xl[i] = temp;
		maxx = max(power,maxx);
	}
	int ans;
	for(int i = 1 ;i<=n;i++)
	{
		people temp = xl[i];
		if(temp.power == maxx)
		{
			ans = temp.power;
			break;
		}
		else
		{
			int cnt = i;
			long long now = 0;
			while(temp.power > xl[++cnt].power)
			{
				now++;
			}
			if(now >= k)
			{
				ans = temp.power;
				break;
			}
		}
	}
	printf("%d\n",ans);
 }


#include <cstdio>
#include <cstring>
#include <algorithm>
#include <queue>
using namespace std;

struct people
{
	int power,id;
	int win ;
	bool operator < (const people& A) const
	{
		return this->power < A.power;
	}
};
people xl[5005];
queue<people> q;
int main()
{
	int n;
	long long k;
	scanf("%d %I64d",&n,&k);
	int maxx = 0;
	for(int i = 1;i<=n;i++)
	{
		int power;
		scanf("%d",&power);
		people temp;
		temp.win = 0;
		temp.power = power,temp.id = i;
		xl[i] = temp;
		maxx = max(power,maxx);
	}
	int ans;
	for(int i = 1 ;i<=n;i++)
	{
		people temp = xl[i];
		if(temp.power == maxx)
		{
			ans = temp.power;
			break;
		}
		else
		{
			int cnt = i;
			long long now = 0;
			while(temp.power > xl[++cnt].power)
			{
				temp.win++;
			}
			if(temp.power < xl[cnt].power)
			{
				xl[cnt].win++;
			}
			if(temp.win >= k)
			{
				ans = temp.power;
				break;
			}
		}
	}
	printf("%d\n",ans);
 }


#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int main()
{
	int n;
	scanf("%d",&n);

	int x = 1023, y = 0;
	int OPor = 0, OPxor = 0, OPand = 0;

	for(int i = 0 ;i<n;i++)
	{
		char op ;
		int opnum;

		scanf("%c %d",&op,&opnum);

		if(op == '^')
		{
			x ^= opnum;
			y ^= opnum;
		}
		if(op == '|')
		{
			x |= opnum;
			y |= opnum;
		}
		if(op == '&')
		{
			x &= opnum;
			y &= opnum;
		}
	}
	for(int i = 0; i<10;i++)
	{
		int now = (i<<i);
		if((x & now) && (y & now))
		{
			OPor += now;
		}
		if(!(x & now) && (y & now))
		{
			OPxor += now;
		}
		if(!(x & now) && !(y & now))
		{
			OPxor += now;
			OPor += now;
		}
	}
	int ans = (OPxor > 0 ) + (OPor > 0) + (OPand > 0);
	printf("%d\n",ans);
	if(OPxor > 0)
	{
		printf("^ %d\n",OPxor);
	}
	if(OPand > 0)
	{
		printf("& %d\n",OPand);
	}
	if(OPor > 0)
	{
		printf("| %d\n",OPor);
	}
 }


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

typedef long long ll;
ll n,k;
ll a[505];
int main()
{
    while(~scanf("%lld%lld",&n,&k))
    {
        for(int i=0; i<n; i++)
            scanf("%lld",&a[i]);
        if(k>=n)
        {
            printf("%lld\n",n);
            continue;
        }
        ll tmp=a[0];
        ll coun=0;
        ll power=tmp;

        for(int i=1; i<n; i++)
        {
           if(tmp>a[i]) coun++;
           else
           {
               tmp=a[i];
               coun=1;
           }
           if(tmp==n)
           {
               power=n;
               break;
           }
           if(coun==k)
            {
                power=tmp;
                break;
            }
        }
        printf("%lld\n",power);
    }
}