first_number = int(input())
second_number = int(input())
three_number = int(input())
forth_number = int(input())

result = int((first_number + second_number) / three_number ) * forth_number
print(result)
