#include<iostream>
using namespace std;

int main() {
	int amount, min=0, max=0;
	cin >> amount;
	cin >> min;
	cin >> max;

	if (max < min) { cout << 0; return 0; }
	if (amount == 1 && (max != min)) { cout << 0; return 0; }
	else if (amount == 1 && max == min) { cout << 1; return 1; }
	if (amount < 1) { cout << 0; return 0; }
	int count = amount - 2;
	cout << count * max - count * min+1;

	system("pause");
	return 0;
}