Snuke has N integers. Among them, the smallest is A, and the largest is B. We are interested in the sum of those N integers. How many different possible sums there are?

Constraints

* 1 ≤ N,A,B ≤ 10^9
* A and B are integers.

Input

Input is given from Standard Input in the following format:


N A B


Output

Print the number of the different possible sums.

Examples

Input

4 4 6


Output

5


Input

5 4 3


Output

0


Input

1 7 10


Output

0


Input

1 3 3


Output

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

public class Main implements Runnable {

    private void solve() throws IOException {

        int N = nextInt();
        long A = nextLong();
        long B = nextLong();

        if(A > B) {
            writer.println(0);
        } else {
            if(N == 1) {
                if(A != B) {
                    writer.println(0);
                } else writer.println(1);
            } else {
                if(A == B) {
                    writer.println(1);
                } else {
                    long huge = (long)(N-2) * (long)B;
                    long small = (long)(N-2) * (long)A;
                    writer.println((huge-small+1));
                }
            }
        }

    }

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



    BufferedReader reader;
    //    BufferedReader reader2;
    StringTokenizer tokenizer;
    PrintWriter writer;
    //    BufferedWriter writer;

    public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
//            reader = new BufferedReader(new FileReader("input.txt"));
            //            reader2 = new BufferedReader(new FileReader("1.in"));
            tokenizer = null;
            writer = new PrintWriter(System.out);
//            writer = new     PrintWriter("output.txt");
//                                                    writer = new BufferedWriter(System.out);
            //                        writer = new BufferedWriter(new OutputStreamWriter(System.out));
            solve();
            reader.close();
            //            reader2.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    short nextShort() throws IOException {
        return Short.parseShort(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }

        return tokenizer.nextToken();
    }

}