first_number = int(input())
second_number = int(input())
third_number = int(input())
fourth_number = int(input())

sum_numbers = (int((first_number + second_number) / third_number)) * fourth_number

print(sum_numbers)