A=[0,0]B=[]for a in input(): B.append(int(a))for a in range(len(B)): A[a%2]+=B[a]print(abs(A[0]-A[1]))