#B2130. Simple Arithmetic Operations

    ID: 11212 Type: Default 1000ms 256MiB

Simple Arithmetic Operations

Simple Arithmetic Operations

Given an arithmetic expression consisting of two positive integers and an operator, compute the result. The allowed operators are:

  • +: Addition
  • -: Subtraction
  • *: Multiplication
  • /: Integer Division, i.e. $$a\,/\,b = \lfloor \frac{a}{b} \rfloor$$
  • %: Modulus (remainder)

The format of the arithmetic expression is:

operand operator operand (spaces around the operator are allowed)

Output the computed result.

inputFormat

The input consists of a single line containing an expression in the format: number operator number. The operator will be one of +, -, *, /, or %. There may be extra spaces around the operator.

outputFormat

Output a single integer which is the result of the arithmetic operation.

sample

3 + 5
8