import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main_yukicoder222 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String xopy = sc.next(); String regex = "([+-]?\\d+)([+-])([+-]?\\d+)"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(xopy); if (m.find()) { int x = Integer.parseInt(m.group(1)); String op = m.group(2); int y = Integer.parseInt(m.group(3)); if (op.equals("+")) { System.out.println(x - y); } else { System.out.println(x + y); } } else { System.out.println("NG"); } sc.close(); } }