local a,b,n=io.read("n","n","n")
local answer=-10^20
for i=(n>b and b or n),1,-1 do
    local x=math.floor(a*i/b)-a*math.floor(i/b)
    if answer<x then
        answer=x
    else
        break
    end
end
print(answer)