// 問題URL
// https://atcoder.jp/contests/abc158/tasks/abc158_b

import java.util.Scanner;

public class Main
{
    public static void main(String [] args)
    {
        Scanner scaanner = new Scanner(System.in);
        long num = scaanner.nextLong();
        long blue = scaanner.nextLong();
        long red = scaanner.nextLong();

        // 赤と青を合計することでグループ化する
        // 割り切れる数値
        long divisible_group = (num / (blue+red));
        // 割り切れない数値
        long indivisible_group = (num % (blue+red));
        // 合計値
        long total =  divisible_group * blue;

        if (indivisible_group <= blue) {
            System.out.println(total+ indivisible_group);
        } else {
            System.out.println(total+ blue);
        }

    }
} import java.util.Scanner; Scanner java.util public class Main
{
    public static void main(String [] args)
    {
        Scanner scaanner = new Scanner(System.in);
        long num = scaanner.nextLong();
        long blue = scaanner.nextLong();
        long red = scaanner.nextLong();

        // 赤と青を合計することでグループ化する
        // 割り切れる数値
        long divisible_group = (num / (blue+red));
        // 割り切れない数値
        long indivisible_group = (num % (blue+red));
        // 合計値
        long total =  divisible_group * blue;

        if (indivisible_group <= blue) {
            System.out.println(total+ indivisible_group);
        } else {
            System.out.println(total+ blue);
        }

    }
} Main public static void main(String [] args)
    {
        Scanner scaanner = new Scanner(System.in);
        long num = scaanner.nextLong();
        long blue = scaanner.nextLong();
        long red = scaanner.nextLong();

        // 赤と青を合計することでグループ化する
        // 割り切れる数値
        long divisible_group = (num / (blue+red));
        // 割り切れない数値
        long indivisible_group = (num % (blue+red));
        // 合計値
        long total =  divisible_group * blue;

        if (indivisible_group <= blue) {
            System.out.println(total+ indivisible_group);
        } else {
            System.out.println(total+ blue);
        }

    } main {
        Scanner scaanner = new Scanner(System.in);
        long num = scaanner.nextLong();
        long blue = scaanner.nextLong();
        long red = scaanner.nextLong();

        // 赤と青を合計することでグループ化する
        // 割り切れる数値
        long divisible_group = (num / (blue+red));
        // 割り切れない数値
        long indivisible_group = (num % (blue+red));
        // 合計値
        long total =  divisible_group * blue;

        if (indivisible_group <= blue) {
            System.out.println(total+ indivisible_group);
        } else {
            System.out.println(total+ blue);
        }

    } Scanner scaanner = new Scanner(System.in); scaanner new Scanner(System.in) long num = scaanner.nextLong(); num scaanner.nextLong() scaanner.nextLong scaanner long blue = scaanner.nextLong(); blue scaanner.nextLong() scaanner.nextLong scaanner long red = scaanner.nextLong(); red scaanner.nextLong() scaanner.nextLong scaanner long divisible_group = (num / (blue+red)); divisible_group (num / (blue+red)) num (blue+red) blue red long indivisible_group = (num % (blue+red)); indivisible_group (num % (blue+red)) num (blue+red) blue red long total =  divisible_group * blue; total divisible_group * blue divisible_group blue if (indivisible_group <= blue) {
            System.out.println(total+ indivisible_group);
        } else {
            System.out.println(total+ blue);
        } indivisible_group <= blue indivisible_group blue {
            System.out.println(total+ indivisible_group);
        } System.out.println(total+ indivisible_group) System.out.println System.out System System.out total+ indivisible_group total indivisible_group {
            System.out.println(total+ blue);
        } System.out.println(total+ blue) System.out.println System.out System System.out total+ blue total blue String [] args args public class Main
{
    public static void main(String [] args)
    {
        Scanner scaanner = new Scanner(System.in);
        long num = scaanner.nextLong();
        long blue = scaanner.nextLong();
        long red = scaanner.nextLong();

        // 赤と青を合計することでグループ化する
        // 割り切れる数値
        long divisible_group = (num / (blue+red));
        // 割り切れない数値
        long indivisible_group = (num % (blue+red));
        // 合計値
        long total =  divisible_group * blue;

        if (indivisible_group <= blue) {
            System.out.println(total+ indivisible_group);
        } else {
            System.out.println(total+ blue);
        }

    }
} public class Main
{
    public static void main(String [] args)
    {
        Scanner scaanner = new Scanner(System.in);
        long num = scaanner.nextLong();
        long blue = scaanner.nextLong();
        long red = scaanner.nextLong();

        // 赤と青を合計することでグループ化する
        // 割り切れる数値
        long divisible_group = (num / (blue+red));
        // 割り切れない数値
        long indivisible_group = (num % (blue+red));
        // 合計値
        long total =  divisible_group * blue;

        if (indivisible_group <= blue) {
            System.out.println(total+ indivisible_group);
        } else {
            System.out.println(total+ blue);
        }

    }
} Main
// 問題URL
// https://atcoder.jp/contests/abc158/tasks/abc158_b

import java.util.Scanner;

public class Main
{
    public static void main(String [] args)
    {
        Scanner scaanner = new Scanner(System.in);
        long num = scaanner.nextLong();
        long blue = scaanner.nextLong();
        long red = scaanner.nextLong();

        // 赤と青を合計することでグループ化する
        // 割り切れる数値
        long divisible_group = (num / (blue+red));
        // 割り切れない数値
        long indivisible_group = (num % (blue+red));
        // 合計値
        long total =  divisible_group * blue;

        if (indivisible_group <= blue) {
            System.out.println(total+ indivisible_group);
        } else {
            System.out.println(total+ blue);
        }

    }
}