N = int(input()) A,B,C = map(int,input().split()) N *= A if N - B > 0: C = N - B C = N print(C)