'use strict';
(function(stdin) {
  //declare function
  var calculation = function(array) {
    var result = [];
    for (var i = 0, len = array.length; i < len; i++) {
      var formula = array[i];
      // console.log(formula);
      if (formula[1] === '+') {
        result[i] = Number(formula[0]) + Number(formula[2]);
      } else
      if (formula[1] === '-') {
        result[i] = formula[0] - formula[2];
      } else
      if (formula[1] === '*') {
        result[i] = formula[0] * formula[2];
      } else
      if (formula[1] === '/') {
        result[i] = parseInt(formula[0] / formula[2]);
      } else
      if (formula[1] === '%') {
        result[i] = formula[0] % formula[2];
      } else
      if (formula[1] === '\?') {
        break;
      }
    }
    return result.join('\n');
  };
  //declare variable
  var inputs = stdin.toString().trim().split('\n');
  var cols = inputs.map(function(v) {
    return v.split(' ');
  });
  //main
  //display
  console.log(calculation(cols));
})(require('fs').readFileSync('/dev/stdin', 'utf8'));