#include <bits/stdc++.h>
using namespace std;
using ld = long double;

template<class T>
class matrix {
	vector<vector<T>> dat;
public:
	matrix(int row) : dat(row, vector<T>(1)) {}
	matrix(int row, int col) : dat(row, vector<T>(col)) {}
	matrix(int row, int col, const T& id) : dat(row, vector<T>(col, id)) {}
	matrix(const vector<vector<T>>& v) : dat(v) {}
	matrix(const vector<T>& v) : dat(v.size(), vector<T>(1)) {
		for (int i = 0; i < (int)v.size(); ++i) dat[i][0] = v[i];
	}
	explicit operator vector<vector<T>>() const { return dat; }
	int row_size() const { return dat.size(); }
	int col_size() const { return dat[0].size(); }
	matrix<T>& operator+=(const matrix<T>& that) {
		int row = row_size(), col = col_size();
		assert(row_size() == that.row_size() && col_size() == that.col_size());
		for (int i = 0; i < row; ++i) for (int j = 0; j < col; ++j) dat[i][j] += that[i][j];
		return *this;
	}
	matrix<T>& operator-=(const matrix<T>& that) {
		int row = row_size(), col = col_size();
		assert(row_size() == that.row_size() && col_size() == that.col_size());
		for (int i = 0; i < row; ++i) for (int j = 0; j < col; ++j) dat[i][j] -= that[i][j];
		return *this;
	}
	matrix<T>& operator*=(const T& that) {
		int row = row_size(), col = col_size();
		for (int i = 0; i < row; ++i) for (int j = 0; j < col; ++j) dat[i][j] *= that;
		return *this;
	}
	matrix<T>& operator/=(const T& that) {
		int row = row_size(), col = col_size();
		for (int i = 0; i < row; ++i) for (int j = 0; j < col; ++j) dat[i][j] /= that;
		return *this;
	}
	matrix<T> operator*(const matrix<T>& that) const {
		int x = row_size(), y = col_size(), z = that.col_size();
		assert(col_size() == that.row_size());
		matrix<T> res(x, z);
		for (int i = 0; i < x; ++i) {
			for (int j = 0; j < y; ++j) {
				for (int k = 0; k < z; ++k) {
					res[i][k] += dat[i][j] * that[j][k];
				}
			}
		}
		return res;
	}
	matrix<T>& operator*=(const matrix<T>& that) { return *this = *this * that; }

	vector<T>& operator[](size_t i) & { return dat[i]; }
	const vector<T>& operator[](size_t i) const& { return dat[i]; }
	vector<T> operator[](size_t i) const&& { return move(dat[i]); }

	T& get(int i, int j) & {
		assert(0 <= i && i < row_size());
		assert(0 <= j && j < col_size());
		return dat[i][j];
	}
	const T& get(int i, int j) const& {
		assert(0 <= i && i < row_size());
		assert(0 <= j && j < col_size());
		return dat[i][j];
	}
	T get(int i, int j) const&& {
		assert(0 <= i && i < row_size());
		assert(0 <= j && j < col_size());
		return move(dat[i][j]);
	}
	matrix<T> transpose() const {
		int row = row_size(), col = col_size();
		matrix<T> res(col, row);
		for (int i = 0; i < row; ++i) for (int j = 0; j < col; ++j) res[j][i] = dat[i][j];
		return res;
	}
};

template <class T> matrix<T> operator+(const matrix<T>& a, const matrix<T>& b) { return matrix<T>(a) += b; }
template <class T> matrix<T> operator-(const matrix<T>& a, const matrix<T>& b) { return matrix<T>(a) -= b; }
template <class T> matrix<T> operator*(const matrix<T>& a, const T& b) { return matrix<T>(a) *= b; }
template <class T> matrix<T> operator*(const T& a, const matrix<T>& b) { return matrix<T>(b) *= a; }
template <class T> matrix<T> operator/(const matrix<T>& a, const T& b) { return matrix<T>(a) /= b; }

template <class T> matrix<T> identity_matrix(int n) {
	matrix<T> a(n, n);
	for (int i = 0; i < n; i++) a[i][i] = T(1);
	return a;
}

template <class T> matrix<T> pow(const matrix<T>& a, long long b) {
	const int n = a.row_size();
	assert(a.row_size() == a.col_size() && 0 <= b);
	matrix<T> res = identity_matrix<T>(n), x(a);
	while (true) {
		if (b & 1LL) res *= x;
		if (!(b >>= 1LL)) break;
		x *= x;
	}
	return res;
}

const ld eps = 1e-10;

template <typename T>
bool is_zero(T val) {
	return val == T(0);
}

template <>
bool is_zero(ld val) {
	return std::abs(val) < eps;
}

template <typename T>
vector<T> gauss_jordan(const matrix<T>& A, const vector<T>& b) {
	const int n = A.row_size();
	matrix<T> B(n, n + 1);
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) B[i][j] = A[i][j];
		B[i][n] = b[i];
	}
	for (int i = 0; i < n; ++i) {
		int pivot = i;
		for (int j = i; j < n; ++j) {
			if (std::abs(B[j][i]) > std::abs(B[pivot][i])) pivot = j;
		}
		if (i != pivot) swap(B[i], B[pivot]);
		if (is_zero(B[i][i])) return vector<T>(); // no solution
		for (int j = i + 1; j <= n; ++j) B[i][j] /= B[i][i];
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			for (int k = i + 1; k <= n; ++k) B[j][k] -= B[j][i] * B[i][k];
		}
	}
	vector<T> x(n);
	for (int i = 0; i < n; ++i) x[i] = B[i][n];
	return x;
}

int main()
{
	cout << fixed << setprecision(8);
	int S, N, K;
	cin >> S >> N >> K; S = abs(S);
	if (S == 0) {
		cout << 0 << endl;
		return 0;
	}
	if (N == 1) {
		cout << (S % K == 0 ? S / K : -1) << endl;
		return 0;
	}
	vector<ld> dp = { 1 };
	for (int i = 0; i < K; i++) {
		vector<ld> tmp((i + 1) * N + 1);
		for (int j = 0; j <= i * N; j++) {
			for (int k = 1; k <= N; k++) {
				tmp[j + k] += dp[j] / N;
			}
		}
		dp.swap(tmp);
	}
	int M = N * K;
	matrix<ld> mat(M, M);
	vector<ld> b(M);
	mat[0][0] = 1;
	b[0] = 0;
	for (int i = 1; i < M; i++) {
		mat[i][i] = -1;
		ld kei = i * 2 <= M ? 1 / (1 - dp[i * 2]) : 1;
		b[i] -= kei;
		for (int j = 0; j <= M; j++) {
			int p = abs(i - j);
			if (p == i) continue;
			mat[i][p] += dp[j] * kei;
		}
	}
	auto vec = gauss_jordan(mat, b);
	assert(!vec.empty());
	vec.push_back(1);
	matrix<ld> kei(M + 1, M + 1);
	for (int i = 0; i < M - 1; i++) {
		kei[i][i + 1] = 1;
	}
	for (int i = 0; i < M; i++) {
		kei[M - 1][i] = dp[M - i];
	}
	kei[M - 1][M] = 1;
	kei[M][M] = 1;
	kei = pow(kei, S);
	ld res = 0;
	for (int i = 0; i <= M; i++) {
		res += kei[0][i] * vec[i];
	}
	cout << res << endl;
	return 0;
}



Measured memory_bytes: 3796