function Main(input) {

    input = input.split("");

    var a = input[0]
    var b = input[1]

    if (b % a == 0) {
        console.log(a + b);
    } else if {
        console.log(b - a);
    }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
