program name
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int64):: a,b,n
    read*, a,b,n
    ! print'(i0)', min(n,(b-1))
    print'(i0)', (a*min(n,(b-1)))/b - a*(min(n,(b-1))/b)

    
end program name