'''
a = input()b = 0c = 0for i in range(0,len(a),2): b += (ord(a[i])-48)
for i in range(1,len(a),2): c += ord(a[i])-48
print(abs(b-c))