a,b,m,n=map(int,input().split()) ans=[min(a,b)] if a>b: while a>b: a-=m b+=1 ans.append(min(a,b)) elif a