Twilight Sparkle was playing Ludo with her friends Rainbow Dash, Apple Jack and Flutter Shy. But she kept losing. Having returned to the castle, Twilight Sparkle became interested in the dice that were used in the game.

The dice has m faces: the first face of the dice contains a dot, the second one contains two dots, and so on, the m-th face contains m dots. Twilight Sparkle is sure that when the dice is tossed, each face appears with probability <image>. Also she knows that each toss is independent from others. Help her to calculate the expected maximum number of dots she could get after tossing the dice n times.

Input

A single line contains two integers m and n (1 ≤ m, n ≤ 105).

Output

Output a single real number corresponding to the expected maximum. The answer will be considered correct if its relative or absolute error doesn't exceed 10  - 4.

Examples

Input

6 1


Output

3.500000000000


Input

6 3


Output

4.958333333333


Input

2 2


Output

1.750000000000

Note

Consider the third test example. If you've made two tosses:

  1. You can get 1 in the first toss, and 2 in the second. Maximum equals to 2. 
  2. You can get 1 in the first toss, and 1 in the second. Maximum equals to 1. 
  3. You can get 2 in the first toss, and 1 in the second. Maximum equals to 2. 
  4. You can get 2 in the first toss, and 2 in the second. Maximum equals to 2. 



The probability of each outcome is 0.25, that is expectation equals to: 

<image>

You can read about expectation using the following link: http://en.wikipedia.org/wiki/Expected_value

Difficulty: MEDIUM_HARD
Tags: Probability

Starter code:

Solutions:
(n, m) = map(int, input().split())
s = 0
for i in range(n):
	s += (i + 1) * (pow((i + 1) / n, m) - pow(i / n, m))
print(s)


import sys
import math

def exp(a, m, b):
	r = 1
	while b > 0:
		if b % 2 == 0:
			r = r * a / m
		else:
			a = a / m * (a / m)
	return r

def main():
	(m, n) = map(int, input().split())
	ans = 0
	aux = m ** n
	for i in range(1, m + 1):
		ans += i * ((i / m) ** n - ((i - 1) / m) ** n)
	print(ans)
main()


from math import pow
(m, n) = map(int, input().split())
ans = 0.0
for i in range(1, m + 1):
	ans += i * (pow(i / m, n) - pow((i - 1.0) / m, n))
print('%.15f' % ans)


import sys
entrada = input().split()
m = int(entrada[0])
n = int(entrada[1])
spc_amstrl = 0
ant = 0
for i in range(1, m + 1):
	aux = pow(i / m, n)
	spc_amstrl += i * (aux - ant)
	ant = aux
print(spc_amstrl)


import math
import collections
import sys
input = sys.stdin.readline
(m, n) = map(int, input().split())
ans = 0
for i in range(1, m + 1):
	ans += i * ((i / m) ** n - ((i - 1) / m) ** n)
print(ans)


def pow(b, e):
	res = 1
	while e:
		if e % 2:
			res *= b
		b *= b
		e //= 2
	return res

def solve():
	(m, n) = map(int, input().split())
	ans = 0
	for i in range(1, m + 1):
		ans += (pow(i / m, n) - pow((i - 1) / m, n)) * i
	print(ans)
	return

def main():
	t = 1
	for _ in range(t):
		solve()
main()


(m, n) = map(int, input().split())
ans = 0
for i in range(1, m + 1):
	ans += i * ((i / m) ** n - ((i - 1) / m) ** n)
print(ans)


from math import ceil, floor, sqrt, log

def mod_expo(n, p, m):
	result = 1
	while p != 0:
		if p % 2 == 1:
			result = result * n % m
		p //= 2
		n = n * n % m
	return result

def dec_pow(a, n):
	res = 1
	while n > 0:
		if n % 2 == 1:
			res *= a
		a *= a
		n //= 2
	return res

def is_prime(n):
	for i in range(2, floor(sqrt(n) + 1)):
		if n % i == 0:
			return False
	return True

def find_k(n):
	for k in range(0, ceil(n / 2) + 1):
		if is_prime(k + n):
			return k

def get_expect(n, m):
	e = 0
	for i in range(1, m + 1):
		e += i * (dec_pow(i / m, n) - dec_pow((i - 1) / m, n))
	return e

def get_graph(n):
	k = find_k(n)
	m = n + k
	print(m)
	for i in range(1, n):
		print(i, i + 1)
	print(n, 1)
	for i in range(1, k + 1):
		print(i, i + floor(n / 2))

def alice_wins(n, k):
	if n < k:
		if n % 3 != 0:
			return True
		return False
	if alice_wins(k - 1, k):
		if (n - (k + 1)) % 3 != 0:
			return True
	elif (n - (k + 2)) % 3 != 0:
		return True
	return False

def prime_factorization(x):
	answer = []
	i = 2
	while i * i <= x:
		if x % i == 0:
			answer.append(i)
			while x % i == 0:
				x //= i
		i += 1
	if x > 1:
		answer.append(x)
	return answer

def pf(X, N):
	answer = 1
	m = pow(10, 9) + 7
	x_primes = prime_factorization(X)
	for prime in x_primes:
		power = 0
		factor = prime
		while factor <= N:
			power += N // factor
			factor *= prime
		answer *= pow(prime, power, m)
		answer %= m
	return answer

