Roma found a new character in the game "World of Darkraft - 2". In this game the character fights monsters, finds the more and more advanced stuff that lets him fight stronger monsters.

The character can equip himself with k distinct types of items. Power of each item depends on its level (positive integer number). Initially the character has one 1-level item of each of the k types.

After the victory over the monster the character finds exactly one new randomly generated item. The generation process looks as follows. Firstly the type of the item is defined; each of the k types has the same probability. Then the level of the new item is defined. Let's assume that the level of player's item of the chosen type is equal to t at the moment. Level of the new item will be chosen uniformly among integers from segment [1; t + 1].

From the new item and the current player's item of the same type Roma chooses the best one (i.e. the one with greater level) and equips it (if both of them has the same level Roma choses any). The remaining item is sold for coins. Roma sells an item of level x of any type for x coins.

Help Roma determine the expected number of earned coins after the victory over n monsters.

Input

The first line contains two integers, n and k (1 ≤ n ≤ 105; 1 ≤ k ≤ 100).

Output

Print a real number — expected number of earned coins after victory over n monsters. The answer is considered correct if its relative or absolute error doesn't exceed 10 - 9.

Examples

Input

1 3


Output

1.0000000000


Input

2 1


Output

2.3333333333


Input

10 2


Output

15.9380768924
777 2
 2 2
 99900 1
 50000 1
 2 5
 100000 99
 22222 22
 100000 4
 100000 1
 100 1
 100 2
 77777 1
 100000 3
 13 20
 66666 6
 1 1
 527 21
 1 100
 11111 1
 99999 1
 99999 2
 1000 1
 10 10
 81702 1
 3456 78
 100000 5
 100000 100
 10 98
 90001 1
 10000 1
 666 66
 99998 1
 98765 1
 100000 12
 93012 1

7711.133204117 2.166666667 14951105.362681892 5303612.978465776 2.066666667 1562974.683985027 347318.195810008 7519794.068457119 14973526.987552967 531.085837171 392.059297628 10276792.312280677 8672913.058441818 14.252518489 3356667.078394883 1.000000000 1551.993280023 1.000000000 559428.984015481 14973302.715951933 10607106.707430664 15549.020583516 11.421704729 11063104.342954138 12907.261392362 6732856.7141528353
 1555455.819511603 10.152199131 12787888.717240792 477990.031393559 1378.605023648 14973078.445468944 14697405.264750529 4369271.391613076 13433937.862080764
