import java.util.*;
public class Main{
  public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int x=Math.abs(m-n);
    int y=0;

    if(x%2==0){
       y=x/2;
         if (n<m) {
         System.out.println(n+y);
       }else{
         System.out.println(m+y);
       }
     }

    if(x%2!=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 n=sc.nextInt();
    int m=sc.nextInt();
    int x=Math.abs(m-n);
    int y=0;

    if(x%2==0){
       y=x/2;
         if (n<m) {
         System.out.println(n+y);
       }else{
         System.out.println(m+y);
       }
     }

    if(x%2!=0){
      System.out.println("IMPOSSIBLE");
    }
  }
} Main public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int x=Math.abs(m-n);
    int y=0;

    if(x%2==0){
       y=x/2;
         if (n<m) {
         System.out.println(n+y);
       }else{
         System.out.println(m+y);
       }
     }

    if(x%2!=0){
      System.out.println("IMPOSSIBLE");
    }
  } main {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int x=Math.abs(m-n);
    int y=0;

    if(x%2==0){
       y=x/2;
         if (n<m) {
         System.out.println(n+y);
       }else{
         System.out.println(m+y);
       }
     }

    if(x%2!=0){
      System.out.println("IMPOSSIBLE");
    }
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int m=sc.nextInt(); m sc.nextInt() sc.nextInt sc int x=Math.abs(m-n); x Math.abs(m-n) Math.abs Math m-n m n int y=0; y 0 if(x%2==0){
       y=x/2;
         if (n<m) {
         System.out.println(n+y);
       }else{
         System.out.println(m+y);
       }
     } x%2==0 x%2 x 2 0 {
       y=x/2;
         if (n<m) {
         System.out.println(n+y);
       }else{
         System.out.println(m+y);
       }
     } y=x/2 y x/2 x 2 if (n<m) {
         System.out.println(n+y);
       }else{
         System.out.println(m+y);
       } n<m n m {
         System.out.println(n+y);
       } System.out.println(n+y) System.out.println System.out System System.out n+y n y {
         System.out.println(m+y);
       } System.out.println(m+y) System.out.println System.out System System.out m+y m y if(x%2!=0){
      System.out.println("IMPOSSIBLE");
    } x%2!=0 x%2 x 2 0 {
      System.out.println("IMPOSSIBLE");
    } 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 n=sc.nextInt();
    int m=sc.nextInt();
    int x=Math.abs(m-n);
    int y=0;

    if(x%2==0){
       y=x/2;
         if (n<m) {
         System.out.println(n+y);
       }else{
         System.out.println(m+y);
       }
     }

    if(x%2!=0){
      System.out.println("IMPOSSIBLE");
    }
  }
} public class Main{
  public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int x=Math.abs(m-n);
    int y=0;

    if(x%2==0){
       y=x/2;
         if (n<m) {
         System.out.println(n+y);
       }else{
         System.out.println(m+y);
       }
     }

    if(x%2!=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 n=sc.nextInt();
    int m=sc.nextInt();
    int x=Math.abs(m-n);
    int y=0;

    if(x%2==0){
       y=x/2;
         if (n<m) {
         System.out.println(n+y);
       }else{
         System.out.println(m+y);
       }
     }

    if(x%2!=0){
      System.out.println("IMPOSSIBLE");
    }
  }
}
