n, m, d = gets.chomp.split.map(&:to_i)
seed = (1..n).to_a
scores = []
seed.repeated_permutation(m).each do |array|
  score = 0
  array.each_cons(2) { |a, b|
    if (a - b).abs == d
      score += 1
    end
  }
  scores.push(score)
end
answer = scores.inject(:+).to_f / scores.size
puts answer