Problem: In Republic of AtCoder, Snuke Chameleons (Family: Chamaeleonidae, Genus: Bartaberia) are very popular pets. Ringo keeps N Snuke Chameleons in a cage.

A Snuke Chameleon that has not eaten anything is blue. It changes its color according to the following rules:

* A Snuke Chameleon that is blue will change its color to red when the number of red balls it has eaten becomes strictly larger than the number of blue balls it has eaten.
* A Snuke Chameleon that is red will change its color to blue when the number of blue balls it has eaten becomes strictly larger than the number of red balls it has eaten.



Initially, every Snuke Chameleon had not eaten anything. Ringo fed them by repeating the following process K times:

* Grab either a red ball or a blue ball.
* Throw that ball into the cage. Then, one of the chameleons eats it.



After Ringo threw in K balls, all the chameleons were red. We are interested in the possible ways Ringo could have thrown in K balls. How many such ways are there? Find the count modulo 998244353. Here, two ways to throw in balls are considered different when there exists i such that the color of the ball that are thrown in the i-th throw is different.

Constraints

* 1 \leq N,K \leq 5 \times 10^5
* N and K are integers.

Input

Input is given from Standard Input in the following format:


N K


Output

Print the possible ways Ringo could have thrown in K balls, modulo 998244353.

Examples

Input

2 4


Output

7


Input

3 7


Output

57


Input

8 3


Output

0


Input

8 10


Output

46


Input

123456 234567


Output

857617983

Solution (in JAVA):

Solution:
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {
    FastScanner in;
    PrintWriter out;

    final int mod = 998244353;

    int[] fact, factInv;

    void prec(int maxN) {
        maxN *= 2;
        fact = new int[maxN];
        fact[0] = 1;
        for (int i = 1; i < maxN; i++) {
            fact[i] = mul(fact[i - 1], i);
        }
        factInv = new int[maxN];
        factInv[maxN - 1] = BigInteger.valueOf(fact[maxN - 1]).modInverse(BigInteger.valueOf(mod)).intValue();
        for (int i = maxN - 2; i >= 0; i--) {
            factInv[i] = mul(factInv[i + 1], i + 1);
        }
    }

    int c(int n, int k) {
        if (k < 0 || k > n) {
            return 0;
        }
        return mul(fact[n], mul(factInv[k], factInv[n - k]));
    }

    private int mul(int x, int y) {
        return (int) (x * 1L * y % mod);
    }

    int add(int x, int y) {
        x += y;
        if (x >= mod) {
            x -= mod;
        }
        return x;
    }

    int getWays(int x, int y) {
        y = Math.abs(y);
        if (x % 2 != y % 2) {
            return 0;
        }
        int cntPlus = (x + y) / 2;
        int cntMinus = (x - y) / 2;
        if (cntMinus < 0) {
            return 0;
        }
        return c(cntPlus + cntMinus, cntPlus);
    }

    int countSame(int red, int n) {
        int moreRed = red - n;
        if (moreRed < 0) {
            return 0;
        }
        int x = red * 2 - 1;
        return sub(getWays(x, 1), getWays(x, 2 * moreRed + 3));
    }

    int sub(int x, int y) {
        x -= y;
        return x < 0 ? (x + mod) : x;
    }

    // reds = ones + pairs + (z + 1)
    // blues = pairs + (z)
    int count(int red, int blue, int n) {
        if (red == blue) {
            return countSame(red, n);
        }
        if (red <= blue) {
            throw new AssertionError();
        }
        int z = red - n;
        if (z < 0) {
            return 0;
        }
        int pairs = blue - z;
        int moreRed = red - pairs;
        int x = red + blue;
        int y = blue - red;
        return sub(getWays(x, y), getWays(x, -y - 2 * moreRed - 2));
    }

    void solve() {
        int n = in.nextInt();
        int balls = in.nextInt();
        prec(n + balls + 4);
        int res = 0;
        for (int red = (balls + 1) / 2; red <= balls; red++) {
            int blue = balls - red;
            int nowRes = count(red, blue, n);
            res = add(res, nowRes);
        }
        out.println(res);
    }

    void run() {
        try {
            in = new FastScanner(new File("Main.in"));
            out = new PrintWriter(new File("Main.out"));

            solve();

            out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    void runIO() {

        in = new FastScanner(System.in);
        out = new PrintWriter(System.out);

        solve();

        out.close();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        public FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    public static void main(String[] args) {
        new Main().runIO();
    }
}