import re str1=open('24_6.txt').read().strip() result=re.split(r'(?=00)0',str1) #Негативный просмотр вперед (Negative Lookahead) print(max(list(map(len,result))))