N = int(input()) S = list(input()) r=0 for i in range(len(S)-1): if S[i]=="0" and S[i+1]=="0": r+=1 S[i]="1" print(r)