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.094811, 14527425.098818, 14527647.103936, 14527869.110165,
    14528091.117504, 14528313.125954, 14528535.135514, 14528757.146185,
    14528979.157967, 14529201.170859, 14529423.184862, 14529645.199975,
    14529867.216198, 14530089.233532, 14530311.251977, 14530533.271531,
    14530755.292196, 14530977.313972, 14531199.336858, 14531421.360854,
    14531643.385960, 14531865.412177, 14532087.439504, 14532309.467941,
    14532531.497488, 14532753.528145, 14532975.559913, 14533197.592791,
    14533419.626778, 14533641.661876, 14533863.698084, 14534085.735402,
    14534307.773830, 14534529.813368, 14534751.854016, 14534973.895774,
    14535195.938642, 14535417.982620, 14535640.027708, 14535862.073905,
    14536084.121213, 14536306.169630, 14536528.219157, 14536750.269794,
    14536972.321541, 14537194.374397, 14537416.428363, 14537638.483439,
    14537860.539624, 14538082.596919, 14538304.655324, 14538526.714838,
    14538748.775462, 14538970.837196, 14539192.900039, 14539414.963991,
    14539637.029053, 14539859.095225, 14540081.162506, 14540303.230896,
    14540525.300396, 14540747.371005, 14540969.442724, 14541191.515551,
    14541413.589489, 14541635.664535, 14541857.740691, 14542079.817956,
    14542301.896330, 14542523.975814, 14542746.056406, 14542968.138108,
    14543190.220919, 14543412.304839, 14543634.389869, 14543856.476007,
    14544078.563254, 14544300.651611, 14544522.741076, 14544744.831651,
    14544966.923334, 14545189.016126, 14545411.110027, 14545633.205038,
    14545855.301157, 14546077.398384, 14546299.496721, 14546521.596167,
    14546743.696721, 14546965.798384, 14547187.901156, 14547410.005036,
    14547632.110026, 14547854.216124, 14548076.323330, 14548298.431645,
    14548520.541069, 14548742.651602, 14548964.763243, 14549186.875992,
    14549408.989850, 14549631.104817, 14549853.220892, 14550075.338075,
    14550297.456367, 14550519.575767, 14550741.696276, 14550963.817893,
    14551185.940618, 14551408.064452, 14551630.189394, 14551852.315444,
    14552074.442603, 14552296.570870, 14552518.700244, 14552740.830728,
    14552962.962319, 14553185.095018, 14553407.228826, 14553629.363742,
    14553851.499765, 14554073.636897, 14554295.775137, 14554517.914484,
    14554740.054940, 14554962.196504, 14555184.339175, 14555406.482955,
    14555628.627842, 14555850.773838, 14556072.920941, 14556295.069152,
    14556517.218470, 14556739.368897, 14556961.520431, 14557183.673073,
    14557405.826823, 14557627.981680, 14557850.137645, 14558072.294718,
    14558294.452898, 14558516.612186, 14558738.772581, 14558960.934084,
    14559183.096695, 14559405.260413, 14559627.425238, 14559849.591171,
    14560071.758211, 14560293.926359, 14560516.095614, 14560738.265976,
    14560960.437446, 14561182.610023, 14561404.783708, 14561626.958499,
    14561849.134398, 14562071.311404, 14562293.489517, 14562515.668738,
    14562737.849065, 14562960.030500, 14563182.213042, 14563404.396691,
    14563626.581447, 14563848.767310, 14564070.954280, 14564293.142357,
    14564515.331541, 14564737.521831, 14564959.713229, 14565181.905734,
    14565404.099345, 14565626.294064, 14565848.489889, 14566070.686821,
    14566292.884860, 14566515.084005, 14566737.284257, 14566959.485616,
    14567181.688082, 14567403.891654, 14567626.096333, 14567848.302118,
    14568070.509011, 14568292.717009, 14568514.926114, 14568737.136326,
    14568959.347644, 14569181.560069, 14569403.773600, 14569625.988237,
    14569848.203981, 14570070.420832, 14570292.638788, 14570514.857851,
    14570737.078020, 14570959.299296, 14571181.521678, 14571403.745166,
    14571625.969760, 14571848.195460, 14572070.422267, 14572292.650179,
    14572514.879198, 14572737.109323, 14572959.340554, 14573181.572891,
    14573403.806334, 14573626.040883, 14573848.276538, 14574070.513298,
    14574292.751165, 14574514.990138, 14574737.230216, 14574959.471401,
    14575181.713691, 14575403.957087, 14575626.201589, 14575848.447196,
    14576070.693910, 14576292.941728, 14576515.190653, 14576737.440683,
    14576959.691819, 14577181.944061, 14577404.197408, 14577626.451860,
    14577848.707419, 14578070.964082, 14578293.221851, 14578515.480726,
    14578737.740706, 14578960.001792, 14579182.263982, 14579404.527279,
    14579626.791680, 14579849.057187, 14580071.323799, 14580293.591517,
    14580515.860339, 14580738.130267, 14580960.401300, 14581182.673438,
    14581404.946682, 14581627.221030, 14581849.496484, 14582071.773042,
    14582294.050706, 14582516.329475, 14582738.609348, 14582960.890327,
    14583183.172411, 14583405.455599, 14583627.739892, 14583850.025291,
    14584072.311794, 14584294.599402, 14584516.888115, 14584739.177932,
    14584961.468854, 14585183.760881, 14585406.054013, 14585628.348249,
    14585850.643591, 14586072.940036, 14586295.237586, 14586517.536241,
    14586739.836001, 14586962.136865, 14587184.438833, 14587406.741906,
    14587629.046083, 14587851.351365, 14588073.657751, 14588295.965242,
    14588518.273836, 14588740.583536, 14588962.894339, 14589185.206247,
    14589407.519259, 14589629.833375, 14589852.148596, 14590074.464920,
    14590296.782349, 14590519.100882, 14590741.420519, 14590963.741260,
    14591186.063105, 14591408.386054, 14591630.710108, 14591853.035265,
    14592075.361526, 14592297.688891, 14592520.017360, 14592742.346933,
    14592964.677609, 14593187.009390, 14593409.342274, 14593631.676262,
    14593854.011354, 14594076.347549, 14594298.684849, 14594521.023251,
    14594743.362758, 14594965.703368, 14595188.045082, 14595410.387899,
    14595632.731820, 14595855.076844, 14596077.422972, 14596299.770204,
    14596522.118539, 14596744.467977, 14596966.818518, 14597189.170163,
    14597411.522912, 14597633.876763, 14597856.231718, 14598078.587777,
    14598300.944938, 14598523.303203, 14598745.662570, 14598968.023042,
    14599190.384616, 14599412.747293, 14599635.111073, 14599857.475957,
    14600079.841943, 14600302.209033, 14600524.577225, 14600746.946520,
    14600969.316919, 14601191.688420, 14601414.061024, 14601636.434731,
    14601858.809541, 14602081.185454, 14602303.562469, 14602525.940587,
    14602748.319808, 14602970.700132, 14603193.081558, 14603415.464087,
    14603637.847718, 14603860.232452, 14604082.618289, 14604305.005228,
    14604527.393270, 14604749.782414, 14604972.172661, 14605194.564010,
    14605416.956462, 14605639.350015, 14605861.744672, 14606084.140430,
    14606306.537291, 14606528.935255, 14606751.334320, 14606973.734488,
    14607196.135758, 14607418.538130, 14607640.941604, 14607863.346181,
    14608085.751859, 14608308.158640, 14608530.566522, 14608752.975507,
    14608975.385593, 14609197.796782, 14609420.209073, 14609642.622465,
    14609865.036959, 14610087.452556, 14610309.869254, 14610532.287054,
    14610754.705955, 14610977.125959, 14611199.547064, 14611421.969271,
    14611644.392579, 14611866.816989, 14612089.242501, 14612311.669115,
    14612534.096829, 14612756.525646, 14612978.955564, 14613201.386584,
    14613423.818705, 14613646.251927, 14613868.686251, 14614091.121676,
    14614313.558203, 14614535.995831, 14614758.434560, 14614980.874390,
    14615203.315322, 14615425.757355, 14615648.200489, 14615870.644725,
    14616093.090061, 14616315.536499, 14616537.984037, 14616760.432677,
    14616982.882418, 14617205.333260, 14617427.785203, 14617650.238247,
    14617872.692391, 14618095.147637, 14618317.603983, 14618540.061431,
    14618762.519979, 14618984.979628, 14619207.440378, 14619429.902228,
    14619652.365179, 14619874.829231, 14620097.294384, 14620319.760637,
    14620542.227990, 14620764.696445, 14620987.166000, 14621209.636655,
    14621432.108411, 14621654.581267, 14621877.055224, 14622099.530282,
    14622322.006439, 14622544.483697, 14622766.962056, 14622989.441514,
    14623211.922073, 14623434.403732, 14623656.886492, 14623879.370351,
    14624101.855311, 14624324.341371, 14624546.828531, 14624769.316791,
    14624991.806151, 14625214.296611, 14625436.788172, 14625659.280832,
    14625881.774592, 14626104.269452, 14626326.765412, 14626549.262472,
    14626771.760631, 14626994.259891, 14627216.760250, 14627439.261709,
    14627661.764268, 14627884.267926, 14628106.772684, 14628329.278542,
    14628551.785500, 14628774.293557, 14628996.802713, 14629219.312969,
    14629441.824325, 14629664.336780, 14629886.850334, 14630109.364988,
    14630331.880742, 14630554.397594, 14630776.915546, 14630999.434598,
    14631221.954748, 14631444.475998, 14631666.998347, 14631889.521796,
    14632112.046343, 14632334.571990, 14632557.098736, 14632779.626581,
    14633002.155524, 14633224.685567, 14633447.216709, 14633669.748950,
    14633892.282290, 14634114.816729, 14634337.352267, 14634559.888903,
    14634782.426639, 14635004.965473, 14635227.505406, 14635450.046438,
    14635672.588568, 14635895.131797, 14636117.676125, 14636340.221551,
    14636562.768076, 14636785.315700, 14637007.864422, 14637230.414243,
    14637452.965162, 14637675.517180, 14637898.070296, 14638120.624511,
    14638343.179824, 14638565.736235, 14638788.293744, 14639010.852352,
    14639233.412059, 14639455.972863, 14639678.534766, 14639901.097766,
    14640123.661865, 14640346.227062, 14640568.793358, 14640791.360751,
    14641013.929242, 14641236.498831, 14641459.069519, 14641681.641304,
    14641904.214187, 14642126.788168, 14642349.363247, 14642571.939424,
    14642794.516698, 14643017.095071, 14643239.674541, 14643462.255109,
    14643684.836774, 14643907.419537, 14644130.003398, 14644352.588357,
    14644575.174413, 14644797.761566, 14645020.349817, 14645242.939166,
    14645465.529612, 14645688.121155, 14645910.713796, 14646133.307535,
    14646355.902370, 14646578.498303, 14646801.095333, 14647023.693461,
    14647246.292686, 14647468.893007, 14647691.494426, 14647914.096943,
    14648136.700556, 14648359.305266, 14648581.911074, 14648804.517978,
    14649027.125980, 14649249.735078, 14649472.345274, 14649694.956566,
    14649917.568955, 14650140.182441, 14650362.797024, 14650585.412704,
    14650808.029480, 14651030.647353, 14651253.266323, 14651475.886390,
    14651698.507553, 14651921.129813, 14652143.753169, 14652366.377622,
    14652589.003171, 14652811.629817, 14653034.257560, 14653256.886399,
    14653479.516334, 14653702.147365, 14653924.779493, 14654147.412718,
    14654370.047038, 14654592.682455, 14654815.318968, 14655037.956577,
    14655260.595283, 14655483.235084, 14655705.875982, 14655928.517976,
    14656151.161066, 14656373.805251, 14656596.450533, 14656819.096911,
    14657041.744385, 14657264.392954, 14657487.042620, 14657709.693381,
    14657932.345238, 14658154.998191, 14658377.652240, 14658600.307384,
    14658822.963624, 14659045.620960, 14659268.279391, 14659490.938918,
    14659713.599541, 14659936.261259, 14660158.924073, 14660381.587982,
    14660604.252986, 14660826.919086, 14661049.586281, 14661272.254572,
    14661494.923958, 14661717.594439, 14661940.266016, 14662162.938688,
    14662385.612455, 14662608.287317, 14662830.963274, 14663053.640327,
    14663276.318474, 14663498.997717, 14663721.678054, 14663944.359487,
    14664167.042015, 14664389.725637, 14664612.410355, 14664835.096167,
    14665057.783074, 14665280.471076, 14665503.160173, 14665725.850364,
    14665948.541650, 14666171.234031, 14666393.927507, 14666616.622077,
    14666839.317741, 14667062.014501, 14667284.712354, 14667507.411303,
    14667730.111346, 14667952.812483, 14668175.514715, 14668398.218041,
    14668620.922461, 14668843.627976, 14669066.334585, 14669289.042288,
    14669511.751085, 14669734.460977, 14669957.171963, 14670179.884043,
    14670402.597217, 14670625.311485, 14670848.026847, 14671070.743303,
    14671293.460853, 14671516.179497, 14671738.899235, 14671961.620067,
    14672184.341993, 14672407.065013, 14672629.789126, 14672852.514333,
    14673075.240634, 14673297.968028, 14673520.696517, 14673743.426098,
    14673966.156774, 14674188.888543, 14674411.621405, 14674634.355361,
    14674857.090411, 14675079.826554, 14675302.563790, 14675525.302120,
    14675748.041543, 14675970.782060, 14676193.523669, 14676416.266372,
    14676639.010168, 14676861.755058, 14677084.501040, 14677307.248116,
    14677529.996285, 14677752.745547, 14677975.495901, 14678198.247349,
    14678420.999890, 14678643.753524, 14678866.508251, 14679089.264070,
    14679312.020982, 14679534.778988, 14679757.538086, 14679980.298276,
    14680203.059560, 14680425.821936, 14680648.585405, 14680871.349966,
    14681094.115620, 14681316.882367, 14681539.650206, 14681762.419137,
    14681985.189161, 14682207.960278, 14682430.732487, 14682653.505788,
    14682876.280181, 14683099.055667, 14683321.832245, 14683544.609916,
    14683767.388678, 14683990.168533, 14684212.949480, 14684435.731519,
    14684658.514650, 14684881.298873, 14685104.084188, 14685326.870595,
    14685549.658094, 14685772.446685, 14685995.236368, 14686218.027142,
    14686440.819009, 14686663.611967, 14686886.406017, 14687109.201159,
    14687331.997392, 14687554.794717, 14687777.593134, 14688000.392642,
    14688223.193242, 14688445.994933, 14688668.797716, 14688891.601590,
    14689114.406556, 14689337.212613, 14689560.019761, 14689782.828001,
    14690005.637332, 14690228.447755, 14690451.259268, 14690674.071873,
    14690896.885569, 14691119.700356, 14691342.516234, 14691565.333203,
    14691788.151263, 14692010.970415, 14692233.790657, 14692456.611990,
    14692679.434414, 14692902.257929, 14693125.082535, 14693347.908231,
    14693570.735018, 14693793.562896, 14694016.391865, 14694239.221924,
    14694462.053074, 14694684.885315, 14694907.718646, 14695130.553068,
    14695353.388580, 14695576.225183, 14695799.062876, 14696021.901659,
    14696244.741533, 14696467.582498, 14696690.424552, 14696913.267697,
    14697136.111932, 14697358.957257, 14697581.803672, 14697804.651178,
    14698027.499774, 14698250.349459, 14698473.200235, 14698696.052101,
    14698918.905056, 14699141.759102, 14699364.614237, 14699587.470463,
    14699810.327778, 14700033.186183, 14700256.045678, 14700478.906262,
    14700701.767937, 14700924.630700, 14701147.494554, 14701370.359497,
    14701593.225530, 14701816.092652, 14702038.960863, 14702261.830165,
    14702484.700555, 14702707.572035, 14702930.444604, 14703153.318263,
    14703376.193011, 14703599.068848, 14703821.945774, 14704044.823790,
    14704267.702895, 14704490.583089, 14704713.464372, 14704936.346744,
    14705159.230205, 14705382.114755, 14705605.000393, 14705827.887121,
    14706050.774938, 14706273.663844, 14706496.553838, 14706719.444921,
    14706942.337093, 14707165.230354, 14707388.124703, 14707611.020141,
    14707833.916667, 14708056.814283, 14708279.712986, 14708502.612778,
    14708725.513659, 14708948.415628, 14709171.318685, 14709394.222831,
    14709617.128065, 14709840.034388, 14710062.941799, 14710285.850298,
    14710508.759885, 14710731.670560, 14710954.582323, 14711177.495175,
    14711400.409114, 14711623.324142, 14711846.240257, 14712069.157461,
    14712292.075752, 14712514.995132, 14712737.915599, 14712960.837154,
    14713183.759796, 14713406.683527, 14713629.608345, 14713852.534251,
    14714075.461244, 14714298.389325, 14714521.318494, 14714744.248750,
    14714967.180093, 14715190.112525, 14715413.046043, 14715635.980649,
    14715858.916342, 14716081.853123, 14716304.790991, 14716527.729946,
    14716750.669988, 14716973.611117, 14717196.553334, 14717419.496638,
    14717642.441029, 14717865.386506, 14718088.333071, 14718311.280723,
    14718534.229462, 14718757.179287, 14718980.130200, 14719203.082199,
    14719426.035285, 14719648.989458, 14719871.944718, 14720094.901064,
    14720317.858497, 14720540.817016, 14720763.776622, 14720986.737315,
    14721209.699094, 14721432.661959, 14721655.625911, 14721878.590950,
    14722101.557075, 14722324.524286, 14722547.492583, 14722770.461967,
    14722993.432436, 14723216.403992, 14723439.376635, 14723662.350363,
    14723885.325177, 14724108.301077, 14724331.278064, 14724554.256136,
    14724777.235294, 14725000.215538, 14725223.196868, 14725446.179284,
    14725669.162786, 14725892.147373, 14726115.133046, 14726338.119805,
    14726561.107649, 14726784.096579, 14727007.086595, 14727230.077696,
    14727453.069882, 14727676.063154, 14727899.057512, 14728122.052955,
    14728345.049483, 14728568.047096, 14728791.045795, 14729014.045579,
    14729237.046448, 14729460.048402, 14729683.051442, 14729906.055566,
    14730129.060776, 14730352.067071, 14730575.074450, 14730798.082915,
    14731021.092464, 14731244.103098, 14731467.114818, 14731690.127622,
    14731913.141510, 14732136.156484, 14732359.172542, 14732582.189685,
    14732805.207912, 14733028.227224, 14733251.247621, 14733474.269102,
    14733697.291667, 14733920.315317, 14734143.340051, 14734366.365870,
    14734589.392773, 14734812.420760, 14735035.449832, 14735258.479987,
    14735481.511227, 14735704.543551, 14735927.576959, 14736150.611451,
    14736373.647028, 14736596.683688, 14736819.721432, 14737042.760260,
    14737265.800172, 14737488.841168, 14737711.883247, 14737934.926410,
    14738157.970657, 14738381.015988, 14738604.062402, 14738827.109900,
    14739050.158482, 14739273.208147, 14739496.258895, 14739719.310727,
    14739942.363643, 14740165.417642, 14740388.472724, 14740611.528889,
    14740834.586138, 14741057.644470, 14741280.703885, 14741503.764383,
    14741726.825965, 14741949.888629, 14742172.952377, 14742396.017207,
    14742619.083121, 14742842.150117, 14743065.218197, 14743288.287359,
    14743511.357604, 14743734.428932, 14743957.501342, 14744180.574835,
    14744403.649411, 14744626.725070, 14744849.801811, 14745072.879634,
    14745295.958541, 14745519.038529, 14745742.119600, 14745965.201754,
    14746188.284990, 14746411.369308, 14746634.454708, 14746857.541191,
    14747080.628756, 14747303.717403, 14747526.807132, 14747749.897943,
    14747972.989837, 14748196.082812, 14748419.176869, 14748642.272008,
    14748865.368230, 14749088.465533, 14749311.563917, 14749534.663384,
    14749757.763932, 14749980.865562, 14750203.968274, 14750427.072067,
    14750650.176942, 14750873.282899, 14751096.389937, 14751319.498056,
    14751542.607257, 14751765.717539, 14751988.828903, 14752211.941348,
    14752435.054874, 14752658.169481, 14752881.285170, 14753104.401940,
    14753327.519791, 14753550.638723, 14753773.758736, 14753996.879830,
    14754220.002005, 14754443.125261, 14754666.249598, 14754889.375015,
    14755112.501514, 14755335.629093, 14755558.757753, 14755781.887493,
    14756005.018315, 14756228.150217, 14756451.283199, 14756674.417262,
    14756897.552406, 14757120.688630, 14757343.825934, 14757566.964319,
    14757790.103784, 14758013.244329, 14758236.385955, 14758459.528661,
    14758682.672447, 14758905.817313, 14759128.963259, 14759352.110285,
    14759575.258392, 14759798.407578, 14760021.557844, 14760244.709190,
    14760467.861616, 14760691.015122, 14760914.169708, 14761137.325373,
    14761360.482118, 14761583.639943, 14761806.798847, 14762029.958831,
    14762253.119894, 14762476.282037, 14762699.445259, 14762922.609561,
    14763145.774942, 14763368.941403, 14763592.108943, 14763815.277562,
    14764038.447260, 14764261.618037, 14764484.789894, 14764707.962830,
    14764931.136844, 14765154.311938, 14765377.488111, 14765600.665362,
    14765823.843693, 14766047.023102, 14766270.203591, 14766493.385157,
    14766716.567803, 14766939.751528, 14767162.936331, 14767386.122212,
    14767609.309172, 14767832.497211, 14768055.686328, 14768278.876524,
    14768502.067798, 14768725.260151, 14768948.453581, 14769171.648090,
    14769394.843678, 14769618.040343, 14769841.238087, 14770064.436909,
    14770287.636809, 14770510.837786, 14770734.039842, 14770957.242976,
    14771180.447188, 14771403.652478, 14771626.858845, 14771850.066290,
    14772073.274813, 14772296.484414, 14772519.695092, 14772742.906848,
    14772966.119682, 14773189.333593, 14773412.548582, 14773635.764648,
    14773858.981791, 14774082.200012, 14774305.419311, 14774528.639686,
    14774751.861139, 14774975.083669, 14775198.307276, 14775421.531960,
    14775644.757722, 14775867.984560, 14776091.212476, 14776314.441468,
    14776537.671537, 14776760.902684, 14776984.134907, 14777207.368206,
    14777430.602583, 14777653.838036, 14777877.074566, 14778100.312173,
    14778323.550856, 14778546.790616, 14778770.031452, 14778993.273365,
    14779216.516354, 14779439.760419, 14779663.005561, 14779886.251779,
    14780109.499074, 14780332.747444, 14780555.996891, 14780779.247414,
    14781002.499013, 14781225.751688, 14781449.005439, 14781672.260266,
    14781895.516169, 14782118.773147, 14782342.031202, 14782565.290332,
    14782788.550538, 14783011.811820, 14783235.074178, 14783458.337611,
    14783681.602119, 14783904.867704, 14784128.134363, 14784351.402098,
    14784574.670909, 14784797.940795, 14785021.211756, 14785244.483792,
    14785467.756904, 14785691.031091, 14785914.306353, 14786137.582690,
    14786360.860102, 14786584.138589, 14786807.418152, 14787030.698789,
    14787253.980501, 14787477.263287, 14787700.547149, 14787923.832086,
    14788147.118097, 14788370.405182, 14788593.693343, 14788816.982578,
    14789040.272887, 14789263.564272, 14789486.856730, 14789710.150263,
    14789933.444870, 14790156.740552, 14790380.037308, 14790603.335138,
    14790826.634042, 14791049.934021, 14791273.235074, 14791496.537200,
    14791719.840401, 14791943.144676, 14792166.450024, 14792389.756447,
    14792613.063943, 14792836.372513, 14793059.682157, 14793282.992875,
    14793506.304666, 14793729.617531, 14793952.931470, 14794176.246482,
    14794399.562568, 14794622.879727, 14794846.197959, 14795069.517265,
    14795292.837644, 14795516.159097, 14795739.481622, 14795962.805221,
    14796186.129893, 14796409.455638, 14796632.782456, 14796856.110348,
    14797079.439312, 14797302.769349, 14797526.100459, 14797749.432642,
    14797972.765897, 14798196.100226, 14798419.435627, 14798642.772100,
    14798866.109647, 14799089.448266, 14799312.787957, 14799536.128721,
    14799759.470557, 14799982.813466, 14800206.157447, 14800429.502501,
    14800652.848626, 14800876.195824, 14801099.544094, 14801322.893437,
    14801546.243851, 14801769.595337, 14801992.947896, 14802216.301526,
    14802439.656228, 14802663.012002, 14802886.368848, 14803109.726765,
    14803333.085755, 14803556.445816, 14803779.806948, 14804003.169153,
    14804226.532428, 14804449.896776, 14804673.262194, 14804896.628685,
    14805119.996246, 14805343.364879, 14805566.734583, 14805790.105358,
    14806013.477205, 14806236.850122, 14806460.224111, 14806683.599171,
    14806906.975302, 14807130.352503, 14807353.730776, 14807577.110119,
    14807800.490534, 14808023.872019, 14808247.254575, 14808470.638201,
    14808694.022898, 14808917.408666, 14809140.795504, 14809364.183413,
    14809587.572392, 14809810.962442, 14810034.353562, 14810257.745752,
    14810481.139013, 14810704.533343, 14810927.928744, 14811151.325216,
    14811374.722757, 14811598.121368, 14811821.521049, 14812044.921800,
    14812268.323621, 14812491.726512, 14812715.130473, 14812938.535504,
    14813161.941604, 14813385.348774, 14813608.757013, 14813832.166322,
    14814055.576701, 14814278.988149, 14814502.400667, 14814725.814254,
    14814949.228910, 14815172.644635, 14815396.061430, 14815619.479294,
    14815842.898227, 14816066.318230, 14816289.739301, 14816513.161442,
    14816736.584651, 14816960.008929, 14817183.434276, 14817406.860692,
    14817630.288177, 14817853.716731, 14818077.146353, 14818300.577044,
    14818524.008803, 14818747.441631, 14818970.875528, 14819194.310493,
    14819417.746526, 14819641.183628, 14819864.621798, 14820088.061037,
    14820311.501343, 14820534.942718, 14820758.385161, 14820981.828672,
    14821205.273251, 14821428.718898, 14821652.165613, 14821875.613395,
    14822099.062246, 14822322.512165, 14822545.963151, 14822769.415205,
    14822992.868326, 14823216.322515, 14823439.777772, 14823663.234096,
    14823886.691488, 14824110.149947, 14824333.609474, 14824557.070067,
    14824780.531729, 14825003.994457, 14825227.458252, 14825450.923115,
    14825674.389045, 14825897.856041, 14826121.324105, 14826344.793236,
    14826568.263433, 14826791.734698, 14827015.207029, 14827238.680427,
    14827462.154891, 14827685.630422, 14827909.107020, 14828132.584685,
    14828356.063416, 14828579.543213, 14828803.024077, 14829026.506007,
    14829249.989003, 14829473.473066, 14829696.958195, 14829920.444390,
    14830143.931651, 14830367.419979, 14830590.909372, 14830814.399831,
    14831037.891356, 14831261.383947, 14831484.877604, 14831708.372327,
    14831931.868115, 14832155.364969, 14832378.862889, 14832602.361874,
    14832825.861925, 14833049.363042, 14833272.865223, 14833496.368470,
    14833719.872783, 14833943.378161, 14834166.884604, 14834390.392112,
    14834613.900685, 14834837.410324, 14835060.921027, 14835284.432795,
    14835507.945629, 14835731.459527, 14835954.974490, 14836178.490518,
    14836402.007611, 14836625.525768, 14836849.044990, 14837072.565277,
    14837296.086628, 14837519.609044, 14837743.132524, 14837966.657068,
    14838190.182677, 14838413.709350, 14838637.237088, 14838860.765889,
    14839084.295755, 14839307.826685, 14839531.358679, 14839754.891737,
    14839978.425859, 14840201.961044, 14840425.497294, 14840649.034607,
    14840872.572985, 14841096.112426, 14841319.652930, 14841543.194498,
    14841766.737130, 14841990.280825, 14842213.825584, 14842437.371406,
    14842660.918291, 14842884.466240, 14843108.015252, 14843331.565327,
    14843555.116465, 14843778.668667, 14844002.221931, 14844225.776259,
    14844449.331649, 14844672.888102, 14844896.445619, 14845120.004198,
    14845343.563839, 14845567.124544, 14845790.686311, 14846014.249140,
    14846237.813032, 14846461.377987, 14846684.944004, 14846908.511084,
    14847132.079226, 14847355.648430, 14847579.218696, 14847802.790025,
    14848026.362415, 14848249.935868, 14848473.510383, 14848697.085960,
    14848920.662598, 14849144.240299, 14849367.819061, 14849591.398886,
    14849814.979772, 14850038.561719, 14850262.144728, 14850485.728799,
    14850709.313932, 14850932.900125, 14851156.487381, 14851380.075697,
    14851603.665075, 14851827.255514, 14852050.847015, 14852274.439576,
    14852498.033199, 14852721.627882, 14852945.223627, 14853168.820433,
    14853392.418299, 14853616.017227, 14853839.617215, 14854063.218264,
    14854286.820374, 14854510.423544, 14854734.027775, 14854957.633066,
    14855181.239418, 14855404.846830, 14855628.455303, 14855852.064836,
    14856075.675430, 14856299.287083, 14856522.899797, 14856746.513571,
    14856970.128405, 14857193.744298, 14857417.361252, 14857640.979266,
    14857864.598340, 14858088.218473, 14858311.839667, 14858535.461919,
    14858759.085232, 14858982.709604, 14859206.335036, 14859429.961527,
    14859653.589078, 14859877.217688, 14860100.847357, 14860324.478086,
    14860548.109874, 14860771.742721, 14860995.376627, 14861219.011592,
    14861442.647616, 14861666.284700, 14861889.922842, 14862113.562043,
    14862337.202302, 14862560.843621, 14862784.485998, 14863008.129434,
    14863231.773929, 14863455.419482, 14863679.066093, 14863902.713763,
    14864126.362491, 14864350.012278, 14864573.663123, 14864797.315026,
    14865020.967987, 14865244.622006, 14865468.277084, 14865691.933219,
    14865915.590413, 14866139.248664, 14866362.907973, 14866586.568340,
    14866810.229764, 14867033.892247, 14867257.555787, 14867481.220384,
    14867704.886039, 14867928.552752, 14868152.220521, 14868375.889349,
    14868599.559233, 14868823.230175, 14869046.902174, 14869270.575230,
    14869494.249343, 14869717.924514, 14869941.600741, 14870165.278025,
    14870388.956366, 14870612.635764, 14870836.316218, 14871059.997729,
    14871283.680297, 14871507.363922, 14871731.048603, 14871954.734341,
    14872178.421134, 14872402.108985, 14872625.797891, 14872849.487854,
    14873073.178874, 14873296.870949, 14873520.564080, 14873744.258268,
    14873967.953511, 14874191.649811, 14874415.347166, 14874639.045577,
    14874862.745044, 14875086.445566, 14875310.147145, 14875533.849778,
    14875757.553468, 14875981.258213, 14876204.964013, 14876428.670869,
    14876652.378780, 14876876.087746, 14877099.797768, 14877323.508844,
    14877547.220976, 14877770.934163, 14877994.648405, 14878218.363702,
    14878442.080054, 14878665.797460, 14878889.515921, 14879113.235438,
    14879336.956008, 14879560.677634, 14879784.400313, 14880008.124048,
    14880231.848837, 14880455.574680, 14880679.301577, 14880903.029529,
    14881126.758535, 14881350.488595, 14881574.219709, 14881797.951878,
    14882021.685100, 14882245.419376, 14882469.154706, 14882692.891090,
    14882916.628528, 14883140.367019, 14883364.106565, 14883587.847163,
    14883811.588815, 14884035.331521, 14884259.075280, 14884482.820093,
    14884706.565959, 14884930.312878, 14885154.060850, 14885377.809875,
    14885601.559954, 14885825.311085, 14886049.063270, 14886272.816507,
    14886496.570798, 14886720.326141, 14886944.082537, 14887167.839985,
    14887391.598486, 14887615.358040, 14887839.118646, 14888062.880305,
    14888286.643016, 14888510.406780, 14888734.171595, 14888957.937463,
    14889181.704383, 14889405.472356, 14889629.241380, 14889853.011456,
    14890076.782585, 14890300.554765, 14890524.327997, 14890748.102281,
    14890971.877616, 14891195.654003, 14891419.431442, 14891643.209932,
    14891866.989474, 14892090.770067, 14892314.551712, 14892538.334408,
    14892762.118155, 14892985.902953, 14893209.688803, 14893433.475703,
    14893657.263655, 14893881.052657, 14894104.842711, 14894328.633815,
    14894552.425970, 14894776.219176, 14895000.013433, 14895223.808740,
    14895447.605097, 14895671.402505, 14895895.200964, 14896119.000473,
    14896342.801032, 14896566.602642, 14896790.405301, 14897014.209011,
    14897238.013771, 14897461.819581, 14897685.626441, 14897909.434351,
    14898133.243311, 14898357.053320, 14898580.864380, 14898804.676489,
    14899028.489647, 14899252.303855, 14899476.119113, 14899699.935420,
    14899923.752776, 14900147.571182, 14900371.390637, 14900595.211141,
    14900819.032695, 14901042.855297, 14901266.678948, 14901490.503649,
    14901714.329398, 14901938.156196, 14902161.984043, 14902385.812939,
    14902609.642883, 14902833.473876, 14903057.305918, 14903281.139008,
    14903504.973146, 14903728.808333, 14903952.644568, 14904176.481851,
    14904400.320183, 14904624.159562, 14904847.999990, 14905071.841466,
    14905295.683989, 14905519.527561, 14905743.372180, 14905967.217848,
    14906191.064562, 14906414.912325, 14906638.761135, 14906862.610993,
    14907086.461898, 14907310.313850, 14907534.166850, 14907758.020897,
    14907981.875992, 14908205.732133, 14908429.589322, 14908653.447558,
    14908877.306840, 14909101.167170, 14909325.028546, 14909548.890970,
    14909772.754440, 14909996.618956, 14910220.484519, 14910444.351129,
    14910668.218786, 14910892.087488, 14911115.957238, 14911339.828033,
    14911563.699875, 14911787.572763, 14912011.446697, 14912235.321677,
    14912459.197703, 14912683.074775, 14912906.952893, 14913130.832057,
    14913354.712266, 14913578.593521, 14913802.475822, 14914026.359169,
    14914250.243561, 14914474.128998, 14914698.015481, 14914921.903009,
    14915145.791583, 14915369.681201, 14915593.571865, 14915817.463574,
    14916041.356328, 14916265.250126, 14916489.144970, 14916713.040859,
    14916936.937792, 14917160.835770, 14917384.734793, 14917608.634860,
    14917832.535972, 14918056.438128, 14918280.341329, 14918504.245574,
    14918728.150863, 14918952.057197, 14919175.964574, 14919399.872996,
    14919623.782462, 14919847.692972, 14920071.604525, 14920295.517123,
    14920519.430764, 14920743.345449, 14920967.261178, 14921191.177950,
    14921415.095766, 14921639.014625, 14921862.934527, 14922086.855473,
    14922310.777462, 14922534.700495, 14922758.624570, 14922982.549689,
    14923206.475851, 14923430.403055, 14923654.331303, 14923878.260593,
    14924102.190926, 14924326.122302, 14924550.054721, 14924773.988182,
    14924997.922685, 14925221.858231, 14925445.794819, 14925669.732450,
    14925893.671123, 14926117.610838, 14926341.551596, 14926565.493395,
    14926789.436236, 14927013.380120, 14927237.325045, 14927461.271012,
    14927685.218020, 14927909.166071, 14928133.115163, 14928357.065297,
    14928581.016472, 14928804.968688, 14929028.921946, 14929252.876245,
    14929476.831586, 14929700.787967, 14929924.745390, 14930148.703854,
    14930372.663358, 14930596.623904, 14930820.585490, 14931044.548118,
    14931268.511786, 14931492.476494, 14931716.442244, 14931940.409033,
    14932164.376864, 14932388.345734, 14932612.315645, 14932836.286596,
    14933060.258588, 14933284.231619, 14933508.205691, 14933732.180802,
    14933956.156954, 14934180.134145, 14934404.112377, 14934628.091648,
    14934852.071958, 14935076.053309, 14935300.035698, 14935524.019128,
    14935748.003596, 14935971.989105, 14936195.975652, 14936419.963239,
    14936643.951864, 14936867.941529, 14937091.932233, 14937315.923976,
    14937539.916757, 14937763.910578, 14937987.905437, 14938211.901335,
    14938435.898272, 14938659.896247, 14938883.895261, 14939107.895313,
    14939331.896403, 14939555.898532, 14939779.901699, 14940003.905904,
    14940227.911148, 14940451.917429, 14940675.924748, 14940899.933105,
    14941123.942500, 14941347.952933, 14941571.964404, 14941795.976912,
    14942019.990458, 14942244.005041, 14942468.020661, 14942692.037319,
    14942916.055015, 14943140.073747, 14943364.093517, 14943588.114324,
    14943812.136168, 14944036.159048, 14944260.182966, 14944484.207921,
    14944708.233912, 14944932.260940, 14945156.289004, 14945380.318106,
    14945604.348243, 14945828.379417, 14946052.411628, 14946276.444875,
    14946500.479158, 14946724.514477, 14946948.550832, 14947172.588223,
    14947396.626650, 14947620.666114, 14947844.706613, 14948068.748147,
    14948292.790718, 14948516.834324, 14948740.878965, 14948964.924642,
    14949188.971355, 14949413.019102, 14949637.067885, 14949861.117704,
    14950085.168557, 14950309.220445, 14950533.273369, 14950757.327327,
    14950981.382321, 14951205.438349, 14951429.495412, 14951653.553509,
    14951877.612641, 14952101.672808, 14952325.734009, 14952549.796244,
    14952773.859514, 14952997.923818, 14953221.989156, 14953446.055528,
    14953670.122935, 14953894.191375, 14954118.260849, 14954342.331357,
    14954566.402899, 14954790.475475, 14955014.549084, 14955238.623726,
    14955462.699403, 14955686.776112, 14955910.853855, 14956134.932632,
    14956359.012441, 14956583.093284, 14956807.175159, 14957031.258068,
    14957255.342010, 14957479.426984, 14957703.512991, 14957927.600032,
    14958151.688104, 14958375.777209, 14958599.867347, 14958823.958517,
    14959048.050720, 14959272.143955, 14959496.238222, 14959720.333521,
    14959944.429853, 14960168.527216, 14960392.625612, 14960616.725039,
    14960840.825498, 14961064.926989, 14961289.029512, 14961513.133066,
    14961737.237651, 14961961.343268, 14962185.449917, 14962409.557597,
    14962633.666308, 14962857.776050, 14963081.886824, 14963305.998628,
    14963530.111463, 14963754.225330, 14963978.340227, 14964202.456155,
    14964426.573113, 14964650.691103, 14964874.810122, 14965098.930172,
    14965323.051253, 14965547.173364, 14965771.296505, 14965995.420677,
    14966219.545878, 14966443.672110, 14966667.799371, 14966891.927662,
    14967116.056984, 14967340.187335, 14967564.318715, 14967788.451126,
    14968012.584566, 14968236.719035, 14968460.854534, 14968684.991062,
    14968909.128619, 14969133.267205, 14969357.406821, 14969581.547466,
    14969805.689139, 14970029.831842, 14970253.975573, 14970478.120333,
    14970702.266122, 14970926.412939, 14971150.560785, 14971374.709659,
    14971598.859562, 14971823.010493, 14972047.162452, 14972271.315440,
    14972495.469455, 14972719.624499, 14972943.780571, 14973167.937670,
    14973392.095797};
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("%.6lf\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;
}
