import re str1=open('24_6.txt').read().strip() result=re.split(r'000+',str1) print(max(list(map(len,result))))