import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    int a=sc.nextInt();
    int b=sc.nextInt();
    int k=0;
    int s=0;
    int s1;
    int s2;
    int k1;
    int k2;
    int ans=0;

    if(a>b){
      k=a;
      s=b;
    }else{
      k=b;
      s=a;
    }
    for(int i=s;i<k;i++){
      s1=a-i;
      s2=i-a;
      k1=b-i;
      k2=i-b;
      if(s1==k1){
        System.out.println(i);
        ans=1;
      }else if(s1==k2){
        System.out.println(i);
        ans=1;
      }else if(s2==k1){
        System.out.println(i);
        ans=1;
      }else if(s2==k2){
        System.out.println(i);
        ans=1;
      }
    }
    if(ans!=1){
      System.out.println("IMPOSSIBLE");
    }

  }
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz