"use strict";

const main = arg => {
    // 標準入力の不要な空白と改行を削除し、配列に格納する
    const input = arg.trim().split(" ");
    const N = parseInt(input[0], 10);
    const blue =parseInt(input[1], 10);
    const red = parseInt(input[2], 10);

    

    const sum = blue + red;
    const times = Math.floor((N / sum), 10);
    const amari = N % sum;
    

    console.log((blue * times) + amari); 
}

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