#include <iostream>
#include <iomanip>
#include <cassert>
#include <vector>
#include <numeric>
#include <cmath>
using namespace std;
using ll = long long;
using ld = long double;
template <typename T>
struct Matrix {
    Matrix(const int n) : Matrix{n, n} {}
    Matrix(const int r, const int c) : R{r}, C{c}, table(r, vector<T>(c, static_cast<T>(0))) {}
    vector<T>& operator[](const int n) { return table[n]; }
    const vector<T>& operator[](const int n) const { return table[n]; }
    Matrix operator*(const Matrix& mat) const
    {
        assert(C == mat.R);
        Matrix result(R, mat.C);
        for (int i = 0; i < R; i++) {
            for (int j = 0; j < mat.C; j++) {
                T sum = 0;
                for (int k = 0; k < C; k++) {
                    sum += table[i][k] * mat[k][j];
                }
                result[i][j] = sum;
            }
        }
        return result;
    }
    static Matrix Unit(const int n)
    {
        Matrix<T> ans(n, n);
        for (int i = 0; i < n; i++) {
            ans[i][i] = 1;
        }
        return ans;
    }
    int R;
    int C;
    vector<vector<T>> table;
};

template <typename T>
struct Vector {
    Vector(const int n) : R(n), table(n, 0){};
    T& operator[](const int n) { return table[n]; }
    const T& operator[](const int n) const { return table[n]; }
    int R;
    vector<T> table;
};
template <typename T>
inline Vector<T> operator*(const Matrix<T>& mat, const Vector<T>& v)
{
    assert(mat.C == v.R);
    Vector<T> result(mat.R);
    for (int i = 0; i < v.R; i++) {
        for (int j = 0; j < mat.R; j++) {
            result[i] += mat[i][j] * v[j];
        }
    }
    return result;
}

template <typename T>
Matrix<T> power(const Matrix<T>& mat, const ll n)
{
    assert(mat.R == mat.C);
    if (n == 0) {
        return Matrix<T>::Unit(mat.R);
    } else {
        if (n % 2 == 1) {
            return power(mat, n - 1) * mat;
        } else {
            const auto pp = power(mat, n / 2);
            return pp * pp;
        }
    }
}

template <typename T>
Vector<T> GaussJordan(const Matrix<T>& mat, const Vector<T>& v)
{
    assert(mat.R == mat.C);
    const int N = mat.R;
    Matrix<T> A(N, N + 1);
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < N; j++) {
            A[i][j] = mat[i][j];
        }
    }
    for (int i = 0; i < N; i++) {
        A[i][N] = v[i];
    }
    for (int i = 0; i < N; i++) {
        int pivot = i;
        for (int j = i; j < N; j++) {
            if (abs(A[j][i]) > abs(A[pivot][i])) {
                pivot = j;
            }
        }
        assert(A[pivot][i]);
        swap(A[i], A[pivot]);
        for (int j = i + 1; j <= N; j++) {
            A[i][j] /= A[i][i];
        }
        for (int j = 0; j < N; j++) {
            if (i != j) {
                for (int k = i + 1; k <= N; k++) {
                    A[j][k] -= A[j][i] * A[i][k];
                }
            }
        }
    }
    Vector<T> res(N);
    for (int i = 0; i < N; i++) {
        res[i] = A[i][N];
    }
    return res;
}

int main()
{
    ll S;
    int N, K;
    cin >> S >> N >> K;
    const int SIZE = N * K;
    S = abs(S);
    if (N == 1) {
        cout << (S % K != 0 ? -1 : S / K) << endl;
        return 0;
    }
    vector<ll> dp(SIZE + 1, 0);
    dp[0] = 1;
    for (int i = 0; i < K; i++) {
        vector<ll> tmp(SIZE + 1, 0);
        for (int i = 0; i <= SIZE; i++) {
            if (dp[i] > 0) {
                for (int j = 1; j <= N; j++) {
                    tmp[i + j] += dp[i];
                }
            }
        }
        dp = tmp;
    }
    const ll sum = accumulate(dp.begin(), dp.end(), 0LL);
    vector<ld> p(SIZE + 1);
    for (int i = 0; i <= SIZE; i++) {
        p[i] = (ld)dp[i] / sum;
    }
    auto index = [&](const int i) {
        return SIZE - 1 - i;
    };
    Matrix<ld> mat(2 * SIZE - 1, 2 * SIZE - 1);
    Vector<ld> vec(2 * SIZE - 1);
    for (int i = -SIZE + 1; i < SIZE; i++) {
        mat[index(i)][index(i)] = 1;
        vec[index(i)] = 1;
        if (i < 0) {
            for (int j = 1; j <= SIZE; j++) {
                mat[index(i)][index(i + j)] = -p[j];
            }
        } else if (i > 0) {
            for (int j = 1; j <= SIZE; j++) {
                mat[index(i)][index(i - j)] = -p[j];
            }
        } else {
            vec[index(i)] = 0;
        }
    }
    const auto neighbor = GaussJordan(mat, vec);
    if (S < SIZE) {
        cout << fixed << setprecision(15) << neighbor[index(S)] << endl;
    } else {
        Matrix<ld> mat2(SIZE + 1, SIZE + 1);
        for (int i = 0; i < SIZE - 1; i++) {
            mat2[i][i + 1] = 1;
        }
        for (int i = 0; i < SIZE; i++) {
            mat2[SIZE - 1][i] = p[SIZE - i];
        }
        mat2[SIZE - 1][SIZE] = 1;
        mat2[SIZE][SIZE] = 1;
        Vector<ld> vec2(SIZE + 1);
        for (int i = 0; i < SIZE; i++) {
            vec2[i] = neighbor[index(i)];
        }
        vec2[SIZE] = 1;
        const auto ans = power(mat2, S - SIZE + 1) * vec2;
        cout << fixed << setprecision(15) << ans[SIZE - 1] << endl;
    }

    return 0;
}



Measured memory_bytes: 4068