/*
	Name: 
	Copyright: 
	Author: 
	Date: 12/01/19 15:41
	Description: 
*/
#include <stdio.h>
#include <iostream>
#include <math.h>
#include <stdbool.h>

int main(){
	long long N, A, B;
	long long sum, sum_min, sum_max, num;
	scanf("%I64d %I64d %I64d", &N, &A, &B); 
	if(B < A) {
		num = 0;
		printf("%I64d", num);
		return 0;
	}
	if(N == 1 && A != B){
		num = 0; 
		printf("%I64d", num);
		return 0;
	}
		
	sum_min = A*(N-1) + B;
	sum_max = B*(N-1) + A; 
	num = sum_max - sum_min + 1;
	printf("%I64d", num);
	
}