import java.io.*;
import java.util.*;

public class ichess_md implements Runnable {
    private Scanner in;
    private PrintWriter out;

    public void run() {
        try {
            solve();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    private void solve() throws IOException {
        Locale.setDefault(Locale.US);
        in = new Scanner(System.in);
        out = new PrintWriter(System.out);
        int b = in.nextInt();
        int w = in.nextInt();
        if (b + w == 0) {
            out.println("Impossible");
        } else {
            int low = 1;
            int high = b + w + 1;
            while (low + 1 < high) {
                int mid = (low + high) / 2;
                int area = mid * mid;
                int col1 = area / 2;
                int col2 = area - col1;
                if (col1 <= Math.min(b, w) && col2 <= Math.max(b, w))
                    low = mid;
                else
                    high = mid;
            }
            out.println(low);
        }
        in.close();
        out.close();
    }

    public static void main(String[] args) {
        new Thread(new ichess_md()).start();
    }
}
