let s = stdin.readLine s1 = s[1..^1] var cnt = 0 for i in 0 ..< s1.high: if s1[i] == 'c': inc cnt else: break echo min(cnt, s1.len - cnt)