public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        String patternString = "([\\d*]+[\\.?+\\d*?]{0,1}+\\s*)([\\*\\+\\-\\/\\:]+\\s*)([\\d*]+[\\.?+\\d*?]{0,1}+\\s*)";
        Pattern pattern = Pattern.compile(patternString);
        Matcher matcher = pattern.matcher(input);
        double firstNumber;
        double secondNumber;
        String symbol;
        double result = 0;
        if (matcher.matches()) {
            firstNumber = Double.parseDouble(matcher.group(1).replaceAll(" ", ""));
            secondNumber = Double.parseDouble(matcher.group(3).replaceAll(" ", ""));
            symbol = matcher.group(2).replaceAll(" ", "");
        }
        else
            throw new IllegalArgumentException("Your expression doesn't match pattern!");
        switch (symbol) {
            case "+":
                result = firstNumber + secondNumber;
                break;
            case "-":
                result = firstNumber - secondNumber;
                break;
            case ":":
            case "/":
                result = firstNumber / secondNumber;
                break;
            case "*":
                result = firstNumber * secondNumber;
                break;
        }
        System.out.println(result);
    }