#include <bits/stdc++.h>
using namespace std;
bool vis[111];
int main() {
  char s[1111];
  scanf("%s", s);
  memset(vis, 0, sizeof vis);
  vis['A'] = 1;
  vis['E'] = 1;
  vis['I'] = 1;
  vis['O'] = 1;
  vis['U'] = 1;
  vis['Y'] = 1;
  int len = strlen(s);
  int ans = 0;
  int tt = 0;
  for (int i = 0; i < len; i++) {
    if (vis[s[i]]) {
      tt++;
      ans = max(ans, tt);
      tt = 0;
    } else {
      tt++;
    }
  }
  ans = max(ans, tt + 1);
  printf("%d\n", ans);
  return 0;
}
