import math X=int(input()) Y=int(input()) L=int(input()) turn =0 sum =0 if Y<0: turn =2 elif X==0: turn =0 else: turn =1 X=abs(X) Y=abs(Y) sum = sum+math.cei sum = sum+math.cei print(turn+sum)