N=int(input()) S=list(input()) ans=0 l=0 r=l+1 zero=(S[l]=="0")+(S[r]=="0") while l