import Data.Ratio
import Text.Printf

main = do
  [n,m,d] <- map read . words <$> getLine :: IO [Integer]
  
  printf "%f\n" (fromRational (if d == 0 then (m-1) % n else 2*(n-d)*(m-1) % (n*n)) :: Double)
