# Arup Guha
# 2/4/2023
# Solution to 2022 NAQ Problem: Smallest Calculated Value

# Returns the answer for a code b.
def op(a,b,code):

    # Case it out.
    if code == 1:
        return a+b
    if code == 2:
        return a-b
    if code == 3:
        return a*b

    # Answer indicates impossible.
    if a%b != 0:
        return -1000000000
    return a//b

# Read input set up a default result.
toks = [int(x) for x in input().split()]
res = toks[0] + toks[1] + toks[2]

# Loop over the first operator.
for i in range(4):

    # What we get at first.
    tmp = op(toks[0], toks[1], i)

    # Not allowed...
    if tmp == -1000000000:
        continue
    
    # Now loop over the second operator.
    for j in range(4):

        # Get answer.
        ans = op(tmp, toks[2], j)

        # Not allowed - takes care of bad division and neg nums.
        if ans < 0:
            continue

        # Update...
        res = min(res, ans)

# Ta da!
print(res)

        
