#include <bits/stdc++.h>
using namespace std;
int main() {
  string a;
  int counter = 0, ans = 0;
  bool flag = 0;
  cin >> a;
  if (a.size() == 1 && (a[0] != 'A' && a[0] != 'E' && a[0] != 'I' &&
                        a[0] != 'O' && a[0] != 'U' && a[0] != 'Y')) {
    cout << 2 << endl;
    return 0;
  }
  for (int i = 0; i <= a.size(); i++) {
    if (a[i] == 'A' || a[i] == 'E' || a[i] == 'I' || a[i] == 'O' ||
        a[i] == 'U' || a[i] == 'Y' || a[i] == '\0') {
      counter++;
      if (counter > ans) {
        ans = counter;
      }
      flag = 1;
      counter = 0;
    } else {
      counter++;
    }
  }
  if (flag == 0) {
    cout << ++counter << endl;
  } else {
    cout << ans << endl;
  }
  return 0;
}
