def get_max_sub(s): if not s or len(s)==0: print(0) return nums=list(map(int,s))
temp=0 res=[] for i in range(len(nums)): if i ==len(nums)-1 and nums[i]==1:
res.append(temp+1) break if nums[i]==0: if temp==0:
res.append(0) else:
res.append(temp)
res.append(0)
temp=0 else:
temp+=1 if len(res)==1: print(res[0]) else:
res[0]=res[0]+res[-1] print(max(res))
string=input().strip()
get_max_sub(string)
胡乱想的,运气好AC了