import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();


    if(A % 2 == B % 2){
      for(int K = 1;K<1000000000;K++){
        int a = Math.abs(A-K);
        int b = Math.abs(B-K);
        if(a == b){
          System.out.println(K);
          break;
        }
      }
    }else{
      System.out.println("IMPOSSIBLE");
    }
  }

} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();


    if(A % 2 == B % 2){
      for(int K = 1;K<1000000000;K++){
        int a = Math.abs(A-K);
        int b = Math.abs(B-K);
        if(a == b){
          System.out.println(K);
          break;
        }
      }
    }else{
      System.out.println("IMPOSSIBLE");
    }
  }

} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();


    if(A % 2 == B % 2){
      for(int K = 1;K<1000000000;K++){
        int a = Math.abs(A-K);
        int b = Math.abs(B-K);
        if(a == b){
          System.out.println(K);
          break;
        }
      }
    }else{
      System.out.println("IMPOSSIBLE");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();


    if(A % 2 == B % 2){
      for(int K = 1;K<1000000000;K++){
        int a = Math.abs(A-K);
        int b = Math.abs(B-K);
        if(a == b){
          System.out.println(K);
          break;
        }
      }
    }else{
      System.out.println("IMPOSSIBLE");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc if(A % 2 == B % 2){
      for(int K = 1;K<1000000000;K++){
        int a = Math.abs(A-K);
        int b = Math.abs(B-K);
        if(a == b){
          System.out.println(K);
          break;
        }
      }
    }else{
      System.out.println("IMPOSSIBLE");
    } A % 2 == B % 2 A % 2 A 2 B % 2 B 2 {
      for(int K = 1;K<1000000000;K++){
        int a = Math.abs(A-K);
        int b = Math.abs(B-K);
        if(a == b){
          System.out.println(K);
          break;
        }
      }
    } for(int K = 1;K<1000000000;K++){
        int a = Math.abs(A-K);
        int b = Math.abs(B-K);
        if(a == b){
          System.out.println(K);
          break;
        }
      } int K = 1; int K = 1; K 1 K<1000000000 K 1000000000 K++ K++ K {
        int a = Math.abs(A-K);
        int b = Math.abs(B-K);
        if(a == b){
          System.out.println(K);
          break;
        }
      } {
        int a = Math.abs(A-K);
        int b = Math.abs(B-K);
        if(a == b){
          System.out.println(K);
          break;
        }
      } int a = Math.abs(A-K); a Math.abs(A-K) Math.abs Math A-K A K int b = Math.abs(B-K); b Math.abs(B-K) Math.abs Math B-K B K if(a == b){
          System.out.println(K);
          break;
        } a == b a b {
          System.out.println(K);
          break;
        } System.out.println(K) System.out.println System.out System System.out K break; {
      System.out.println("IMPOSSIBLE");
    } System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" String[] args args
import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();


    if(A % 2 == B % 2){
      for(int K = 1;K<1000000000;K++){
        int a = Math.abs(A-K);
        int b = Math.abs(B-K);
        if(a == b){
          System.out.println(K);
          break;
        }
      }
    }else{
      System.out.println("IMPOSSIBLE");
    }
  }

}
