import std; void main(){ auto input = readln.chomp.split(" ").to!(long[]); long N = input[0]; long A = input[1]; long B = input[2]; if(4 * A > B){ if(N % 2 == 0){ if(2 * A > B){ writeln(A * (-1 * (N - 1))); }else{ writeln(A * (-1 * (N - 2) + 1) - B * 2); } }else{ writeln(A * (-1 * (N - 1)) - B); } }else{ writeln(A * (N - 1) - B * N); } }