#!/usr/bin/ruby # -*- coding: utf-8 -*- # # 341.rb: No.341 沈黙の期間 - yukicoder # ### main s = gets.strip.split('') pos = 0 n = s.size maxlen = 0 while pos < n while pos < n && s[pos] != "…" pos += 1 end ppos = pos while pos < n && s[pos] == "…" pos += 1 end len = pos - ppos if maxlen < len maxlen = len end end puts maxlen