x,y,d = map(int,input().split()) a = 0 if d == x: a +=1 if d == y: a +=1 if (x+y) == d: a +=1 print(a)