# Arup Guha
# 9/8/2022
# Solution to 2022 UCF Qualification Round Problem: Easy-to-Solve Expressions

# Get input as a list of numbers, then sort.
nums = [int(x) for x in input().split()]
nums.sort()

# Try adding.
if nums[0]+nums[1] == nums[2]:
    print(1)

# Then multiplying
elif nums[0]*nums[1] == nums[2]:
    print(2)

# Must be this instead.
else:
    print(3)
