program problemD
  implicit none


character(len=128) :: S
integer(8) :: A,B,N,k,f1,f2
real(8) r1,r2

read(*,*) A,B,N

! do k=1,N
!   r1=real(A*k)/real(B)
!   if (int(r1)==r1) then
!     f1=int(r1)
!   else
!     f1=int(r1)+1
!   end if
! end do

if (N<B) then
  f1=int(real(A*N)/real(B))
else
  k=B-1
  f1=int(real(A*k)/real(B))
end if 

write(*,*) f1



stop
end program


subroutine ex(n,k)
  implicit none

  integer(16), intent(in) :: n
  integer(16), intent(out) :: k
  integer(16) :: l, i

  l=1
  i=n

  do while (i>0)
    l=l*i
    i=i-1
  end do

  k=l

  return
end subroutine ex
