import java.util.*;

public class twoPlusTwoDoesNotEqualFour {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.nextLine();
		int ans = 0, temp = 0;
		boolean flagged = true;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) >= '0' && s.charAt(i) <= '9') {
				temp = temp * 10 + s.charAt(i) - '0';
			} else {
				if (flagged)
					ans += temp;
				else
					ans -= temp;
				if (s.charAt(i) == '+')
					flagged = true;
				else
					flagged = false;
				temp = 0;
				temp = temp * 10 + s.charAt(i) - '0';
			}
		}
		if (flagged)
			ans += temp;
		else
			ans -= temp;
		System.out.println("" + ans);
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskF solver = new TaskF();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskF {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            String s = in.next();
            int n = s.length();
            int a = 1;
            int b = 0;
            int ans = 0;

            for (int i = 0; i < n; ++i) {
                if (s.charAt(i) == '-') {
                    ans += a * b;
                    a = -1;
                    b = 0;
                } else if (s.charAt(i) == '+') {
                    ans += a * b;
                    a = 1;
                    b = 0;
                }
                b = b * 10 + s.charAt(i) - '0';
            }

            ans += a * b;
            out.println(ans);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return nextString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(int i) {
            writer.println(i);
        }

    }
}

import java.util.*;

public class Main
{
    public static void main(String[] args)
    {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        int ans = 0, tmp = 0, len = s.length();
        boolean flag = true;
        for (int i = 0; i < len; i++)
        {
            if (s.charAt(i) >= '0' && s.charAt(i) <= '9')
            {
                tmp = tmp * 10 + s.charAt(i) - '0';
            }
            else
            {
                if (flag) ans += tmp;
                else ans -= tmp;
                if (s.charAt(i) == '+') flag = true;
                else flag = false;
                tmp = 0;
                tmp = tmp * 10 + s.charAt(i) - '0';
            }
        }
        if (flag) ans += tmp;
        else ans -= tmp;
        System.out.println("" + ans);
    }
}

import java.util.Scanner;

public class Bug {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int currentNum = 0;
		int sign = 1;
		int answer = 0;
		String exp = input.nextLine();
		exp += '+'; // This allows the program to parse the last number in the expression
		for (int i = 0; i < exp.length(); i++) {
			if (exp.charAt(i) == '+') {
				answer += sign * currentNum;
				sign = 1;
				currentNum = 0;
			} else if (exp.charAt(i) == '-') {
				answer += sign * currentNum;
				sign = -1;
				currentNum = 0;
			}
			// The bug is caused by the lack of this "else" statement. It causes the first
			// digit of the number to be ('+' - '0') or ('-' - '0')
			// else {
			currentNum = currentNum * 10 + (int) (exp.charAt(i) - '0');
			// }
		}
		System.out.println(answer);
	}
}

import java.util.*;

public class twoPlusTwoDoesNotEqualFour {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String s = scanner.nextLine();
		int ans = 0, tmp = 0;
		boolean flg = true;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) >= '0' && s.charAt(i) <= '9') {
				tmp = tmp * 10 + s.charAt(i) - '0';
			} else {
				if (flg)
					ans += tmp;
				else
					ans -= tmp;
				if (s.charAt(i) == '+')
					flg= true;
				else
					flg = false;
				tmp = 0;
				tmp = tmp * 10 + s.charAt(i) - '0';
			}
		}
		if (flg)
			ans += tmp;
		else
			ans -= tmp;
		System.out.println("" + ans);
	}
}