s = gets.chonp p s=~/^1333+$/ ? s.size-1 : -1