a=int(input("enter first num")) n=int(input("entersecond num")) d=int(input("diffrence")) print(a+(n-1)*d)