def find_ops(n):
	c = floor(n / 3)
	n -= 3 * floor(n / 3)
	b = floor(n / 2)
	n -= 2 * floor(n / 2)
	return n + b + c

def count_operations(a, b):
	if a < b:
		val = int(log(b / a, 2))
		if pow(2, val) * a == b:
			return find_ops(val)
	else:
		val = int(log(a / b, 2))
		if pow(2, val) * b == a:
			return find_ops(val)
	return -1

def find_m(n, x):
	return 1 + max(0, (n - pow(2, x - 1) + 1) // pow(2, x))

def find_total_diff(n):
	n -= 1
	total = n // 2 + 1
	x = 1
	while pow(2, x) - 1 <= n:
		total += (x + 1) * find_m(n, x + 1)
		x += 1
	return total
t = 1
while t:
	t = t - 1
	(m, n) = map(int, input().split())
	print(get_expect(n, m))


(m, n) = [int(i) for i in input().split()]
answer = 0
for i in range(1, m + 1):
	answer += i * ((i / m) ** n - ((i - 1) / m) ** n)
print(answer)


(m, n) = map(int, input().split(' '))
r = m
for i in range(1, m):
	r -= (i / m) ** n
print(r)


(m, n) = map(int, input().split())
res = float(0.0)
for i in range(m):
	res = res + (i + 1) * (((i + 1) / m) ** n - (i / m) ** n)
print(res)


import math
(m, n) = map(int, input().split())
e = 0
for i in range(1, m + 1):
	e += i * (math.pow(i / m, n) - math.pow((i - 1) / m, n))
print(e)


(m, n) = map(int, input().split())
f = lambda x: (x / m) ** n
print('{:.9}'.format(sum(((f(i + 1) - f(i)) * (i + 1) for i in range(m)))))


def f(i, n, m):
	return i * ((i / m) ** n - ((i - 1) / m) ** n)
(m, n) = map(int, input().split())
ans = 0
for i in range(1, m + 1):
	ans += f(i, n, m)
print(ans)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import ceil, floor
from copy import *
from collections import deque, defaultdict
from collections import Counter as counter
from itertools import combinations
from itertools import permutations as permutate
from bisect import bisect_left as bl
from operator import *
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192
from sys import stderr

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func

class SortedList:

	def __init__(self, iterable=[], _load=200):
		values = sorted(iterable)
		self._len = _len = len(values)
		self._load = _load
		self._lists = _lists = [values[i:i + _load] for i in range(0, _len, _load)]
		self._list_lens = [len(_list) for _list in _lists]
		self._mins = [_list[0] for _list in _lists]
		self._fen_tree = []
		self._rebuild = True

	def _fen_build(self):
		self._fen_tree[:] = self._list_lens
		_fen_tree = self._fen_tree
		for i in range(len(_fen_tree)):
			if i | i + 1 < len(_fen_tree):
				_fen_tree[i | i + 1] += _fen_tree[i]
		self._rebuild = False

	def _fen_update(self, index, value):
		if not self._rebuild:
			_fen_tree = self._fen_tree
			while index < len(_fen_tree):
				_fen_tree[index] += value
				index |= index + 1

	def _fen_query(self, end):
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		x = 0
		while end:
			x += _fen_tree[end - 1]
			end &= end - 1
		return x

	def _fen_findkth(self, k):
		_list_lens = self._list_lens
		if k < _list_lens[0]:
			return (0, k)
		if k >= self._len - _list_lens[-1]:
			return (len(_list_lens) - 1, k + _list_lens[-1] - self._len)
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		idx = -1
		for d in reversed(range(len(_fen_tree).bit_length())):
			right_idx = idx + (1 << d)
			if right_idx < len(_fen_tree) and k >= _fen_tree[right_idx]:
				idx = right_idx
				k -= _fen_tree[idx]
		return (idx + 1, k)

	def _delete(self, pos, idx):
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len -= 1
		self._fen_update(pos, -1)
		del _lists[pos][idx]
		_list_lens[pos] -= 1
		if _list_lens[pos]:
			_mins[pos] = _lists[pos][0]
		else:
			del _lists[pos]
			del _list_lens[pos]
			del _mins[pos]
			self._rebuild = True

	def _loc_left(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(lo, pos) = (-1, len(_lists) - 1)
		while lo + 1 < pos:
			mi = lo + pos >> 1
			if value <= _mins[mi]:
				pos = mi
			else:
				lo = mi
		if pos and value <= _lists[pos - 1][-1]:
			pos -= 1
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value <= _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def _loc_right(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(pos, hi) = (0, len(_lists))
		while pos + 1 < hi:
			mi = pos + hi >> 1
			if value < _mins[mi]:
				hi = mi
			else:
				pos = mi
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value < _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def add(self, value):
		_load = self._load
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len += 1
		if _lists:
			(pos, idx) = self._loc_right(value)
			self._fen_update(pos, 1)
			_list = _lists[pos]
			_list.insert(idx, value)
			_list_lens[pos] += 1
			_mins[pos] = _list[0]
			if _load + _load < len(_list):
				_lists.insert(pos + 1, _list[_load:])
				_list_lens.insert(pos + 1, len(_list) - _load)
				_mins.insert(pos + 1, _list[_load])
				_list_lens[pos] = _load
				del _list[_load:]
				self._rebuild = True
		else:
			_lists.append([value])
			_mins.append(value)
			_list_lens.append(1)
			self._rebuild = True

	def discard(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_right(value)
			if idx and _lists[pos][idx - 1] == value:
				self._delete(pos, idx - 1)

	def remove(self, value):
		_len = self._len
		self.discard(value)
		if _len == self._len:
			raise ValueError('{0!r} not in list'.format(value))

	def pop(self, index=-1):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		value = self._lists[pos][idx]
		self._delete(pos, idx)
		return value

	def bisect_left(self, value):
		(pos, idx) = self._loc_left(value)
		return self._fen_query(pos) + idx

	def bisect_right(self, value):
		(pos, idx) = self._loc_right(value)
		return self._fen_query(pos) + idx

	def count(self, value):
		return self.bisect_right(value) - self.bisect_left(value)

	def __len__(self):
		return self._len

	def __getitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		return self._lists[pos][idx]

	def __delitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		self._delete(pos, idx)

	def __contains__(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_left(value)
			return idx < len(_lists[pos]) and _lists[pos][idx] == value
		return False

	def __iter__(self):
		return (value for _list in self._lists for value in _list)

	def __reversed__(self):
		return (value for _list in reversed(self._lists) for value in reversed(_list))

	def __repr__(self):
		return 'SortedList({0})'.format(list(self))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def pow(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def gcd(a, b):
	if a == b:
		return a
	while b > 0:
		(a, b) = (b, a % b)
	return a

def prefix_sum(ar):
	return list(accumulate(ar))

def suffix_sum(ar):
	return list(accumulate(ar[::-1]))[::-1]

def N():
	return int(inp())
dx = [0, 0, 1, -1]
dy = [1, -1, 0, 0]

def YES():
	print('YES')

def NO():
	print('NO')

def Yes():
	print('Yes')

def No():
	print('No')
from collections import defaultdict

def numberOfSetBits(i):
	i = i - (i >> 1 & 1431655765)
	i = (i & 858993459) + (i >> 2 & 858993459)
	return ((i + (i >> 4) & 252645135) * 16843009 & 4294967295) >> 24

class MergeFind:

	def __init__(self, n):
		self.parent = list(range(n))
		self.size = [1] * n
		self.num_sets = n

	def find(self, a):
		to_update = []
		while a != self.parent[a]:
			to_update.append(a)
			a = self.parent[a]
		for b in to_update:
			self.parent[b] = a
		return self.parent[a]

	def merge(self, a, b):
		a = self.find(a)
		b = self.find(b)
		if a == b:
			return
		self.num_sets -= 1
		self.parent[a] = b
		self.size[b] += self.size[a]

	def set_size(self, a):
		return self.size[self.find(a)]

	def __len__(self):
		return self.num_sets

def lcm(a, b):
	return abs(a // gcd(a, b) * b)

def solve():
	(m, n) = sep()
	print(m - sum(((i / m) ** n for i in range(m))))
solve()


(m, n) = list(map(int, input().split()))
su = 0
prev = 0
for i in range(1, m + 1):
	temp = pow(i / m, n)
	su += i * (temp - prev)
	prev = temp
print('{:.6f}'.format(su))


import sys
(m, n) = list(map(int, input().strip().split()))
sum = m ** (-n)
for i in range(2, m + 1):
	sum += ((i / m) ** n - ((i - 1) / m) ** n) * i
print(sum)


def pw(a, b):
	if b == 0:
		return 1
	if b == 1:
		return a
	x = pw(a, b // 2)
	if b & 1:
		return x * x * a
	else:
		return x * x
(m, n) = map(int, input().split())
ans = 0
for i in range(1, m + 1):
	ans += (pw(i / m, n) - pw((i - 1) / m, n)) * i
print('%.5f' % ans)


(m, n) = (int(x) for x in input().split(' '))
print(sum((i * ((i / m) ** n - ((i - 1) / m) ** n) for i in range(1, m + 1))))


(n, m) = map(int, input().split())
i = n
s = 0
while i:
	s += i * (pow(i / n, m) - pow((i - 1) / n, m))
	i -= 1
print(s)


from collections import Counter, defaultdict, deque
import heapq as hq
from itertools import count, islice
import math
import sys
input = sys.stdin.readline
(m, n) = [int(x) for x in input().split()]
s = 0
for i in range(1, m + 1):
	s += i * ((i / m) ** n - ((i - 1) / m) ** n)
print(s)


(faces, vezes) = [int(s) for s in input().split(' ')]
total = 0
last = 0
for i in range(1, faces + 1):
	aux = (i / faces) ** vezes
	total += (aux - last) * i
	last = aux
print(total)


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
M = 10 ** 9 + 7
EPS = 1e-06

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
(m, n) = value()
ans = 0
for i in range(1, m + 1):
	binomial = (i / m) ** n - ((i - 1) / m) ** n
	ans += binomial * i
print(ans)


(m, n) = [int(i) for i in input().split()]
resposta = 0
aux = 0
for i in range(1, m + 1):
	resposta += (pow(i / m, n) - aux) * i
	aux = pow(i / m, n)
print(round(resposta, 12))


(m, n) = map(int, input().split(' '))
print(sum((i * (pow(i / m, n) - pow((i - 1) / m, n)) for i in range(1, m + 1))))


def power(n, m):
	mu = n
	res = 1
	while m:
		if m % 2:
			res = res * mu
		mu = mu * mu
		m = m >> 1
	return res
import math
(n, m) = map(int, input().split())
res = n
for i in range(1, n):
	res -= power(i / n, m)
print(res)


def avg(m, n):
	result = 0
	for k in range(1, m + 1):
		result += k * ((k / m) ** n - ((k - 1) / m) ** n)
	return result
(m, n) = map(int, input().split())
print(avg(m, n))


import sys
import math
import re
import string

def f(m, n):
	s = 0
	for i in range(1, m):
		s += (i / m) ** n
	return m - s
(m, n) = [int(x) for x in input().split(' ')]
x = f(m, n)
print('{:.12f}'.format(x))


(m, n) = [int(x) for x in input().split()]
ans = m
for i in range(1, m):
	ans -= (i / m) ** n
print('%0.10f' % ans)


from sys import stdin, stdout
from collections import defaultdict, Counter
from bisect import bisect, bisect_left
import math

def f(k, n, m):
	return k * ((k ** n - (k - 1) ** n) / m ** n)
I = stdin.readline
(m, n) = map(int, I().split())
ans = 0
for i in range(1, m):
	ans -= (i / m) ** n
ans += m
print(ans)


(n, k) = map(int, input().split())
s = 0.0
for i in range(1, n + 1):
	s += i * ((i / n) ** k - ((i - 1) / n) ** k)
print(s)


d = input()
n = int(d.split(' ')[0])
k = int(d.split(' ')[1])
sm = 0
for i in range(n, -1, -1):
	buyuk = (i / n) ** k
	kucuk = ((i - 1) / n) ** k
	sm += (buyuk - kucuk) * i
print(sm)


import sys
(m, n) = map(int, sys.stdin.readline().split())
ans = m
for i in range(1, m):
	ans -= (i / m) ** n
print(ans)


line = input().split()
m = int(line[0])
n = int(line[1])
result = 0
for current in range(m, 0, -1):
	result += current * (pow(current / m, n) - pow((current - 1) / m, n))
print(result)


import math

def calculate(n, m):
	result = 0
	for i in range(1, m + 1):
		result += i * (math.pow(i / m, n) - math.pow((i - 1) / m, n))
	return result
(m, n) = map(int, input().split())
print(calculate(n, m))


(m, n) = map(int, input().split())
ans = m - sum(map(lambda x: pow(x / m, n), range(m)))
print('%.8f' % ans)


(m, n) = map(int, input().split())
Mx = m
for x in range(1, m):
	Mx -= (float(x) / m) ** n
print(Mx)


(m, n) = [int(i) for i in input().split()]
d = pow(m, n)
prev = 0
v = [0 for i in range(m + 7)]
for i in range(1, m + 1):
	v[i] = pow(i / m, n)
ans = 0
for i in range(1, m + 1):
	ans += i * (v[i] - v[i - 1])
print(ans)


(m, n) = map(int, input().split())
ans = 0
powi = [0 for i in range(m + 1)]
deno = pow(m, n)
for i in range(1, m + 1):
	powi[i] = pow(i / m, n)
for i in range(1, m + 1):
	ans += (powi[i] - powi[i - 1]) * i
print(ans)


from os import path
import sys
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def solve():
	(m, n) = mi()
	ans = 0
	for i in range(1, m + 1):
		ans += i * (pow(i / m, n) - pow((i - 1) / m, n))
	print(ans)
solve()


def main():
	(m, n) = list(map(int, input().split()))
	ans = 0
	for i in range(1, m + 1):
		ans += i * (pow(i / m, n) - pow((i - 1) / m, n))
	print('%0.4f' % ans)
main()


(m, n) = map(int, input().split())
resp = 0
for i in range(m):
	j = i + 1
	resp += j * ((j / m) ** n - ((j - 1) / m) ** n)
print('%.12f' % resp)


(m, n) = map(int, input().split())
expected_max = m
for i in range(0, m):
	expected_max -= pow(i / m, n)
print(expected_max)


(m, n) = map(int, input().strip().split(' '))
ans = 0
for i in range(1, m + 1):
	ans += i * (pow(i / m, n) - pow((i - 1) / m, n))
print('%.9f' % ans)


(m, n) = input().split()
prob = float(0)
x1 = 0
for i in range(1, int(m) + 1):
	x = (i / int(m)) ** int(n)
	prob += (x - x1) * i
	x1 = x
print('%.12f' % prob)


import os
import sys
from io import BytesIO, IOBase

def main():
	(m, n) = map(int, input().split())
	print(m - sum(((i / m) ** n for i in range(m))))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


(m, n) = [int(i) for i in input().split()]
soma = 0
i = m
while i:
	soma += (i / m) ** n * i
	soma -= ((i - 1) / m) ** n * i
	i -= 1
print(soma)


import sys
import itertools
import math
import collections
from collections import Counter

def getdict(n):
	d = {}
	if type(n) is list:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 1
	prime[0] = prime[1] = False
	r = [p for p in range(n + 1) if prime[p]]
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)
(m, n) = mi()
r = 0
for i in range(1, m):
	r += (i / m) ** n
print(m - r)


import math

def main():
	(m, n) = map(int, input().split())
	ans = 0
	for i in range(2, m + 1):
		ans -= math.pow((i - 1) / m, n)
	ans += m
	print('{:.12f}'.format(ans))
main()


(m, n) = map(int, input().split())
a = m ** (-n)
for i in range(2, m + 1):
	a += ((i / m) ** n - ((i - 1) / m) ** n) * i
print(a)


import sys
(m, n) = map(int, sys.stdin.readline().split())
print(sum((i * (pow(i / m, n) - pow((i - 1) / m, n)) for i in range(1, m + 1))))


(m, n) = map(int, input().split())
ret = m
for i in range(m):
	ret -= pow(i / m, n)
print(ret)


def main():
	(m, n) = read_ints()
	total = 0.0
	for i in range(1, m + 1):
		total += i * ((i / m) ** n - ((i - 1) / m) ** n)
	print(total)
from collections import *
MOD = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split()))

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b, a % b)

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))
main()


import math

def solve():
	[m, n] = [int(x) for x in input().split()]
	ans = 0
	for i in range(m):
		ans += pow(i / m, n)
	ans = m - ans
	print(ans)
solve()


def main():
	(m, n) = map(int, input().split())
	print(sum(((i + 1) * (((i + 1) / m) ** n - (i / m) ** n) for i in range(m))))
main()


def answer(m, n):
	count = 0.0
	for i in range(1, m + 1):
		count += round(i * ((i / m) ** n - ((i - 1) / m) ** n), 10)
	return count
(m, n) = map(int, input().split())
print(answer(m, n))


(m, n) = map(int, input().split())
ans = 0
l1 = [0] * (m + 1)
if m > 1:
	l1[0] = (1 / m) ** n
	x = l1[0]
	for i in range(1, m + 1):
		if i == 1:
			ans += l1[0] * i
		else:
			l1[i - 1] = (i / m) ** n - x
			x += l1[i - 1]
			ans += l1[i - 1] * i
	print(ans)
else:
	print(1)


import math
import itertools
import collections

def getdict(n):
	d = {}
	if type(n) is list or type(n) is str:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return ' '.join(map(str, arr))

def revn(n):
	return int(str(n)[::-1])

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True
(m, n) = mi()
t = 0
for i in range(1, m):
	t += (1 - i / m) ** n
print(m - t)


(m, n) = map(int, input().split())
sum = 0.0
for i in range(1, m + 1):
	sum += i * ((1.0 * i / m) ** n - ((i - 1.0) / m) ** n)
print('%.10lf' % sum)


(m, n) = str(input()).split()
(n, m) = (int(n), int(m))
sum = 0
for i in range(1, m + 1):
	sum += i * ((i / m) ** n - ((i - 1) / m) ** n)
print(sum)


import math

def main():
	inp = list(map(int, input().split()))
	m = inp[0]
	n = inp[1]
	i = 1
	ans = 0
	while i <= m:
		ans += i * (math.pow(1.0 * i / m, n) - math.pow(1.0 * (i - 1) / m, n))
		i += 1
	print(format(ans, '.12f'))
main()


(m, n) = map(int, input().split())
P = 1
ans = 0
while m > 0:
	p = P * (1 - ((m - 1) / m) ** n)
	ans += m * p
	m -= 1
	P -= p
print(ans)


(m, n) = map(int, input().split())

def binpow(a, b):
	if a == 0:
		return 0
	if b == 0:
		return 1
	if b % 2 == 0:
		res = binpow(a, b // 2)
		return res * res
	return binpow(a, b - 1) * a
ans = 0
for mx in range(1, m):
	ans -= binpow(mx / m, n)
ans += m
print(ans)


import math

def main():
	txt = input()
	txt = txt.split()
	m = int(txt[0])
	n = int(txt[1])
	p = 0.0
	i = m
	while i:
		p = p + (pow(i / m, n) - pow((i - 1) / m, n)) * i
		i -= 1
	print(f'{p:.16}')
main()


(m, n) = map(int, input().split())
ans = 0
sump = 0
for i in range(1, m + 1):
	p = pow(i / m, n) - sump
	sump += p
	ans += i * p
print(ans)
exit()

def f(x, y):
	if y == 1:
		return 1 / m
	ans = 0.0
	for i in range(1, x):
		ans += f(i, y - 1) / m
	ans += f(x, y - 1) * x / m
	return ans

def F():
	ans = 0
	for i in range(1, m + 1):
		ans += i * f(i, n)
	ans2 = 0
	sump = 0
	for i in range(1, m + 1):
		p = pow(i / m, n) - sump
		sump += p
		ans2 += i * p
	print('ans2', ans2)
	print('ans ', ans)
	return ans
L = 6
for i in range(1, L):
	for j in range(1, L):
		(m, n) = (i, j)
		F()
	print()


def main():
	args = input().split()
	m = int(args[0])
	n = int(args[1])
	res = 0
	for i in range(1, m + 1):
		res += i * ((i / m) ** n - ((i - 1) / m) ** n)
	print(res)
main()


inputs = [int(x) for x in input().split()]
m = inputs[0]
n = inputs[1]
e = 0
for i in range(m):
	e += (i + 1) * (((i + 1) / m) ** n - (i / m) ** n)
print(e)


def Pony(m, n):
	s = 0
	for i in range(1, m + 1):
		s += i * ((i / m) ** n - ((i - 1) / m) ** n)
	print(s)
(m, n) = map(int, input().split())
Pony(m, n)


from decimal import *
(m, n) = map(int, input().split())
ans = 0
for i in range(1, m + 1):
	ans += i * ((i / m) ** n - ((i - 1) / m) ** n)
print('{:.12f}'.format(float(ans)))


[m, n] = list(map(float, input().split()))
E = 0
for i in range(1, int(m + 1)):
	E += i * ((i / m) ** n - ((i - 1) / m) ** n)
print(E)


(m, n) = [int(i) for i in input().split()]
expected = 0.0
i = m
while i:
	expected += (pow(i / m, n) - pow((i - 1) / m, n)) * i
	i -= 1
print(expected)


(m, n) = map(int, input().split())
powers = []
for j in range(m + 1):
	powers.append(pow(j / m, n))
print(sum((j * (powers[j] - powers[j - 1]) for j in range(1, m + 1))))


(m, n) = map(int, input().split())
s = sum([pow(k / m, n) for k in range(1, m)])
print(m - s)


k = input()
m = int(k.split()[0])
n = int(k.split()[1])
q = 0
for i in range(1, m):
	q += (i / m) ** n
print(m - q)


from decimal import *
(m, n) = map(int, input().split())
s = 0
for i in range(1, m + 1):
	s += i * Decimal((i / m) ** n - ((i - 1) / m) ** n)
print(s)


(m, n) = list(map(int, input().split()))
exp = 0
for k in range(1, m + 1):
	prob = (k / m) ** n * (1 - ((k - 1) / k) ** n)
	exp += prob * k
print(exp)


(n, m) = map(int, input().split(' '))
ans = n
for i in range(1, n):
	num = (n - i) / n
	res = pow(num, m)
	ans -= res
print(ans)


(m, n) = list(map(int, input().split()))
p = m ** n
result = 0
for i in range(1, m + 1):
	result += ((i / m) ** n - ((i - 1) / m) ** n) * i
print(result)


(a, b) = map(int, input().split())
sum = 0
for i in range(1, a + 1):
	sum += i * ((i / a) ** b - ((i - 1) / a) ** b)
print(sum)


def read(mode=2):
	inputs = input().strip()
	if mode == 0:
		return inputs
	if mode == 1:
		return inputs.split()
	if mode == 2:
		return map(int, inputs.split())

def read_str():
	return read(0)

def read_int():
	return read(2)[0]
(m, n) = read()
res = m
for x in range(1, m):
	res -= (float(x) / float(m)) ** n
print(res)


import os
from sys import stdin, stdout

def solve(tc):
	(m, n) = map(int, stdin.readline().split())
	tot = 0
	for i in range(1, m + 1):
		tot += ((i / m) ** n - ((i - 1) / m) ** n) * i
	print(tot)
tcs = 1
tc = 1
while tc <= tcs:
	solve(tc)
	tc += 1


def calculate(i, m, n):
	iToTheN = (i / m) ** n
	iMinusOneToTheN = ((i - 1) / m) ** n
	return (iToTheN - iMinusOneToTheN) * i
(m, n) = [int(k) for k in input().split()]
valor = 0
for i in range(m, 0, -1):
	valor += calculate(i, m, n)
print('%.12f' % valor)


(m, n) = input().split()
hasil = 0
temp = 0
for dot in range(1, int(m) + 1):
	appear = (dot / int(m)) ** int(n)
	hasil += dot * (appear - temp)
	temp = appear
print(hasil)


import sys
import math
(m, n) = map(int, input().split())
ans = 0
for R in range(1, m + 1):
	ans += R * (pow(R / m, n) - pow((R - 1) / m, n))
print('%.10f' % ans)


import sys
readline = sys.stdin.readline
(N, M) = map(int, readline().split())
ans = 0
for i in range(1, N + 1):
	ans += i * ((i / N) ** M - ((i - 1) / N) ** M)
print(ans)


(m, n) = map(int, input().split())
if m > 1:
	n2 = n + 1
	num3 = m ** n
	num4 = 10 ** 15
	num2 = max(2, int(m / num4 ** (1 / n2)) - 300)
	num = (num2 - 1) ** n
	i = num2
	ans = -1 / num3
	while i < m:
		ans -= (i / m) ** n
		i += 1
	print(ans + m - 8e-05)
else:
	print(1)


import os
import sys
from io import BytesIO, IOBase
import heapq as h
from bisect import bisect_left, bisect_right
from types import GeneratorType
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			self.os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import collections as col

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())
MOD = 10 ** 9 + 7

def solve():
	(M, N) = getInts()
	ans = 0
	for x in range(1, M + 1):
		tmp = pow(x / M, N) * (1 - pow((x - 1) / x, N)) / (1 - (x - 1) / x)
		ans += tmp
	return ans
print(solve())


from math import *

def bpow(a, n):
	res = 1
	while n > 0:
		if n % 2 != 0:
			res *= a
		a *= a
		n >>= 1
	return res
(M, N) = map(int, input().split())
sm = 0
for i in range(1, M):
	sm += bpow(i / M, N)
print(M - sm)


(m, n) = map(int, input().split())
p_leq = [(i / m) ** n for i in range(m + 1)]
sol = 0
for i in range(1, m + 1):
	sol += i * (p_leq[i] - p_leq[i - 1])
print(sol)


(m, n) = map(int, input().split())
e = 0.0
for k in range(1, m + 1):
	e += k * ((k / m) ** n - ((k - 1) / m) ** n)
print(e)


(m, n) = [int(i) for i in input().split()]
p = 1 / m
ans = 0
aux = 0
prev = 0
for i in range(1, m + 1):
	aux = (i / m) ** n
	ans += (aux - prev) * i
	prev = aux
print(ans)


import sys, math, string, fractions, functools, collections
sys.setrecursionlimit(10 ** 7)
RI = lambda x=' ': list(map(int, input().rstrip().split(x)))
RS = lambda x=' ': input().rstrip().split(x)
dX = [-1, 1, 0, 0, -1, 1, -1, 1]
dY = [0, 0, -1, 1, 1, -1, -1, 1]
mod = int(1000000000.0 + 7)
eps = 1e-06
MAX = 1010
ans = 0
(m, n) = RI()
for i in range(1, m + 1):
	ans += i * (pow(i / m, n) - pow((i - 1) / m, n))
print('%.12f' % ans)


import math

def solve():
	(m, n) = input().strip().split()
	m = int(m)
	n = int(n)
	ans = 0.0
	for i in range(0, m + 1):
		ans += i * (pow(i / m, n) - pow((i - 1) / m, n))
	return ans
print(solve())


(m, n) = input().split()
(m, n) = (int(m), int(n))
res = 0
for i in range(1, m + 1):
	res += i * (pow(i / m, n) - pow((i - 1) / m, n))
print(res)


(m, n) = map(int, input().split())
print('{:.9}'.format(m - sum(((i / m) ** n for i in range(m)))))


(max, n_toss) = [int(i) for i in input().split()]
exp = 0.0
for i in range(max + 1):
	exp = float(exp) + float(i * ((float(i) / max) ** n_toss - (float(i - 1) / max) ** n_toss))
print(exp)


(m, n) = map(int, input().split())
ans = 0.0
if n > 10 * m:
	print(m)
else:
	for i in range(m, 0, -1):
		x = float(i)
		val = (x / m) ** n - ((x - 1) / m) ** n
		val *= x
		if val < 1e-09:
			break
		else:
			ans += val
	print(ans)


(m, n) = map(int, input().split())
soma = 0
qtdm = n
ax = m ** n
resposta = 0
ant = 0
for i in range(m, 0, -1):
	soma += ((i / m) ** n - ((i - 1) / m) ** n) * i
print(soma)


(m, n) = [int(i) for i in input().split()]
ans = 0
for i in range(1, m + 1):
	tmp_a = pow(i / m, n)
	tmp_b = pow((i - 1) / m, n)
	ans += i * (tmp_a - tmp_b)
print(ans)


(m, n) = input().split()
m = int(m)
n = int(n)
answ = 0
for i in range(0, m + 1):
	answ += (pow(i / m, n) - pow((i - 1) / m, n)) * i
print('{:.10f}'.format(answ))


(m, n) = [int(i) for i in input().split()]
aux = 0
for i in range(m):
	aux += (i / m) ** n
expec = m - aux
print(expec)


(m, n) = map(int, input().split())
m = float(m)
n = float(n)
x = 1.0 / float(m)
count = 0.0
p = m
while p > 0:
	a = (p * x) ** n - ((p - 1) * x) ** n
	a = a * p
	count = count + a
	p = p - 1
if n == 1:
	print(float(m + 1) / 2)
else:
	print(count)


(m, n) = tuple(map(int, input().split()))
ans = 0
for x in range(1, m + 1):
	ans += x * ((x / m) ** n - ((x - 1) / m) ** n)
print('%0.9f' % ans)


(m, n) = [int(x) for x in input().split()]
ans = m
tmp = 0.0
for i in range(0, m):
	tmp = tmp + (i / m) ** n
ans = ans - tmp
print(ans)


entrada = input()
itens = entrada.split()
(m, n) = (float(itens[0]), int(itens[1]))
t = 1
esperado = 0
while t <= m:
	esperado += t * ((t / m) ** n - ((t - 1) / m) ** n)
	t += 1
print(esperado)


def math_od(n, k):
	result = 0
	for i in range(1, n + 1):
		result += i * ((i / float(n)) ** k - ((i - 1) / float(n)) ** k)
	return '{0:.12f}'.format(result)
(N, K) = [int(j) for j in input().split()]
print(math_od(N, K))


(m, n) = map(int, input().split())
mn = m ** n
sm = 1 / mn
exp = 1 / mn
for i in range(2, m + 1):
	na = (i / m) ** n - sm
	exp += na * i
	sm += na
print(exp)


def ans(m, n):
	out = m
	for i in range(1, m):
		out -= (i / m) ** n
	return out
(m, n) = map(int, input().split())
print(ans(m, n))


def main():
	(m, n) = read()
	print(m - sum(((i / m) ** n for i in range(1, m))))

def read(mode=2):
	inputs = input().strip()
	if mode == 0:
		return inputs
	if mode == 1:
		return inputs.split()
	if mode == 2:
		return map(int, inputs.split())

def read_str():
	return read(0)

def read_int():
	return read(2)[0]

def write(s='\n'):
	if isinstance(s, list):
		s = ' '.join(map(str, s))
	s = str(s)
	print(s, end='')
main()


import sys, os, io
import math, bisect, operator
(inf, mod) = (float('inf'), 10 ** 9 + 7)
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, defaultdict
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
Neo = lambda : list(map(int, input().split()))
(m, n) = Neo()
e = 0
for i in range(1, m + 1):
	e += i * ((i / m) ** n - ((i - 1) / m) ** n)
print(e)


prob = 0
(m, n) = input().split()
(m, n) = (int(m), int(n))
for i in range(m + 1):
	prob += i * ((i / m) ** n - ((i - 1) / m) ** n)
print('%.12f' % prob)


import math
(m, n) = [int(i) for i in input().split()]
result = 0.0
count = m
while count > 0:
	parte1 = math.pow(count / m, n)
	parte2 = math.pow((count - 1) / m, n)
	result += (parte1 - parte2) * count
	count -= 1
print(result)


__author__ = 'Jacob Dlougach'
(m, n) = map(int, input().split())
result = 0
for i in range(m):
	result += ((i + 1) / m) ** n
print('{:.9}'.format(m + 1 - result))


(nFaces, nTosses) = map(int, input().split())
ret = 0
for face in range(1, nFaces + 1):
	ret += face * ((face / nFaces) ** nTosses - ((face - 1) / nFaces) ** nTosses)
print(ret)


import math
(m, n) = map(int, input().split(' '))
a = 0
b = 0
o = 0
for i in range(m):
	a = ((i + 1) / m) ** n
	o = o + (a - b) * (i + 1)
	b = a
print(o)


(M, N) = map(int, input().split())
acc = 0.0
for i in range(1, M + 1):
	i = float(i)
	acc += i * ((i / M) ** N - ((i - 1) / M) ** N)
print(acc)


def dice_exp_max(faces, times):

	def _prob_less_than_d(dots):
		return (dots / faces) ** times

	def _exp_max_d(dots):
		return dots * (_prob_less_than_d(dots) - _prob_less_than_d(dots - 1))
	return sum((_exp_max_d(dots) for dots in range(1, faces + 1)))
(m, n) = map(int, input().split())
print(dice_exp_max(m, n))


import sys
import math
(m, n) = map(int, sys.stdin.readline().split())
C = 0
for i in range(1, m + 1):
	count = i * ((i / m) ** n - ((i - 1) / m) ** n)
	C = C + count
print(C)


from math import pow
(m, n) = input().split()
(m, n) = (int(m), int(n))
res = 0
for i in range(1, m):
	res += (i / m) ** n
print(m - res)


def prob(x, m, n):
	return (x / m) ** n
(m, n) = list(map(int, input().split()))
probs = list()
for x in range(1, m + 1):
	probs.append(prob(x, m, n))
for x in range(m - 1, 0, -1):
	probs[x] -= probs[x - 1]
esperanca = 0
for x in range(m):
	esperanca += (x + 1) * probs[x]
print(esperanca)


inp = list(map(int, input().split()))
(m, n) = inp
ans = m
for i in range(1, m):
	ans -= pow(i / m, n)
print(ans)


import sys, math
from collections import deque

def solve():
	return

def poo(x, p):
	if p == 0:
		return 1
	a = poo(x, p // 2)
	if p % 2 == 0:
		return a * a
	else:
		return a * a * x
(m, n) = map(int, input().split())
ans = 0
for i in range(1, m + 1):
	ans += i * (poo(i / m, n) - poo((i - 1) / m, n))
print(ans)


arr = input().split()
m = int(arr[0])
n = int(arr[1])
ans = m - sum([(i / m) ** n for i in range(m)])
print(ans)


import math
(m, n) = [int(item) for item in input().split()]
res = 0
for i in range(1, m + 1):
	current = i * (math.pow(i / m, n) - math.pow((i - 1) / m, n))
	res += current
print(res)


def prob(m, n):
	ans = 0.0
	i = m
	while i:
		ans += (pow(i / m, n) - pow((i - 1) / m, n)) * i
		i = i - 1
	return ans
(m, n) = map(int, input().split())
print(prob(m, n))