defmodule Main do
 def takoyaki(nums) do
   cooking_count = div(Enum.at(nums,0),Enum.at(nums,1))
   cooking_rem = rem(Enum.at(nums,0),Enum.at(nums,1))
   cond do
     cooking_rem > 0 -> (cooking_count + 1) * Enum.at(nums,2)
     true -> cooking_count * Enum.at(nums,2)
     end
 end
 
 def main do
    nums = IO.read(:line) |> String.trim() |> String.split(" ") |> Enum.map(&String.to_integer/1)
    IO.puts takoyaki(nums)
 end
end