members = gets.chop.split(" ").map(&:to_i).sort

calculating_flag = true
count = members.last

while calculating_flag do
  if count % members.first == 0
    break
  else
    count += members.last 
  end
end

puts count
