def fly(a,b)->int: thens = abs(a-b) return thenstotal = 0c = list(input())d = [int(c[i]) for i in range(len(c))]b = 0a = 0for i in range(0,len(d),2): b+=d[i]for i in range(1,len(d),2): a+=d[i]ass = fly(a,b)print(ass)