サンプルが弱かったら時間を溶かしていたかもしれない。

#!/usr/bin/env python3
a, b, k, l = map(int,input().split())
print((k // l) * b + min((k % l) * a, b))