import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc  = new Scanner(System.in);
		String S  =sc.next();
		sc.close();
		char[] ch = S.toCharArray();
		int[] cnt = new int[ch.length];
		for(int i = 0;i < ch.length;i++) {
			if(ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C') {
				cnt[i]++;
			}
		}
		int[] sum = new int[ch.length+1];
		for(int i = 0;i < ch.length;i++) {
			if(cnt[i]!=0) {
				sum[i+1] = sum[i] + cnt[i];
			}else {
				sum[i+1] = 0;
			}
		}
		Arrays.sort(sum);
		System.out.println(sum[sum.length-1]);
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc  = new Scanner(System.in);
		String S  =sc.next();
		sc.close();
		char[] ch = S.toCharArray();
		int[] cnt = new int[ch.length];
		for(int i = 0;i < ch.length;i++) {
			if(ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C') {
				cnt[i]++;
			}
		}
		int[] sum = new int[ch.length+1];
		for(int i = 0;i < ch.length;i++) {
			if(cnt[i]!=0) {
				sum[i+1] = sum[i] + cnt[i];
			}else {
				sum[i+1] = 0;
			}
		}
		Arrays.sort(sum);
		System.out.println(sum[sum.length-1]);
	}
} Main public static void main(String[] args) {
		Scanner sc  = new Scanner(System.in);
		String S  =sc.next();
		sc.close();
		char[] ch = S.toCharArray();
		int[] cnt = new int[ch.length];
		for(int i = 0;i < ch.length;i++) {
			if(ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C') {
				cnt[i]++;
			}
		}
		int[] sum = new int[ch.length+1];
		for(int i = 0;i < ch.length;i++) {
			if(cnt[i]!=0) {
				sum[i+1] = sum[i] + cnt[i];
			}else {
				sum[i+1] = 0;
			}
		}
		Arrays.sort(sum);
		System.out.println(sum[sum.length-1]);
	} main {
		Scanner sc  = new Scanner(System.in);
		String S  =sc.next();
		sc.close();
		char[] ch = S.toCharArray();
		int[] cnt = new int[ch.length];
		for(int i = 0;i < ch.length;i++) {
			if(ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C') {
				cnt[i]++;
			}
		}
		int[] sum = new int[ch.length+1];
		for(int i = 0;i < ch.length;i++) {
			if(cnt[i]!=0) {
				sum[i+1] = sum[i] + cnt[i];
			}else {
				sum[i+1] = 0;
			}
		}
		Arrays.sort(sum);
		System.out.println(sum[sum.length-1]);
	} Scanner sc  = new Scanner(System.in); sc new Scanner(System.in) String S  =sc.next(); S sc.next() sc.next sc sc.close() sc.close sc char[] ch = S.toCharArray(); ch S.toCharArray() S.toCharArray S int[] cnt = new int[ch.length]; cnt new int[ch.length] ch.length ch ch.length for(int i = 0;i < ch.length;i++) {
			if(ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C') {
				cnt[i]++;
			}
		} int i = 0; int i = 0; i 0 i < ch.length i ch.length ch ch.length i++ i++ i {
			if(ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C') {
				cnt[i]++;
			}
		} {
			if(ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C') {
				cnt[i]++;
			}
		} if(ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C') {
				cnt[i]++;
			} ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C' ch[i]=='G' ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C' ch[i]=='A' ch[i] ch i 'A' ch[i]=='T' ch[i] ch i 'T' ch[i]=='G' ch[i] ch i 'G' ch[i]=='C' ch[i] ch i 'C' {
				cnt[i]++;
			} cnt[i]++ cnt[i] cnt i int[] sum = new int[ch.length+1]; sum new int[ch.length+1] ch.length+1 ch.length ch ch.length 1 for(int i = 0;i < ch.length;i++) {
			if(cnt[i]!=0) {
				sum[i+1] = sum[i] + cnt[i];
			}else {
				sum[i+1] = 0;
			}
		} int i = 0; int i = 0; i 0 i < ch.length i ch.length ch ch.length i++ i++ i {
			if(cnt[i]!=0) {
				sum[i+1] = sum[i] + cnt[i];
			}else {
				sum[i+1] = 0;
			}
		} {
			if(cnt[i]!=0) {
				sum[i+1] = sum[i] + cnt[i];
			}else {
				sum[i+1] = 0;
			}
		} if(cnt[i]!=0) {
				sum[i+1] = sum[i] + cnt[i];
			}else {
				sum[i+1] = 0;
			} cnt[i]!=0 cnt[i] cnt i 0 {
				sum[i+1] = sum[i] + cnt[i];
			} sum[i+1] = sum[i] + cnt[i] sum[i+1] sum i+1 i 1 sum[i] + cnt[i] sum[i] sum i cnt[i] cnt i {
				sum[i+1] = 0;
			} sum[i+1] = 0 sum[i+1] sum i+1 i 1 0 Arrays.sort(sum) Arrays.sort Arrays sum System.out.println(sum[sum.length-1]) System.out.println System.out System System.out sum[sum.length-1] sum sum.length-1 sum.length sum sum.length 1 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc  = new Scanner(System.in);
		String S  =sc.next();
		sc.close();
		char[] ch = S.toCharArray();
		int[] cnt = new int[ch.length];
		for(int i = 0;i < ch.length;i++) {
			if(ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C') {
				cnt[i]++;
			}
		}
		int[] sum = new int[ch.length+1];
		for(int i = 0;i < ch.length;i++) {
			if(cnt[i]!=0) {
				sum[i+1] = sum[i] + cnt[i];
			}else {
				sum[i+1] = 0;
			}
		}
		Arrays.sort(sum);
		System.out.println(sum[sum.length-1]);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc  = new Scanner(System.in);
		String S  =sc.next();
		sc.close();
		char[] ch = S.toCharArray();
		int[] cnt = new int[ch.length];
		for(int i = 0;i < ch.length;i++) {
			if(ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C') {
				cnt[i]++;
			}
		}
		int[] sum = new int[ch.length+1];
		for(int i = 0;i < ch.length;i++) {
			if(cnt[i]!=0) {
				sum[i+1] = sum[i] + cnt[i];
			}else {
				sum[i+1] = 0;
			}
		}
		Arrays.sort(sum);
		System.out.println(sum[sum.length-1]);
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc  = new Scanner(System.in);
		String S  =sc.next();
		sc.close();
		char[] ch = S.toCharArray();
		int[] cnt = new int[ch.length];
		for(int i = 0;i < ch.length;i++) {
			if(ch[i]=='A'||ch[i]=='T'||ch[i]=='G'||ch[i]=='C') {
				cnt[i]++;
			}
		}
		int[] sum = new int[ch.length+1];
		for(int i = 0;i < ch.length;i++) {
			if(cnt[i]!=0) {
				sum[i+1] = sum[i] + cnt[i];
			}else {
				sum[i+1] = 0;
			}
		}
		Arrays.sort(sum);
		System.out.println(sum[sum.length-1]);
	}
}