import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * Solution to Smallest Calculated Value.
 *
 * @author vanb
 */
public class smallest_vanb
{
    /** Input. */
    private static Scanner sc;
    
    /** Output. */
    private static PrintStream ps;
    
    /**
     * Perform +, -, *, / ops on two numbers creating a list.
     *
     * @param x An integer
     * @param y Another integer
     * @return A list: x+y, x-y, x*y, and possibly x/y (only if x%y==0)
     */
    private List<Integer> ops( int x, int y )
    {
        ArrayList<Integer> result = new ArrayList<Integer>(4);
        result.add( x+y );
        result.add( x-y );
        result.add( x*y );
        if( x%y==0 ) result.add( x/y ); 
        return result;
    }
    
    /**
     * Do it!.
     */
    private void doit()
    {
        // Read input
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
                
        // Compute all possible combos
        ArrayList<Integer> values = new ArrayList<Integer>(16);
        for( int x : ops( a, b ) ) values.addAll( ops( x, c )  );
        
        // Find and print the smallest that's >=0
        int smallest = Integer.MAX_VALUE;
        for( int x : values ) if( x>=0 && x<smallest ) smallest = x;
        ps.println( smallest );
    }
        
    /**
     * Main.
     *
     * @param args unused
     * @throws Exception the exception
     */
    public static void main( String[] args ) throws Exception
    {
        sc = new Scanner( System.in );
        ps = System.out;
        
        new smallest_vanb().doit();
    }

}
