import java.util.*;
public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int AA =0;
    int BB =0;

    int A = sc.nextInt();
    int B = sc.nextInt();

    int  max = Math.max(A,B);

    for(int k = 0 ;k<max;k++){
        AA = Math.abs(A-k);
        BB = Math.abs(B-k);

        if(AA==BB){
          System.out.println(k);
          System.exit(0);
        }
    }
    System.out.println("IMPOSSIBLE");
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int AA =0;
    int BB =0;

    int A = sc.nextInt();
    int B = sc.nextInt();

    int  max = Math.max(A,B);

    for(int k = 0 ;k<max;k++){
        AA = Math.abs(A-k);
        BB = Math.abs(B-k);

        if(AA==BB){
          System.out.println(k);
          System.exit(0);
        }
    }
    System.out.println("IMPOSSIBLE");
  }
} Main public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int AA =0;
    int BB =0;

    int A = sc.nextInt();
    int B = sc.nextInt();

    int  max = Math.max(A,B);

    for(int k = 0 ;k<max;k++){
        AA = Math.abs(A-k);
        BB = Math.abs(B-k);

        if(AA==BB){
          System.out.println(k);
          System.exit(0);
        }
    }
    System.out.println("IMPOSSIBLE");
  } main {
    Scanner sc = new Scanner(System.in);
    int AA =0;
    int BB =0;

    int A = sc.nextInt();
    int B = sc.nextInt();

    int  max = Math.max(A,B);

    for(int k = 0 ;k<max;k++){
        AA = Math.abs(A-k);
        BB = Math.abs(B-k);

        if(AA==BB){
          System.out.println(k);
          System.exit(0);
        }
    }
    System.out.println("IMPOSSIBLE");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int AA =0; AA 0 int BB =0; BB 0 int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int  max = Math.max(A,B); max Math.max(A,B) Math.max Math A B for(int k = 0 ;k<max;k++){
        AA = Math.abs(A-k);
        BB = Math.abs(B-k);

        if(AA==BB){
          System.out.println(k);
          System.exit(0);
        }
    } int k = 0 ; int k = 0 ; k 0 k<max k max k++ k++ k {
        AA = Math.abs(A-k);
        BB = Math.abs(B-k);

        if(AA==BB){
          System.out.println(k);
          System.exit(0);
        }
    } {
        AA = Math.abs(A-k);
        BB = Math.abs(B-k);

        if(AA==BB){
          System.out.println(k);
          System.exit(0);
        }
    } AA = Math.abs(A-k) AA Math.abs(A-k) Math.abs Math A-k A k BB = Math.abs(B-k) BB Math.abs(B-k) Math.abs Math B-k B k if(AA==BB){
          System.out.println(k);
          System.exit(0);
        } AA==BB AA BB {
          System.out.println(k);
          System.exit(0);
        } System.out.println(k) System.out.println System.out System System.out k System.exit(0) System.exit System 0 System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" String[]args args public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int AA =0;
    int BB =0;

    int A = sc.nextInt();
    int B = sc.nextInt();

    int  max = Math.max(A,B);

    for(int k = 0 ;k<max;k++){
        AA = Math.abs(A-k);
        BB = Math.abs(B-k);

        if(AA==BB){
          System.out.println(k);
          System.exit(0);
        }
    }
    System.out.println("IMPOSSIBLE");
  }
} public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int AA =0;
    int BB =0;

    int A = sc.nextInt();
    int B = sc.nextInt();

    int  max = Math.max(A,B);

    for(int k = 0 ;k<max;k++){
        AA = Math.abs(A-k);
        BB = Math.abs(B-k);

        if(AA==BB){
          System.out.println(k);
          System.exit(0);
        }
    }
    System.out.println("IMPOSSIBLE");
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int AA =0;
    int BB =0;

    int A = sc.nextInt();
    int B = sc.nextInt();

    int  max = Math.max(A,B);

    for(int k = 0 ;k<max;k++){
        AA = Math.abs(A-k);
        BB = Math.abs(B-k);

        if(AA==BB){
          System.out.println(k);
          System.exit(0);
        }
    }
    System.out.println("IMPOSSIBLE");
  }
}