#include <cstdio>
#include <algorithm>
typedef long long int64;

int n, a, b;

int main()
{
    scanf("%d%d%d", &n, &a, &b);
    printf("%lld\n", std::max(0LL, (int64)(n - 2) * (b - a) + 1));
    return 0;
}
