#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, j, k, m, n;
  string s;
  cin >> s;
  s = 'A' + s + 'A';
  j = 0;
  m = 1;
  for (int a = 0; a <= s.size(); a++) {
    if (s[a] == 'A' || s[a] == 'E' || s[a] == 'I' || s[a] == 'O' ||
        s[a] == 'U' || s[a] == 'Y') {
      d = a - j;
      j = a;
      if (d > m) m = d;
    }
  }
  cout << m;
}
