import java.util.*;
import java.util.Collections;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        
        long w = 0;
        if(a > b) {
            w = a;
            a = b;
            b = w;
        }
        
        long k = a;
        boolean hantei = false;
        while(true) {
            if((b - a) %  2 != 0) {
                break;
            }
            if(k - a == b - k || k - a == k - b) {
                hantei = true;
                break;
            }
            k++;
        }
        
        if(hantei) {
            System.out.println(k);
        }else {
            System.out.println("IMPOSSIBLE");
        }
        
    }
} import java.util.*; util.* java import java.util.Collections; Collections java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        
        long w = 0;
        if(a > b) {
            w = a;
            a = b;
            b = w;
        }
        
        long k = a;
        boolean hantei = false;
        while(true) {
            if((b - a) %  2 != 0) {
                break;
            }
            if(k - a == b - k || k - a == k - b) {
                hantei = true;
                break;
            }
            k++;
        }
        
        if(hantei) {
            System.out.println(k);
        }else {
            System.out.println("IMPOSSIBLE");
        }
        
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        
        long w = 0;
        if(a > b) {
            w = a;
            a = b;
            b = w;
        }
        
        long k = a;
        boolean hantei = false;
        while(true) {
            if((b - a) %  2 != 0) {
                break;
            }
            if(k - a == b - k || k - a == k - b) {
                hantei = true;
                break;
            }
            k++;
        }
        
        if(hantei) {
            System.out.println(k);
        }else {
            System.out.println("IMPOSSIBLE");
        }
        
    } main {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        
        long w = 0;
        if(a > b) {
            w = a;
            a = b;
            b = w;
        }
        
        long k = a;
        boolean hantei = false;
        while(true) {
            if((b - a) %  2 != 0) {
                break;
            }
            if(k - a == b - k || k - a == k - b) {
                hantei = true;
                break;
            }
            k++;
        }
        
        if(hantei) {
            System.out.println(k);
        }else {
            System.out.println("IMPOSSIBLE");
        }
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a = Long.parseLong(sc.next()); a Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long b = Long.parseLong(sc.next()); b Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long w = 0; w 0 if(a > b) {
            w = a;
            a = b;
            b = w;
        } a > b a b {
            w = a;
            a = b;
            b = w;
        } w = a w a a = b a b b = w b w long k = a; k a boolean hantei = false; hantei false while(true) {
            if((b - a) %  2 != 0) {
                break;
            }
            if(k - a == b - k || k - a == k - b) {
                hantei = true;
                break;
            }
            k++;
        } true {
            if((b - a) %  2 != 0) {
                break;
            }
            if(k - a == b - k || k - a == k - b) {
                hantei = true;
                break;
            }
            k++;
        } if((b - a) %  2 != 0) {
                break;
            } (b - a) %  2 != 0 (b - a) %  2 (b - a) b a 2 0 {
                break;
            } break; if(k - a == b - k || k - a == k - b) {
                hantei = true;
                break;
            } k - a == b - k || k - a == k - b k - a == b - k k - a k a b - k b k k - a == k - b k - a k a k - b k b {
                hantei = true;
                break;
            } hantei = true hantei true break; k++ k if(hantei) {
            System.out.println(k);
        }else {
            System.out.println("IMPOSSIBLE");
        } hantei {
            System.out.println(k);
        } System.out.println(k) System.out.println System.out System System.out k {
            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);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        
        long w = 0;
        if(a > b) {
            w = a;
            a = b;
            b = w;
        }
        
        long k = a;
        boolean hantei = false;
        while(true) {
            if((b - a) %  2 != 0) {
                break;
            }
            if(k - a == b - k || k - a == k - b) {
                hantei = true;
                break;
            }
            k++;
        }
        
        if(hantei) {
            System.out.println(k);
        }else {
            System.out.println("IMPOSSIBLE");
        }
        
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        
        long w = 0;
        if(a > b) {
            w = a;
            a = b;
            b = w;
        }
        
        long k = a;
        boolean hantei = false;
        while(true) {
            if((b - a) %  2 != 0) {
                break;
            }
            if(k - a == b - k || k - a == k - b) {
                hantei = true;
                break;
            }
            k++;
        }
        
        if(hantei) {
            System.out.println(k);
        }else {
            System.out.println("IMPOSSIBLE");
        }
        
    }
} Main
import java.util.*;
import java.util.Collections;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = Long.parseLong(sc.next());
        long b = Long.parseLong(sc.next());
        
        long w = 0;
        if(a > b) {
            w = a;
            a = b;
            b = w;
        }
        
        long k = a;
        boolean hantei = false;
        while(true) {
            if((b - a) %  2 != 0) {
                break;
            }
            if(k - a == b - k || k - a == k - b) {
                hantei = true;
                break;
            }
            k++;
        }
        
        if(hantei) {
            System.out.println(k);
        }else {
            System.out.println("IMPOSSIBLE");
        }
        
    }
}