// editor5
import java.util.Scanner;

public class OverflowCheck {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        if(!sc.hasNextInt()){
                System.out.println("Invalid input");
                System.exit(0);
            }
        int a = scanner.nextInt();
        if(a<0){
                 System.out.println("Invalid input");
                System.exit(0);
                
            }
        if(!sc.hasNextInt()){
                System.out.println("Invalid input");
                System.exit(0);
            }
        int b = scanner.nextInt();
        if(b<0){
                 System.out.println("Invalid input");
                System.exit(0);
                
            }
        
        long result = (long) a + (long) b; // use long to detect overflow

        if (result > Integer.MAX_VALUE || result < Integer.MIN_VALUE) {
            System.out.println("Overflow detected");
        } else {
            System.out.println((int) result);
        }

        scanner.close();
    }
}
