'use strict'

const main = (arg) => {
  const input = arg.split('\n')[0].split(' ').map(n => Number(n))
  const N = input[0]
  const A = input[1]
  const B = input[2]
  let ans = Math.floor(N / (A + B)) * A
  ans += Math.min(N % (A + B), A)

  console.log(ans)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
