import java.util.Scanner; public class Tashihiki { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner s = new Scanner(System.in); StringBuilder str = new StringBuilder(s.nextLine()); s.close(); int sum = 0; int lp = str.lastIndexOf("+"),lm = str.lastIndexOf("-"); int b = Integer.parseInt(str.substring(Math.max(lp, lm), str.length())); str.delete(Math.max(lm, lp), str.length()); lp = str.lastIndexOf("+"); lm = str.lastIndexOf("-"); if(lp <= 0 && lm <= 0){ //要修正 sum = Integer.parseInt(str.toString()) - b; }else{ int a = Integer.parseInt(str.substring(0, Math.max(lm, lp))); str.delete(0, Math.max(lp, lm)); if(str.charAt(0) == '+'){ sum = a-b; }else{ sum = a+b; } } System.out.println(sum); } }