n = list(input()) count = [0] * 26 block_times = 0 for i in n: count[ord(i) - 97] += 1 ans = max(count) print(ans)