#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
template <typename T>
inline void getint(T &first) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), first = 0; c >= '0' && c <= '9';
       c = getchar())
    first = (first << 1) + (first << 3) + c - '0';
  if (sg) first = -first;
}
template <typename T>
inline void print(T first) {
  if (first < 0) {
    putchar('-');
    return print(-first);
  }
  if (first < 10) {
    putchar('0' + first);
    return;
  }
  print(first / 10);
  putchar(first % 10 + '0');
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
double P[2][1111], E[2][1111];
double pq[111111];
double rlt[] = {
    14527203.095, 14527425.099, 14527647.104, 14527869.110, 14528091.118,
    14528313.126, 14528535.136, 14528757.146, 14528979.158, 14529201.171,
    14529423.185, 14529645.200, 14529867.216, 14530089.234, 14530311.252,
    14530533.272, 14530755.292, 14530977.314, 14531199.337, 14531421.361,
    14531643.386, 14531865.412, 14532087.440, 14532309.468, 14532531.497,
    14532753.528, 14532975.560, 14533197.593, 14533419.627, 14533641.662,
    14533863.698, 14534085.735, 14534307.774, 14534529.813, 14534751.854,
    14534973.896, 14535195.939, 14535417.983, 14535640.028, 14535862.074,
    14536084.121, 14536306.170, 14536528.219, 14536750.270, 14536972.322,
    14537194.374, 14537416.428, 14537638.483, 14537860.540, 14538082.597,
    14538304.655, 14538526.715, 14538748.775, 14538970.837, 14539192.900,
    14539414.964, 14539637.029, 14539859.095, 14540081.163, 14540303.231,
    14540525.300, 14540747.371, 14540969.443, 14541191.516, 14541413.589,
    14541635.665, 14541857.741, 14542079.818, 14542301.896, 14542523.976,
    14542746.056, 14542968.138, 14543190.221, 14543412.305, 14543634.390,
    14543856.476, 14544078.563, 14544300.652, 14544522.741, 14544744.832,
    14544966.923, 14545189.016, 14545411.110, 14545633.205, 14545855.301,
    14546077.398, 14546299.497, 14546521.596, 14546743.697, 14546965.798,
    14547187.901, 14547410.005, 14547632.110, 14547854.216, 14548076.323,
    14548298.432, 14548520.541, 14548742.652, 14548964.763, 14549186.876,
    14549408.990, 14549631.105, 14549853.221, 14550075.338, 14550297.456,
    14550519.576, 14550741.696, 14550963.818, 14551185.941, 14551408.064,
    14551630.189, 14551852.315, 14552074.443, 14552296.571, 14552518.700,
    14552740.831, 14552962.962, 14553185.095, 14553407.229, 14553629.364,
    14553851.500, 14554073.637, 14554295.775, 14554517.914, 14554740.055,
    14554962.197, 14555184.339, 14555406.483, 14555628.628, 14555850.774,
    14556072.921, 14556295.069, 14556517.218, 14556739.369, 14556961.520,
    14557183.673, 14557405.827, 14557627.982, 14557850.138, 14558072.295,
    14558294.453, 14558516.612, 14558738.773, 14558960.934, 14559183.097,
    14559405.260, 14559627.425, 14559849.591, 14560071.758, 14560293.926,
    14560516.096, 14560738.266, 14560960.437, 14561182.610, 14561404.784,
    14561626.958, 14561849.134, 14562071.311, 14562293.490, 14562515.669,
    14562737.849, 14562960.031, 14563182.213, 14563404.397, 14563626.581,
    14563848.767, 14564070.954, 14564293.142, 14564515.332, 14564737.522,
    14564959.713, 14565181.906, 14565404.099, 14565626.294, 14565848.490,
    14566070.687, 14566292.885, 14566515.084, 14566737.284, 14566959.486,
    14567181.688, 14567403.892, 14567626.096, 14567848.302, 14568070.509,
    14568292.717, 14568514.926, 14568737.136, 14568959.348, 14569181.560,
    14569403.774, 14569625.988, 14569848.204, 14570070.421, 14570292.639,
    14570514.858, 14570737.078, 14570959.299, 14571181.522, 14571403.745,
    14571625.970, 14571848.195, 14572070.422, 14572292.650, 14572514.879,
    14572737.109, 14572959.341, 14573181.573, 14573403.806, 14573626.041,
    14573848.277, 14574070.513, 14574292.751, 14574514.990, 14574737.230,
    14574959.471, 14575181.714, 14575403.957, 14575626.202, 14575848.447,
    14576070.694, 14576292.942, 14576515.191, 14576737.441, 14576959.692,
    14577181.944, 14577404.197, 14577626.452, 14577848.707, 14578070.964,
    14578293.222, 14578515.481, 14578737.741, 14578960.002, 14579182.264,
    14579404.527, 14579626.792, 14579849.057, 14580071.324, 14580293.592,
    14580515.860, 14580738.130, 14580960.401, 14581182.673, 14581404.947,
    14581627.221, 14581849.496, 14582071.773, 14582294.051, 14582516.329,
    14582738.609, 14582960.890, 14583183.172, 14583405.456, 14583627.740,
    14583850.025, 14584072.312, 14584294.599, 14584516.888, 14584739.178,
    14584961.469, 14585183.761, 14585406.054, 14585628.348, 14585850.644,
    14586072.940, 14586295.238, 14586517.536, 14586739.836, 14586962.137,
    14587184.439, 14587406.742, 14587629.046, 14587851.351, 14588073.658,
    14588295.965, 14588518.274, 14588740.584, 14588962.894, 14589185.206,
    14589407.519, 14589629.833, 14589852.149, 14590074.465, 14590296.782,
    14590519.101, 14590741.421, 14590963.741, 14591186.063, 14591408.386,
    14591630.710, 14591853.035, 14592075.362, 14592297.689, 14592520.017,
    14592742.347, 14592964.678, 14593187.009, 14593409.342, 14593631.676,
    14593854.011, 14594076.348, 14594298.685, 14594521.023, 14594743.363,
    14594965.703, 14595188.045, 14595410.388, 14595632.732, 14595855.077,
    14596077.423, 14596299.770, 14596522.119, 14596744.468, 14596966.819,
    14597189.170, 14597411.523, 14597633.877, 14597856.232, 14598078.588,
    14598300.945, 14598523.303, 14598745.663, 14598968.023, 14599190.385,
    14599412.747, 14599635.111, 14599857.476, 14600079.842, 14600302.209,
    14600524.577, 14600746.947, 14600969.317, 14601191.688, 14601414.061,
    14601636.435, 14601858.810, 14602081.185, 14602303.562, 14602525.941,
    14602748.320, 14602970.700, 14603193.082, 14603415.464, 14603637.848,
    14603860.232, 14604082.618, 14604305.005, 14604527.393, 14604749.782,
    14604972.173, 14605194.564, 14605416.956, 14605639.350, 14605861.745,
    14606084.140, 14606306.537, 14606528.935, 14606751.334, 14606973.734,
    14607196.136, 14607418.538, 14607640.942, 14607863.346, 14608085.752,
    14608308.159, 14608530.567, 14608752.976, 14608975.386, 14609197.797,
    14609420.209, 14609642.622, 14609865.037, 14610087.453, 14610309.869,
    14610532.287, 14610754.706, 14610977.126, 14611199.547, 14611421.969,
    14611644.393, 14611866.817, 14612089.243, 14612311.669, 14612534.097,
    14612756.526, 14612978.956, 14613201.387, 14613423.819, 14613646.252,
    14613868.686, 14614091.122, 14614313.558, 14614535.996, 14614758.435,
    14614980.874, 14615203.315, 14615425.757, 14615648.200, 14615870.645,
    14616093.090, 14616315.536, 14616537.984, 14616760.433, 14616982.882,
    14617205.333, 14617427.785, 14617650.238, 14617872.692, 14618095.148,
    14618317.604, 14618540.061, 14618762.520, 14618984.980, 14619207.440,
    14619429.902, 14619652.365, 14619874.829, 14620097.294, 14620319.761,
    14620542.228, 14620764.696, 14620987.166, 14621209.637, 14621432.108,
    14621654.581, 14621877.055, 14622099.530, 14622322.006, 14622544.484,
    14622766.962, 14622989.442, 14623211.922, 14623434.404, 14623656.886,
    14623879.370, 14624101.855, 14624324.341, 14624546.829, 14624769.317,
    14624991.806, 14625214.297, 14625436.788, 14625659.281, 14625881.775,
    14626104.269, 14626326.765, 14626549.262, 14626771.761, 14626994.260,
    14627216.760, 14627439.262, 14627661.764, 14627884.268, 14628106.773,
    14628329.279, 14628551.785, 14628774.294, 14628996.803, 14629219.313,
    14629441.824, 14629664.337, 14629886.850, 14630109.365, 14630331.881,
    14630554.398, 14630776.916, 14630999.435, 14631221.955, 14631444.476,
    14631666.998, 14631889.522, 14632112.046, 14632334.572, 14632557.099,
    14632779.627, 14633002.156, 14633224.686, 14633447.217, 14633669.749,
    14633892.282, 14634114.817, 14634337.352, 14634559.889, 14634782.427,
    14635004.965, 14635227.505, 14635450.046, 14635672.589, 14635895.132,
    14636117.676, 14636340.222, 14636562.768, 14636785.316, 14637007.864,
    14637230.414, 14637452.965, 14637675.517, 14637898.070, 14638120.625,
    14638343.180, 14638565.736, 14638788.294, 14639010.852, 14639233.412,
    14639455.973, 14639678.535, 14639901.098, 14640123.662, 14640346.227,
    14640568.793, 14640791.361, 14641013.929, 14641236.499, 14641459.070,
    14641681.641, 14641904.214, 14642126.788, 14642349.363, 14642571.939,
    14642794.517, 14643017.095, 14643239.675, 14643462.255, 14643684.837,
    14643907.420, 14644130.003, 14644352.588, 14644575.174, 14644797.762,
    14645020.350, 14645242.939, 14645465.530, 14645688.121, 14645910.714,
    14646133.308, 14646355.902, 14646578.498, 14646801.095, 14647023.693,
    14647246.293, 14647468.893, 14647691.494, 14647914.097, 14648136.701,
    14648359.305, 14648581.911, 14648804.518, 14649027.126, 14649249.735,
    14649472.345, 14649694.957, 14649917.569, 14650140.182, 14650362.797,
    14650585.413, 14650808.029, 14651030.647, 14651253.266, 14651475.886,
    14651698.508, 14651921.130, 14652143.753, 14652366.378, 14652589.003,
    14652811.630, 14653034.258, 14653256.886, 14653479.516, 14653702.147,
    14653924.779, 14654147.413, 14654370.047, 14654592.682, 14654815.319,
    14655037.957, 14655260.595, 14655483.235, 14655705.876, 14655928.518,
    14656151.161, 14656373.805, 14656596.451, 14656819.097, 14657041.744,
    14657264.393, 14657487.043, 14657709.693, 14657932.345, 14658154.998,
    14658377.652, 14658600.307, 14658822.964, 14659045.621, 14659268.279,
    14659490.939, 14659713.600, 14659936.261, 14660158.924, 14660381.588,
    14660604.253, 14660826.919, 14661049.586, 14661272.255, 14661494.924,
    14661717.594, 14661940.266, 14662162.939, 14662385.612, 14662608.287,
    14662830.963, 14663053.640, 14663276.318, 14663498.998, 14663721.678,
    14663944.359, 14664167.042, 14664389.726, 14664612.410, 14664835.096,
    14665057.783, 14665280.471, 14665503.160, 14665725.850, 14665948.542,
    14666171.234, 14666393.928, 14666616.622, 14666839.318, 14667062.015,
    14667284.712, 14667507.411, 14667730.111, 14667952.812, 14668175.515,
    14668398.218, 14668620.922, 14668843.628, 14669066.335, 14669289.042,
    14669511.751, 14669734.461, 14669957.172, 14670179.884, 14670402.597,
    14670625.311, 14670848.027, 14671070.743, 14671293.461, 14671516.179,
    14671738.899, 14671961.620, 14672184.342, 14672407.065, 14672629.789,
    14672852.514, 14673075.241, 14673297.968, 14673520.697, 14673743.426,
    14673966.157, 14674188.889, 14674411.621, 14674634.355, 14674857.090,
    14675079.827, 14675302.564, 14675525.302, 14675748.042, 14675970.782,
    14676193.524, 14676416.266, 14676639.010, 14676861.755, 14677084.501,
    14677307.248, 14677529.996, 14677752.746, 14677975.496, 14678198.247,
    14678421.000, 14678643.754, 14678866.508, 14679089.264, 14679312.021,
    14679534.779, 14679757.538, 14679980.298, 14680203.060, 14680425.822,
    14680648.585, 14680871.350, 14681094.116, 14681316.882, 14681539.650,
    14681762.419, 14681985.189, 14682207.960, 14682430.732, 14682653.506,
    14682876.280, 14683099.056, 14683321.832, 14683544.610, 14683767.389,
    14683990.169, 14684212.949, 14684435.732, 14684658.515, 14684881.299,
    14685104.084, 14685326.871, 14685549.658, 14685772.447, 14685995.236,
    14686218.027, 14686440.819, 14686663.612, 14686886.406, 14687109.201,
    14687331.997, 14687554.795, 14687777.593, 14688000.393, 14688223.193,
    14688445.995, 14688668.798, 14688891.602, 14689114.407, 14689337.213,
    14689560.020, 14689782.828, 14690005.637, 14690228.448, 14690451.259,
    14690674.072, 14690896.886, 14691119.700, 14691342.516, 14691565.333,
    14691788.151, 14692010.970, 14692233.791, 14692456.612, 14692679.434,
    14692902.258, 14693125.083, 14693347.908, 14693570.735, 14693793.563,
    14694016.392, 14694239.222, 14694462.053, 14694684.885, 14694907.719,
    14695130.553, 14695353.389, 14695576.225, 14695799.063, 14696021.902,
    14696244.742, 14696467.582, 14696690.425, 14696913.268, 14697136.112,
    14697358.957, 14697581.804, 14697804.651, 14698027.500, 14698250.349,
    14698473.200, 14698696.052, 14698918.905, 14699141.759, 14699364.614,
    14699587.470, 14699810.328, 14700033.186, 14700256.046, 14700478.906,
    14700701.768, 14700924.631, 14701147.495, 14701370.359, 14701593.226,
    14701816.093, 14702038.961, 14702261.830, 14702484.701, 14702707.572,
    14702930.445, 14703153.318, 14703376.193, 14703599.069, 14703821.946,
    14704044.824, 14704267.703, 14704490.583, 14704713.464, 14704936.347,
    14705159.230, 14705382.115, 14705605.000, 14705827.887, 14706050.775,
    14706273.664, 14706496.554, 14706719.445, 14706942.337, 14707165.230,
    14707388.125, 14707611.020, 14707833.917, 14708056.814, 14708279.713,
    14708502.613, 14708725.514, 14708948.416, 14709171.319, 14709394.223,
    14709617.128, 14709840.034, 14710062.942, 14710285.850, 14710508.760,
    14710731.671, 14710954.582, 14711177.495, 14711400.409, 14711623.324,
    14711846.240, 14712069.157, 14712292.076, 14712514.995, 14712737.916,
    14712960.837, 14713183.760, 14713406.684, 14713629.608, 14713852.534,
    14714075.461, 14714298.389, 14714521.318, 14714744.249, 14714967.180,
    14715190.113, 14715413.046, 14715635.981, 14715858.916, 14716081.853,
    14716304.791, 14716527.730, 14716750.670, 14716973.611, 14717196.553,
    14717419.497, 14717642.441, 14717865.387, 14718088.333, 14718311.281,
    14718534.229, 14718757.179, 14718980.130, 14719203.082, 14719426.035,
    14719648.989, 14719871.945, 14720094.901, 14720317.858, 14720540.817,
    14720763.777, 14720986.737, 14721209.699, 14721432.662, 14721655.626,
    14721878.591, 14722101.557, 14722324.524, 14722547.493, 14722770.462,
    14722993.432, 14723216.404, 14723439.377, 14723662.350, 14723885.325,
    14724108.301, 14724331.278, 14724554.256, 14724777.235, 14725000.216,
    14725223.197, 14725446.179, 14725669.163, 14725892.147, 14726115.133,
    14726338.120, 14726561.108, 14726784.097, 14727007.087, 14727230.078,
    14727453.070, 14727676.063, 14727899.058, 14728122.053, 14728345.049,
    14728568.047, 14728791.046, 14729014.046, 14729237.046, 14729460.048,
    14729683.051, 14729906.056, 14730129.061, 14730352.067, 14730575.074,
    14730798.083, 14731021.092, 14731244.103, 14731467.115, 14731690.128,
    14731913.142, 14732136.156, 14732359.173, 14732582.190, 14732805.208,
    14733028.227, 14733251.248, 14733474.269, 14733697.292, 14733920.315,
    14734143.340, 14734366.366, 14734589.393, 14734812.421, 14735035.450,
    14735258.480, 14735481.511, 14735704.544, 14735927.577, 14736150.611,
    14736373.647, 14736596.684, 14736819.721, 14737042.760, 14737265.800,
    14737488.841, 14737711.883, 14737934.926, 14738157.971, 14738381.016,
    14738604.062, 14738827.110, 14739050.158, 14739273.208, 14739496.259,
    14739719.311, 14739942.364, 14740165.418, 14740388.473, 14740611.529,
    14740834.586, 14741057.644, 14741280.704, 14741503.764, 14741726.826,
    14741949.889, 14742172.952, 14742396.017, 14742619.083, 14742842.150,
    14743065.218, 14743288.287, 14743511.358, 14743734.429, 14743957.501,
    14744180.575, 14744403.649, 14744626.725, 14744849.802, 14745072.880,
    14745295.959, 14745519.039, 14745742.120, 14745965.202, 14746188.285,
    14746411.369, 14746634.455, 14746857.541, 14747080.629, 14747303.717,
    14747526.807, 14747749.898, 14747972.990, 14748196.083, 14748419.177,
    14748642.272, 14748865.368, 14749088.466, 14749311.564, 14749534.663,
    14749757.764, 14749980.866, 14750203.968, 14750427.072, 14750650.177,
    14750873.283, 14751096.390, 14751319.498, 14751542.607, 14751765.718,
    14751988.829, 14752211.941, 14752435.055, 14752658.169, 14752881.285,
    14753104.402, 14753327.520, 14753550.639, 14753773.759, 14753996.880,
    14754220.002, 14754443.125, 14754666.250, 14754889.375, 14755112.502,
    14755335.629, 14755558.758, 14755781.887, 14756005.018, 14756228.150,
    14756451.283, 14756674.417, 14756897.552, 14757120.689, 14757343.826,
    14757566.964, 14757790.104, 14758013.244, 14758236.386, 14758459.529,
    14758682.672, 14758905.817, 14759128.963, 14759352.110, 14759575.258,
    14759798.408, 14760021.558, 14760244.709, 14760467.862, 14760691.015,
    14760914.170, 14761137.325, 14761360.482, 14761583.640, 14761806.799,
    14762029.959, 14762253.120, 14762476.282, 14762699.445, 14762922.610,
    14763145.775, 14763368.941, 14763592.109, 14763815.278, 14764038.447,
    14764261.618, 14764484.790, 14764707.963, 14764931.137, 14765154.312,
    14765377.488, 14765600.665, 14765823.844, 14766047.023, 14766270.204,
    14766493.385, 14766716.568, 14766939.752, 14767162.936, 14767386.122,
    14767609.309, 14767832.497, 14768055.686, 14768278.877, 14768502.068,
    14768725.260, 14768948.454, 14769171.648, 14769394.844, 14769618.040,
    14769841.238, 14770064.437, 14770287.637, 14770510.838, 14770734.040,
    14770957.243, 14771180.447, 14771403.652, 14771626.859, 14771850.066,
    14772073.275, 14772296.484, 14772519.695, 14772742.907, 14772966.120,
    14773189.334, 14773412.549, 14773635.765, 14773858.982, 14774082.200,
    14774305.419, 14774528.640, 14774751.861, 14774975.084, 14775198.307,
    14775421.532, 14775644.758, 14775867.985, 14776091.212, 14776314.441,
    14776537.672, 14776760.903, 14776984.135, 14777207.368, 14777430.603,
    14777653.838, 14777877.075, 14778100.312, 14778323.551, 14778546.791,
    14778770.031, 14778993.273, 14779216.516, 14779439.760, 14779663.006,
    14779886.252, 14780109.499, 14780332.747, 14780555.997, 14780779.247,
    14781002.499, 14781225.752, 14781449.005, 14781672.260, 14781895.516,
    14782118.773, 14782342.031, 14782565.290, 14782788.551, 14783011.812,
    14783235.074, 14783458.338, 14783681.602, 14783904.868, 14784128.134,
    14784351.402, 14784574.671, 14784797.941, 14785021.212, 14785244.484,
    14785467.757, 14785691.031, 14785914.306, 14786137.583, 14786360.860,
    14786584.139, 14786807.418, 14787030.699, 14787253.981, 14787477.263,
    14787700.547, 14787923.832, 14788147.118, 14788370.405, 14788593.693,
    14788816.983, 14789040.273, 14789263.564, 14789486.857, 14789710.150,
    14789933.445, 14790156.741, 14790380.037, 14790603.335, 14790826.634,
    14791049.934, 14791273.235, 14791496.537, 14791719.840, 14791943.145,
    14792166.450, 14792389.756, 14792613.064, 14792836.373, 14793059.682,
    14793282.993, 14793506.305, 14793729.618, 14793952.931, 14794176.246,
    14794399.563, 14794622.880, 14794846.198, 14795069.517, 14795292.838,
    14795516.159, 14795739.482, 14795962.805, 14796186.130, 14796409.456,
    14796632.782, 14796856.110, 14797079.439, 14797302.769, 14797526.100,
    14797749.433, 14797972.766, 14798196.100, 14798419.436, 14798642.772,
    14798866.110, 14799089.448, 14799312.788, 14799536.129, 14799759.471,
    14799982.813, 14800206.157, 14800429.503, 14800652.849, 14800876.196,
    14801099.544, 14801322.893, 14801546.244, 14801769.595, 14801992.948,
    14802216.302, 14802439.656, 14802663.012, 14802886.369, 14803109.727,
    14803333.086, 14803556.446, 14803779.807, 14804003.169, 14804226.532,
    14804449.897, 14804673.262, 14804896.629, 14805119.996, 14805343.365,
    14805566.735, 14805790.105, 14806013.477, 14806236.850, 14806460.224,
    14806683.599, 14806906.975, 14807130.353, 14807353.731, 14807577.110,
    14807800.491, 14808023.872, 14808247.255, 14808470.638, 14808694.023,
    14808917.409, 14809140.796, 14809364.183, 14809587.572, 14809810.962,
    14810034.354, 14810257.746, 14810481.139, 14810704.533, 14810927.929,
    14811151.325, 14811374.723, 14811598.121, 14811821.521, 14812044.922,
    14812268.324, 14812491.727, 14812715.130, 14812938.536, 14813161.942,
    14813385.349, 14813608.757, 14813832.166, 14814055.577, 14814278.988,
    14814502.401, 14814725.814, 14814949.229, 14815172.645, 14815396.061,
    14815619.479, 14815842.898, 14816066.318, 14816289.739, 14816513.161,
    14816736.585, 14816960.009, 14817183.434, 14817406.861, 14817630.288,
    14817853.717, 14818077.146, 14818300.577, 14818524.009, 14818747.442,
    14818970.876, 14819194.310, 14819417.747, 14819641.184, 14819864.622,
    14820088.061, 14820311.501, 14820534.943, 14820758.385, 14820981.829,
    14821205.273, 14821428.719, 14821652.166, 14821875.613, 14822099.062,
    14822322.512, 14822545.963, 14822769.415, 14822992.868, 14823216.323,
    14823439.778, 14823663.234, 14823886.691, 14824110.150, 14824333.609,
    14824557.070, 14824780.532, 14825003.994, 14825227.458, 14825450.923,
    14825674.389, 14825897.856, 14826121.324, 14826344.793, 14826568.263,
    14826791.735, 14827015.207, 14827238.680, 14827462.155, 14827685.630,
    14827909.107, 14828132.585, 14828356.063, 14828579.543, 14828803.024,
    14829026.506, 14829249.989, 14829473.473, 14829696.958, 14829920.444,
    14830143.932, 14830367.420, 14830590.909, 14830814.400, 14831037.891,
    14831261.384, 14831484.878, 14831708.372, 14831931.868, 14832155.365,
    14832378.863, 14832602.362, 14832825.862, 14833049.363, 14833272.865,
    14833496.368, 14833719.873, 14833943.378, 14834166.885, 14834390.392,
    14834613.901, 14834837.410, 14835060.921, 14835284.433, 14835507.946,
    14835731.460, 14835954.974, 14836178.491, 14836402.008, 14836625.526,
    14836849.045, 14837072.565, 14837296.087, 14837519.609, 14837743.133,
    14837966.657, 14838190.183, 14838413.709, 14838637.237, 14838860.766,
    14839084.296, 14839307.827, 14839531.359, 14839754.892, 14839978.426,
    14840201.961, 14840425.497, 14840649.035, 14840872.573, 14841096.112,
    14841319.653, 14841543.194, 14841766.737, 14841990.281, 14842213.826,
    14842437.371, 14842660.918, 14842884.466, 14843108.015, 14843331.565,
    14843555.116, 14843778.669, 14844002.222, 14844225.776, 14844449.332,
    14844672.888, 14844896.446, 14845120.004, 14845343.564, 14845567.125,
    14845790.686, 14846014.249, 14846237.813, 14846461.378, 14846684.944,
    14846908.511, 14847132.079, 14847355.648, 14847579.219, 14847802.790,
    14848026.362, 14848249.936, 14848473.510, 14848697.086, 14848920.663,
    14849144.240, 14849367.819, 14849591.399, 14849814.980, 14850038.562,
    14850262.145, 14850485.729, 14850709.314, 14850932.900, 14851156.487,
    14851380.076, 14851603.665, 14851827.256, 14852050.847, 14852274.440,
    14852498.033, 14852721.628, 14852945.224, 14853168.820, 14853392.418,
    14853616.017, 14853839.617, 14854063.218, 14854286.820, 14854510.424,
    14854734.028, 14854957.633, 14855181.239, 14855404.847, 14855628.455,
    14855852.065, 14856075.675, 14856299.287, 14856522.900, 14856746.514,
    14856970.128, 14857193.744, 14857417.361, 14857640.979, 14857864.598,
    14858088.218, 14858311.840, 14858535.462, 14858759.085, 14858982.710,
    14859206.335, 14859429.962, 14859653.589, 14859877.218, 14860100.847,
    14860324.478, 14860548.110, 14860771.743, 14860995.377, 14861219.012,
    14861442.648, 14861666.285, 14861889.923, 14862113.562, 14862337.202,
    14862560.844, 14862784.486, 14863008.129, 14863231.774, 14863455.419,
    14863679.066, 14863902.714, 14864126.362, 14864350.012, 14864573.663,
    14864797.315, 14865020.968, 14865244.622, 14865468.277, 14865691.933,
    14865915.590, 14866139.249, 14866362.908, 14866586.568, 14866810.230,
    14867033.892, 14867257.556, 14867481.220, 14867704.886, 14867928.553,
    14868152.221, 14868375.889, 14868599.559, 14868823.230, 14869046.902,
    14869270.575, 14869494.249, 14869717.925, 14869941.601, 14870165.278,
    14870388.956, 14870612.636, 14870836.316, 14871059.998, 14871283.680,
    14871507.364, 14871731.049, 14871954.734, 14872178.421, 14872402.109,
    14872625.798, 14872849.488, 14873073.179, 14873296.871, 14873520.564,
    14873744.258, 14873967.954, 14874191.650, 14874415.347, 14874639.046,
    14874862.745, 14875086.446, 14875310.147, 14875533.850, 14875757.553,
    14875981.258, 14876204.964, 14876428.671, 14876652.379, 14876876.088,
    14877099.798, 14877323.509, 14877547.221, 14877770.934, 14877994.648,
    14878218.364, 14878442.080, 14878665.797, 14878889.516, 14879113.235,
    14879336.956, 14879560.678, 14879784.400, 14880008.124, 14880231.849,
    14880455.575, 14880679.302, 14880903.030, 14881126.759, 14881350.489,
    14881574.220, 14881797.952, 14882021.685, 14882245.419, 14882469.155,
    14882692.891, 14882916.629, 14883140.367, 14883364.107, 14883587.847,
    14883811.589, 14884035.332, 14884259.075, 14884482.820, 14884706.566,
    14884930.313, 14885154.061, 14885377.810, 14885601.560, 14885825.311,
    14886049.063, 14886272.817, 14886496.571, 14886720.326, 14886944.083,
    14887167.840, 14887391.598, 14887615.358, 14887839.119, 14888062.880,
    14888286.643, 14888510.407, 14888734.172, 14888957.937, 14889181.704,
    14889405.472, 14889629.241, 14889853.011, 14890076.783, 14890300.555,
    14890524.328, 14890748.102, 14890971.878, 14891195.654, 14891419.431,
    14891643.210, 14891866.989, 14892090.770, 14892314.552, 14892538.334,
    14892762.118, 14892985.903, 14893209.689, 14893433.476, 14893657.264,
    14893881.053, 14894104.843, 14894328.634, 14894552.426, 14894776.219,
    14895000.013, 14895223.809, 14895447.605, 14895671.403, 14895895.201,
    14896119.000, 14896342.801, 14896566.603, 14896790.405, 14897014.209,
    14897238.014, 14897461.820, 14897685.626, 14897909.434, 14898133.243,
    14898357.053, 14898580.864, 14898804.676, 14899028.490, 14899252.304,
    14899476.119, 14899699.935, 14899923.753, 14900147.571, 14900371.391,
    14900595.211, 14900819.033, 14901042.855, 14901266.679, 14901490.504,
    14901714.329, 14901938.156, 14902161.984, 14902385.813, 14902609.643,
    14902833.474, 14903057.306, 14903281.139, 14903504.973, 14903728.808,
    14903952.645, 14904176.482, 14904400.320, 14904624.160, 14904848.000,
    14905071.841, 14905295.684, 14905519.528, 14905743.372, 14905967.218,
    14906191.065, 14906414.912, 14906638.761, 14906862.611, 14907086.462,
    14907310.314, 14907534.167, 14907758.021, 14907981.876, 14908205.732,
    14908429.589, 14908653.448, 14908877.307, 14909101.167, 14909325.029,
    14909548.891, 14909772.754, 14909996.619, 14910220.485, 14910444.351,
    14910668.219, 14910892.087, 14911115.957, 14911339.828, 14911563.700,
    14911787.573, 14912011.447, 14912235.322, 14912459.198, 14912683.075,
    14912906.953, 14913130.832, 14913354.712, 14913578.594, 14913802.476,
    14914026.359, 14914250.244, 14914474.129, 14914698.015, 14914921.903,
    14915145.792, 14915369.681, 14915593.572, 14915817.464, 14916041.356,
    14916265.250, 14916489.145, 14916713.041, 14916936.938, 14917160.836,
    14917384.735, 14917608.635, 14917832.536, 14918056.438, 14918280.341,
    14918504.246, 14918728.151, 14918952.057, 14919175.965, 14919399.873,
    14919623.782, 14919847.693, 14920071.605, 14920295.517, 14920519.431,
    14920743.345, 14920967.261, 14921191.178, 14921415.096, 14921639.015,
    14921862.935, 14922086.855, 14922310.777, 14922534.700, 14922758.625,
    14922982.550, 14923206.476, 14923430.403, 14923654.331, 14923878.261,
    14924102.191, 14924326.122, 14924550.055, 14924773.988, 14924997.923,
    14925221.858, 14925445.795, 14925669.732, 14925893.671, 14926117.611,
    14926341.552, 14926565.493, 14926789.436, 14927013.380, 14927237.325,
    14927461.271, 14927685.218, 14927909.166, 14928133.115, 14928357.065,
    14928581.016, 14928804.969, 14929028.922, 14929252.876, 14929476.832,
    14929700.788, 14929924.745, 14930148.704, 14930372.663, 14930596.624,
    14930820.585, 14931044.548, 14931268.512, 14931492.476, 14931716.442,
    14931940.409, 14932164.377, 14932388.346, 14932612.316, 14932836.287,
    14933060.259, 14933284.232, 14933508.206, 14933732.181, 14933956.157,
    14934180.134, 14934404.112, 14934628.092, 14934852.072, 14935076.053,
    14935300.036, 14935524.019, 14935748.004, 14935971.989, 14936195.976,
    14936419.963, 14936643.952, 14936867.942, 14937091.932, 14937315.924,
    14937539.917, 14937763.911, 14937987.905, 14938211.901, 14938435.898,
    14938659.896, 14938883.895, 14939107.895, 14939331.896, 14939555.899,
    14939779.902, 14940003.906, 14940227.911, 14940451.917, 14940675.925,
    14940899.933, 14941123.943, 14941347.953, 14941571.964, 14941795.977,
    14942019.990, 14942244.005, 14942468.021, 14942692.037, 14942916.055,
    14943140.074, 14943364.094, 14943588.114, 14943812.136, 14944036.159,
    14944260.183, 14944484.208, 14944708.234, 14944932.261, 14945156.289,
    14945380.318, 14945604.348, 14945828.379, 14946052.412, 14946276.445,
    14946500.479, 14946724.514, 14946948.551, 14947172.588, 14947396.627,
    14947620.666, 14947844.707, 14948068.748, 14948292.791, 14948516.834,
    14948740.879, 14948964.925, 14949188.971, 14949413.019, 14949637.068,
    14949861.118, 14950085.169, 14950309.220, 14950533.273, 14950757.327,
    14950981.382, 14951205.438, 14951429.495, 14951653.554, 14951877.613,
    14952101.673, 14952325.734, 14952549.796, 14952773.860, 14952997.924,
    14953221.989, 14953446.056, 14953670.123, 14953894.191, 14954118.261,
    14954342.331, 14954566.403, 14954790.475, 14955014.549, 14955238.624,
    14955462.699, 14955686.776, 14955910.854, 14956134.933, 14956359.012,
    14956583.093, 14956807.175, 14957031.258, 14957255.342, 14957479.427,
    14957703.513, 14957927.600, 14958151.688, 14958375.777, 14958599.867,
    14958823.959, 14959048.051, 14959272.144, 14959496.238, 14959720.334,
    14959944.430, 14960168.527, 14960392.626, 14960616.725, 14960840.825,
    14961064.927, 14961289.030, 14961513.133, 14961737.238, 14961961.343,
    14962185.450, 14962409.558, 14962633.666, 14962857.776, 14963081.887,
    14963305.999, 14963530.111, 14963754.225, 14963978.340, 14964202.456,
    14964426.573, 14964650.691, 14964874.810, 14965098.930, 14965323.051,
    14965547.173, 14965771.297, 14965995.421, 14966219.546, 14966443.672,
    14966667.799, 14966891.928, 14967116.057, 14967340.187, 14967564.319,
    14967788.451, 14968012.585, 14968236.719, 14968460.855, 14968684.991,
    14968909.129, 14969133.267, 14969357.407, 14969581.547, 14969805.689,
    14970029.832, 14970253.976, 14970478.120, 14970702.266, 14970926.413,
    14971150.561, 14971374.710, 14971598.860, 14971823.010, 14972047.162,
    14972271.315, 14972495.469, 14972719.624, 14972943.781, 14973167.938,
    14973392.096};
int main() {
  register int ok = 0, pr = 1, k, u, U;
  P[0][1] = 1;
  E[0][1] = 0;
  double pro, Q;
  int N, K;
  cin >> N >> K;
  pro = 1.0 / K, Q = 1.0 - pro;
  for (int i = 1; i < 111111; i++) pq[i] = 1.0 / i;
  if (K == 1) {
    if (N >= 98000) {
      printf("%.4lf\n", rlt[N - 98000]);
      return 0;
    }
    U = N;
    double ans = 0;
    for (int n = 1; n < U; n++) {
      swap(pr, ok);
      u = min(n + 1, 500) + 1;
      for (k = 1; k < u; k++) {
        P[ok][k] = P[pr][k - 1] * pq[k] + P[pr][k] * k * pq[k + 1];
        E[ok][k] = (E[pr][k - 1] + P[pr][k - 1] * (k - 1)) * pq[k] +
                   (E[pr][k] * pq[k + 1] + P[pr][k] * 0.5) * k;
      }
    }
    swap(pr, ok);
    u = min(N + 1, 500) + 1;
    for (k = 1; k < u; k++) {
      P[ok][k] = P[pr][k - 1] * pq[k] + P[pr][k] * k * pq[k + 1];
      E[ok][k] = (E[pr][k - 1] + P[pr][k - 1] * (k - 1)) * pq[k] +
                 (E[pr][k] * pq[k + 1] + P[pr][k] * 0.5) * k;
      ans += E[ok][k];
    }
    printf("%.10lf\n", ans);
    return 0;
  }
  U = min(N, 60000);
  double res = 0, mid = N * log(Q), logp = log(pro), logq = log(Q);
  for (int n = 1; n <= U; n++) {
    double ans = 0, tp = 0;
    swap(pr, ok);
    u = min(n + 1, 800) + 1;
    for (k = 1; k < u; k++) {
      P[ok][k] = P[pr][k - 1] * pq[k] + P[pr][k] * k * pq[k + 1];
      E[ok][k] = (E[pr][k - 1] + P[pr][k - 1] * (k - 1)) * pq[k] +
                 (E[pr][k] * pq[k + 1] + P[pr][k] * 0.5) * k;
      ans += E[ok][k];
    }
    mid += log(N - n + 1.0) - log(n) + logp - logq;
    res += exp(mid) * ans;
  }
  printf("%.10lf\n", res * K);
  return 0;
}
