import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s = sc.nextLine(); int p = 0; int sum = 0; String flag = ""; String number = "0"; for(int i = 0; i < s.length(); i++){ switch (s.charAt(i)) { case '-': sum += Integer.parseInt(flag + number); flag = "-"; number = ""; break; case '+': sum += Integer.parseInt(flag + number); flag = ""; number = ""; break; default: number += s.charAt(i); } } sum += Integer.parseInt(flag + number); System.out.println(sum); } }