a,b,c = [int(i) for i in input().split()]
if (a+b<c) or (b+c<a) or (a+c<b):
print(-1)
elif (a==b==c) and ((a+b>c) or (b+c>a) or (a+c>b)):
print(1)
elif ((a==b and b!=c) or (a==c and c!=b) or (b==c and c!=a)) and ((a+b>c) or (b+c>a) or (a+c>b)):
print(2)
elif ((a+b>c) or (b+c>a) or (a+c>b)) and (a!=b and b!=c and c!=a):
print(3)
As a general point, you need to trust the elif mechanism - for example, if you establish in the first test that the triangle is non-viable, subsequent clauses do not need to retest this. Here additionally your extra tests are meaningless because this expression