program main
	implicit none
    integer(16)::n,a,b,d,ans
    read(*,*) n,a,b
    d=n/(a+b)
    ans=d*a
    if(n-d>a)then
    	ans=ans+a
    else
    	ans=ans+n-d
    end if
    write(*,*) ans
    stop
end program main

    