import java.util.*; import java.util.regex.Pattern; import java.util.regex.Matcher; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); int ans = 0; for(int i = 33; i > 0; i--) { String regex = ""; for(int j = 0; j < 3 * i; j++) { regex += "\\."; } Pattern p = Pattern.compile(regex); Matcher m = p.matcher(S); if(m.find()) { ans = i; break; } } System.out.println(ans); } }