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

public class ichess_gk {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(new File("ichess.in"));
        int b = scanner.nextInt();
        int w = scanner.nextInt();

        int n = 1;
        while (
            (n * n + 0) / 2 <= Math.min(b, w) && 
            (n * n + 1) / 2 <= Math.max(b, w)) {
            n++;
        }

        PrintWriter pw = new PrintWriter("ichess.out");
        if (n == 1) {
            pw.format("Impossible\n");
        } else {
            pw.format("%d\n", n - 1);
        }
        pw.close();
    }
}