import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] v = sc.nextLine().split("\\+"); // System.out.println(Arrays.toString(v)); int i = 0; for(String s:v) { i+= calc(s); } System.out.println(i); } public static int calc(String s) { //13-14 char[] ch = s.toCharArray(); int i = 0; int l=0;int r=0; while (i<ch.length && ch[i]!='-') { l= (ch[i]-'0')+ l*10; ++i; } while (++i<ch.length) { r = (ch[i]-'0') + r*10; } // System.out.println(l+" - >"+r); return l-r; } }