import java.util.*; import java.lang.*; import java.io.*; class Ideone{ public static void main(String[] args) throws Exception{ // your code goes here BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); int max = line.length(); int ans = 1; while(max-->0){ for(int i=0;i<=line.length()-max;i++){ if(check(line.substring(i,i+max))){ System.out.println(max); return; } } } System.out.println(1); } public static boolean check(String line){ int len = line.length(); for(int i=0;i