import java.util.Scanner; import java.util.regex.Pattern; import java.util.regex.Matcher; public class yukicoder_222 { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); String str = stdIn.next(); final String PLUS = "+"; Pattern p = Pattern.compile("^[-]?[0-9]{1,6}"); Matcher m = p.matcher(str); if (m.find()) { String matchstr =m.group(); int n1 = Integer.parseInt(matchstr); int n2 = Integer.parseInt(str.substring(matchstr.length() + 1)); int result = 0; if (str.substring(matchstr.length(),matchstr.length() + 1).equals(PLUS)) { if (str.substring(matchstr.length() + 1,matchstr.length() + 2) == "-") { result = n1 + Math.abs(n2); } else { result = n1 - n2; } } else { result = n1 + n2; } System.out.println(result); } else { System.out.println("no matches!"); } } }