3R2 - Standby for Action

Our dear Cafe's owner, JOE Miller, will soon take part in a new game TV-show "1 vs. $n$"!

The game goes in rounds, where in each round the host asks JOE and his opponents a common question. All participants failing to answer are eliminated. The show ends when only JOE remains (we assume that JOE never answers a question wrong!).

For each question JOE answers, if there are $s$ ($s > 0$) opponents remaining and $t$ ($0 \le t \le s$) of them make a mistake on it, JOE receives $\displaystyle\frac{t}{s}$ dollars, and consequently there will be $s - t$ opponents left for the next question.

JOE wonders what is the maximum possible reward he can receive in the best possible scenario. Yet he has little time before show starts, so can you help him answering it instead?


-----Input-----

The first and single line contains a single integer $n$ ($1 \le n \le 10^5$), denoting the number of JOE's opponents in the show.


-----Output-----

Print a number denoting the maximum prize (in dollars) JOE could have.

Your answer will be considered correct if it's absolute or relative error won't exceed $10^{-4}$. In other words, if your answer is $a$ and the jury answer is $b$, then it must hold that $\frac{|a - b|}{max(1, b)} \le 10^{-4}$.


-----Examples-----
Input
1

Output
1.000000000000

Input
2

Output
1.500000000000



-----Note-----

In the second example, the best scenario would be: one contestant fails at the first question, the other fails at the next one. The total reward will be $\displaystyle \frac{1}{2} + \frac{1}{1} = 1.5$ dollars.

Source: codeforces | Difficulty: EASY
Tags: Combinatorics

Mathematics

Greedy algorithms


Solutions:
import sys
import math, bisect, operator
(inf, m) = (float('inf'), 10 ** 9 + 7)
sys.setrecursionlimit(10 ** 6)
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, defaultdict
I = lambda : int(sys.stdin.readline())
neo = lambda : map(int, sys.stdin.readline().split())
Neo = lambda : list(map(int, sys.stdin.readline().split()))
n = I()
Ans = 0
while n > 1:
	Ans += 1 / n
	n -= 1
print(Ans + 1)


from sys import stdin, stdout
import collections
import itertools
from math import log, exp
import operator
import functools

def ii():
	return int(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline()
n = ii()
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


n = int(input())
c = 0
for i in range(n, 0, -1):
	c += 1 / i
print(c)


n = int(input())
ans = 0
for v in range(1, n + 1):
	ans += 1 / v
print(ans)


def main():
	n = int(input())
	ans = 0
	for i in range(1, n + 1):
		ans += 1 / i
	print(ans)
main()


n = int(input())
sumi = 0
for i in range(1, n + 1):
	sumi += 1 / i
print(sumi)


n = int(input())
count = 0
while n >= 1:
	count += 1 / n
	n = n - 1
print(count)


n = int(input())
tot_joe = 0.0
t = 1
index = 1
while index <= n:
	tot_joe += 1 / index
	index += 1
print(tot_joe)


n = int(input())
res = 0.0
for i in range(1, n + 1):
	res += 1.0 / i
print(res)


n = int(input())
resposta = 0
for i in range(n):
	resposta = resposta + 1 / (i + 1)
print(resposta)


n = int(input())
a = 0
for i in range(n):
	a += 1 / (i + 1)
print(a)


n = float(input())
ans = 0.0
while n > 0:
	ans += 1 / n
	n -= 1
print(ans)


a = int(input())
if a == 1:
	print(1)
else:
	s = 0
	r = a
	for i in range(1, a):
		s += 1 / r
		r -= 1
	print(s + 1)


n = int(input())
s = 0.0
for i in range(1, n + 1):
	s += 1 / i
print(s)


def profit(s, p):
	while s > 0:
		p = p + 1 / s
		s = s - 1
	return p
x = int(input())
print(profit(x, 0))


n = int(input())
ans = 0.0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


import sys
n = int(sys.stdin.readline())
dp = [1]
count = 1
for i in range(2, n + 1):
	dp.append(dp[-1] + 1 / i)
print(dp[-1])


n = int(input())
z = 0
for i in range(n):
	z += 1 / (n - i)
print(z)


ans = 0.0
for i in range(1, int(input()) + 1):
	ans += 1 / i
print('{:.10f}'.format(ans))


n = float(input())
a = int(n)
jopa = 0
for i in range(0, a):
	jopa += 1 / (n - i)
print(jopa)


n = int(input())
suma = 0
for i in range(1, n + 1):
	suma += 1 / i
print(round(suma, 12))


n = int(input())
result = 0.0
for i in range(1, n + 1):
	result += 1 / i
print(result)


n = int(input())
ans = 0
s = n
i = 1
while s > 0:
	ans += i / s
	s -= i
print(ans)


x = int(input())
sum = 0
for a in range(1, x + 1):
	sum += 1 / a
print('%.10f' % sum)


def do(N):
	ans = 0
	for i in range(1, N + 1):
		ans += 1 / i
	print(ans)
N = int(input())
do(N)


import math
n = int(input())
if n == 1:
	print(1)
else:
	hn = 0
	for i in range(1, n + 1):
		hn += 1 / i
	print(round(hn, 12))


n = int(input())
print(sum((1 / v for v in range(1, n + 1))))


def find(n):
	ans = 0
	while n > 0:
		ans += 1 / n
		n -= 1
	return ans
n = int(input())
print(find(n))


from sys import stdin
input = stdin.readline
n = int(input())
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


from sys import stdin
import math
inp = lambda : stdin.readline().strip()
n = int(inp())
ans = 0
for i in range(n):
	ans += 1 / n
	n -= 1
print(ans)


n = int(input())
sm = 0
for i in range(n):
	sm = sm + 1 / (i + 1)
print(sm)


n = int(input())
ans = 0
while n > 0:
	ans += 1 / n
	n -= 1
print('{0:.12f}'.format(ans))


print(sum((1 / (i + 1) for i in range(int(input())))))


def findScore():
	n = int(input())
	ans = 1.0
	s = 0.0
	for i in range(n, 0, -1):
		s += 1 / i
	print(s)
findScore()


t = int(input())
c = 0
for i in range(1, t + 1):
	c += 1 / i
print(c)


n = int(input())
cnt = 0
for i in range(1, n + 1):
	cnt = cnt + 1 / i
print(cnt)


n = int(input())
s = 0
while n != 0:
	s = s + 1 / n
	n = n - 1
print('%.12f' % s)


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

def I():
	return int(input())

def S():
	return str(input())

def L():
	return list(R())
from collections import Counter
import math
import sys
n = I()
sum = 0
for i in range(1, n + 1):
	sum += 1 / i
print(sum)


a = int(input())
s = 0.0
for i in range(1, a + 1):
	s += 1.0 / i
print(s)


import math
t = int(input())
ans = 0
for i in range(t):
	ans = ans + 1 / t
	t -= 1
print(ans)


import sys
input = sys.stdin.readline

def main():
	n = int(input())
	ans = 0
	for i in range(1, n + 1):
		ans += 1 / n
		n -= 1
	print(ans)
main()


import sys

def main():
	n = int(sys.stdin.readline()[:-1])
	print(sum((1 / x for x in range(1, n + 1))))
main()


n = int(input())
answer = 0.0
for i in range(1, n + 1):
	answer += 1 / i
answer = str(answer)
print(answer + ''.join(['0'] * (12 - len(answer.split('.')[1]))))


t = int(input())
tot = 0.0
for i in range(1, t + 1):
	tot += 1 / i
print(tot)


N = int(input())
t = 0
i = 0
while i <= N and N > 0:
	s = 1
	t += s / N
	N = N - 1
print(t)


import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

def solve():
	n = mint()
	r = 0.0
	for i in range(1, n + 1):
		r += 1 / i
	print(r)
solve()


N = int(input())
S = 0
for i in range(1, N + 1):
	S += 1 / i
print(S)


import copy
import sys
from collections import defaultdict, Counter

def input():
	return sys.stdin.readline()

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

def maps():
	return map(str, input().split())

def print(arg, *argv, end=None):
	sys.stdout.write(str(arg))
	for i in argv:
		sys.stdout.write(' ' + str(i))
	sys.stdout.write(end) if end else sys.stdout.write('\n')

def GCD(x, y):
	return GCD(y, x % y) if y else x

def modPow(x, y, p):
	(res, x) = (1, x % p)
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		(y, x) = (y >> 1, x * x % p)
	return res

def modInv(s, mod):
	return modPow(s, mod - 2, mod)
from math import *

def solve():
	t = 1
	while t:
		t -= 1
		n = int(input())
		res = 0
		for i in range(n, 0, -1):
			res += 1 / i
		print('%.15f' % res)
solve()


debug = False
if debug:
	f = open('test', 'r')
else:
	f = None

def line(file):
	if debug:
		return file.__next__()
	return input()
n = int(line(f))
_sum = 0
for i in range(n, 0, -1):
	_sum += 1 / i
print(_sum)
if debug:
	f.close()


n = int(input())
maximumPrize = 0
for number in reversed(range(1, n + 1)):
	maximumPrize += 1 / number
print('{:.12f}'.format(maximumPrize))


import sys
input = sys.stdin.readline
n = int(input())
count = 0
for i in range(1, n + 1):
	count += 1 / i
print(count)


import sys

def ints():
	return list(map(int, sys.stdin.readline().strip().split()))
tc = 1
while tc:
	tc -= 1
	n = int(input())
	ans = 0
	for i in range(n, 0, -1):
		ans += 1 / i
	print(ans)


n = int(input())
n1 = n
answer = 0
for i in range(n):
	answer += 1 / n1
	n1 -= 1
print(answer)


(n, ans) = (int(input()), 0)
while n != 0:
	ans += n ** (-1)
	n -= 1
print(ans)


a = int(input())
ans = 0
for i in range(a, 0, -1):
	ans += 1 / i
print('{0:.12f}'.format(ans))


n = int(input())
t = 0
s = n
d = 0
for i in range(n):
	t = 1
	d += t / s
	s = s - t
f = str(d)
if len(f) < 14:
	f += (14 - len(f)) * '0'
elif len(f) > 14:
	f = f[:14]
print(f)


n = int(input())
sum = 0.0
flag = 1
while flag <= n:
	sum += 1 / flag
	flag += 1
print('{:f}'.format(sum))


n = int(input())
sum = 0
if n == 1:
	sum = 1
elif n == 2:
	sum = 1.5
else:
	for i in range(1, n + 1):
		sum = sum + 1 / i
print(float(sum))


n = int(input())
sum1 = 0
for i in range(n, 0, -1):
	sum1 = sum1 + 1 / i
print('%.10f' % sum1)


n = int(input())
dollar = 0
t = 1
while n > 0:
	dollar = dollar + t / n
	n -= 1
print(dollar)


a = float(input())
c = 0
for i in range(1, int(a) + 1):
	c += 1 / i
print(c)


n = int(input())
soma = 0
for i in range(n):
	soma = soma + 1 / (i + 1)
print('{:.12f}'.format(soma))


n = int(input())
s = 0
for i in range(1, n + 1):
	s += 1 / i
k = float(s)
print(k)


n = int(input())
ans = 0
while n != 0:
	ans += 1 / n
	n -= 1
	if n == 0:
		break
print(ans)


participants = int(input())
reward = 0
for idx in range(participants):
	reward = reward + 1 / (idx + 1)
print(reward)


t = int(input())
total = 0
for i in range(1, t + 1):
	total = total + 1 / i
print(round(total, 12))


n = int(input())
r = 0
for i in range(1, n + 1):
	r += 1 / i
print(r)


import collections
n = int(input())
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


import sys
n = int(sys.stdin.readline().rstrip())
sol = 0
for i in range(n):
	sol += 1 / (i + 1)
print(sol)


from fractions import Fraction
n = int(input())
sum = 0.0
for each_number in range(1, n + 1):
	sum += 1 / each_number
print(sum)


n = int(input())
count = 0
for i in range(1, n + 1):
	count += 1 / i
print(count)


a = [0] * 100005
i = 0
for i in range(1, 100001):
	a[i] = a[i - 1] + 1.0 / i
while True:
	try:
		n = int(input())
		print(a[n])
	except:
		break


def calcMaxPrize(opponents: int) -> float:
	maxPrize = 0.0
	for i in range(1, opponents + 1):
		maxPrize += 1 / i
	return maxPrize
opponents = int(input())
print(calcMaxPrize(opponents))


n = int(input())
t = 1
s = n
ans = 0
while s > 0:
	ans += t / s
	s -= 1
print('%.12f' % ans)


n = int(input())
if n == 1:
	print('{0:.12f}'.format(n))
else:
	s = 0
	while n > 0:
		s += 1 / n
		n -= 1
	print('{0:.12f}'.format(s))


a = int(input())
sum = 0
for i in range(a):
	sum += 1 / (i + 1)
print(sum)


import math
n = int(input())
answer = 0
while n != 0:
	answer += 1 / n
	n -= 1
print('{0:.12f}'.format(answer))


import sys
from math import ceil
from collections import deque
n = int(input())
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


n = int(input())
sum = 0
while n > 0:
	sum += 1 / n
	n -= 1
print(sum)


n = int(input())
sums = 0
for i in range(1, n + 1):
	sums += 1 / i
print(sums)


n = int(input())
S = 0
for i in range(1, n + 1):
	S += 1 / i
print(S)


s = int(input())
t = 1
money = 0.0
while s > 0 and s - t >= 0:
	money += t / s
	s = s - t
print('%.10f' % money)


opponents = int(input())
summ = 0
for i in range(1, opponents + 1):
	summ += 1 / i
print(summ)


T = 1
for test_no in range(T):
	n = int(input())
	ans = sum([1.0 / i for i in range(1, n + 1)])
	print(ans)


import math

def inp_n():
	return int(input())

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

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

def is_odd(n):
	if n & 1:
		return True
	return False
n = inp_n()
s = n
t = 1
ans = 0
if s == 1:
	print(float(1.0))
else:
	while s > 0:
		ans += t / s
		s = s - t
	print(ans)


n = int(input())
t = 0
for i in range(n):
	t += 1 / n
	n -= 1
print(t)


n = int(input())
ret = 0
for i in range(n):
	ret += 1 / (i + 1)
print(ret)


n = int(input())
su = 0
for i in range(1, n + 1):
	su += 1 / i
print(su)


n = int(input())
res = 0
i = 1
while i <= n and i < 100000:
	res += 1 / i
	i += 1
print(res)


n = int(input())
t = 0
for i in range(n, 0, -1):
	t = float(t) + float(1) / float(i)
print('{0:.12f}'.format(t))


n = int(input())
out = 0
for i in range(1, n + 1):
	out += 1 / i
print(out)


s = 1
n = int(input())
for i in range(2, n + 1):
	s += 1 / i
print('%.6f' % s)


n = int(input())
sol = 0
for i in range(1, n + 1):
	sol += 1 / i
print(f'{sol:.5f}')


i = int(input())
result = 0
while i > 0:
	result += 1 / i
	i -= 1
print(result)


def joe_on_TV():
	num_contestants = input()
	total = 0.0
	for i in range(1, int(num_contestants) + 1):
		total += float(1 / i)
	return total
print(joe_on_TV())


n = int(input())
ans = 1
for i in range(2, n + 1):
	ans = ans + 1 / i
print(ans)


n = int(input())
ans = 0
for x in range(1, n + 1):
	ans = ans + 1 / x
print('%.12f' % float(ans))


p = 0
for i in range(1, int(input()) + 1):
	p += 1 / i
print(p)


r = []
n = int(input())
d = 0
for i in range(1, n + 1):
	r.append(1 / i)
d = float(sum(r))
print(d)


n = int(input())
dollars = 0
for i in range(n):
	dollars += 1 / n
	n -= 1
print(dollars)


t = int(input())
s = 0
for i in range(1, t + 1):
	s = s + 1 / i
print('%.12f' % s)


n = int(input())
E = 0
for i in range(1, n + 1):
	E += 1 / i
print(E)


import sys, itertools, math
n = int(sys.stdin.readline())
s = 0
for i in range(1, n + 1):
	s += 1 / i
print(s)


from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
mod = 10 ** 9 + 7
eps = 10 ** (-7)

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))

def inpl_str():
	return list(sys.stdin.readline().split())
s = inp()
ans = 1
for i in range(1, s):
	ans += 1 / (i + 1)
print(ans)


n = int(input())
s = 0
while n > 0:
	s = s + 1 / n
	n = n - 1
print('%.4f' % s)


from sys import stdin, stdout
n = int(stdin.readline())
ans = 0
for i in range(n):
	ans += 1 / (i + 1)
print('%.4f' % ans)


from math import gcd, ceil
from collections import defaultdict as dd

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

def inin():
	return int(input())

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

def ar(element, size):
	return [element for i in range(size)]

def digitsum(num):
	su = 0
	while num:
		su += num % 10
		num //= 10
	return su

def pred(n, k, pointer):
	return pointer - k >= n

def yes():
	print('YES')

def no():
	print('NO')
n = inin()
su = 0
while n > 0:
	su += 1 / n
	n -= 1
print(su)


s = int(input())
s1 = 0
while s > 0:
	s1 += 1 / s
	s = s - 1
print(s1)


n = int(input())
answer = 0.0
for x in range(1, n + 1):
	answer += 1 / x
print(answer)


n = int(input())
res = 0
while n >= 1:
	res += 1 / n
	n -= 1
print(res)


participantes = int(input())
acumulador = 0
while participantes != 0:
	acumulador += 1 / participantes
	participantes -= 1
print(acumulador)


import sys
rivals = int(sys.stdin.readline())
dollars = 0
for rival in range(rivals):
	dollars += 1 / (rival + 1)
print(dollars)


if 1:
	n = int(input())
	i = 1
	x = 0
	while i <= n:
		x += 1 / i
		i += 1
	print(x)


n = int(input())
rez = 0
for i in range(n, 0, -1):
	rez += 1 / i
print(rez)


n = int(input())
k = 1
for s in range(n, 1, -1):
	k += 1 / s
print(k)


n = int(input())
ans = 0
if n == 1:
	print(1)
else:
	for i in range(n):
		ans += 1 / n
		n -= 1
	print(ans)


from math import *
n = int(input())
answer = 0
while n > 0:
	answer += 1 / n
	n -= 1
print(answer)


from __future__ import division

def JoeTV(n):
	res = 0
	for i in range(n):
		res += 1 / (n - i)
	print(res)
n = int(input())
JoeTV(n)


n = int(input())
s = sum([1 / i for i in range(1, n + 1)])
print(s)


print(sum(map(lambda x: 1 / x, range(int(input()), 0, -1))))


n = int(input())
sum = 0
for i in range(1, n + 1):
	sum += 1 / i
print('%.12f' % sum)


n = int(input())
i = n
money = 0
while i > 0:
	money += 1 / i
	i -= 1
print(money)


n = int(input())
s = 0.0
while n > 0:
	s += 1 / n
	n -= 1
print('%.6f' % s)


n = int(input())
x = 0
for i in range(1, n + 1):
	x += 1 / i
print('%f' % x)


x = int(input())
sum = 0
while x > 0:
	sum += pow(x, -1)
	x -= 1
print(sum)


num = int(input())
ans = 0
for i in range(1, num + 1):
	ans += 1 / i
print(round(ans, 12))


N = int(input())
ans = float(0)
for i in range(1, N + 1):
	ans += float(1 / i)
print(ans)


n = int(input())
c = 0
while n > 0:
	c = c + 1 / n
	n = n - 1
print(c)


a = int()
n = int(input())
while n > 0:
	a += 1 / n
	n -= 1
print(a)


n = int(input())
rslt = 0.0
for i in range(1, n + 1):
	rslt += 1 / i
print(rslt)


q = int(input())
s = 0
for i in range(1, q + 1):
	s += 1 / i
print('%.6f' % s)


print(sum((1 / k for k in range(1, int(input()) + 1))))


n = int(input())
k = 0
for i in range(1, n + 1):
	k += 1 / i
print(k)


n = int(input())
sum1 = 0
for i in range(1, n + 1):
	sum1 = sum1 + 1 / i
print('%.12f' % sum1)


import math
n = int(input())
sm = 0
for i in range(1, n + 1):
	sm += 1 / i
print(sm)


n = int(input())
array = []
if n == 1:
	print(1 / 1)
else:
	for i in range(1, n + 1):
		array.append(1 / i)
	print(sum(array))


import sys
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
n = int(input())
ans = 0
for i in range(n, 0, -1):
	ans += 1 / i
print(ans)


from math import ceil
n = int(input())
s = 0
while n:
	s = s + 1 / n
	n = n - 1
print(s)


n = int(input())
t = 1
sum1 = 0
while n != 0:
	sum1 += t / n
	n -= 1
print(sum1)


import sys
n = int(sys.stdin.readline())
t = 0
for i in range(n):
	t += 1 / (i + 1)
print(t)


n = float(input())
ans = 0
i = 1
if n == 1:
	print(1.0)
else:
	while i <= n:
		ans += 1 / i
		i += 1
	print(ans)


t = int(input())
su = 0
for i in range(1, t + 1):
	su += 1 / i
print('%.10f' % su)


import math

def harmo(n):
	return math.log(n) + 0.5772156649 + 1 / (2 * n) - 1 / (12 * (n * 2))

def reach(n):
	if n == 1:
		return 1
	else:
		return 1 / n + reach(n - 1)
n = int(input())
if n <= 414:
	print(reach(n))
else:
	print(harmo(n))


def maxprize(n):
	return sum([1 / x for x in range(1, n + 1)])
print(maxprize(int(input())))


def max_possible_reward(num_opp):
	sum = 0
	for i in range(1, num_opp + 1):
		sum += 1.0 / i
	return sum
num_opp = int(input())
print(max_possible_reward(num_opp))


import sys
from sys import stdin, stdout
import bisect
import math
import heapq

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
import math

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

def main():
	n = inin()
	x = 0
	for i in range(1, n + 1):
		x += 1 / i
	print(x)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

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

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			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 sys

class ostream:

	def __lshift__(self, a):
		sys.stdout.write(str(a))
		return self
cout = ostream()
endl = '\n'

def readnumbers(zero=0):
	conv = ord if py2 else lambda x: x
	A = []
	numb = zero
	sign = 1
	i = 0
	s = sys.stdin.buffer.read()
	try:
		while True:
			if s[i] >= b'0'[0]:
				numb = 10 * numb + conv(s[i]) - 48
			elif s[i] == b'-'[0]:
				sign = -1
			elif s[i] != b'\r'[0]:
				A.append(sign * numb)
				numb = zero
				sign = 1
			i += 1
	except:
		pass
	if s and s[-1] >= b'0'[0]:
		A.append(sign * numb)
	return A
main()


s = 0
n = int(input())
for x in range(1, n + 1):
	s += 1 / x
print(s)


def solve(n):
	s = n
	m = 0
	while s > 0:
		m += 1 / s
		s -= 1
	return m

def main():
	n = int(input())
	print(solve(n))
main()


number = int(input())
money = 0
for i in range(number):
	money += 1 / (number - i)
print('%.12f' % money)


n = int(input())
total = 0
if n == 1:
	print(1.0)
elif n == 2:
	print(1.5)
else:
	for i in range(n, 0, -1):
		total += round(1 / i, 8)
	print(total)


import io
import os
from collections import Counter, defaultdict, deque
from fractions import Fraction

def solve(N):
	return float(sum((1 / i for i in range(1, N + 1))))
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
(N,) = [int(x) for x in input().split()]
ans = solve(N)
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 *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
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')

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))
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 zerolist(n):
	return [0] * n

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

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

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

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

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	n = int(inp())
	ans = 0
	l = 1
	for i in range(1, n + 1):
		ans += 1 / i
	print(ans / l)
testcase(1)


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

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

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(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

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

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 * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

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

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
n = int(input())
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


import math, sys
from collections import Counter, defaultdict, deque
from sys import stdin, stdout
input = stdin.readline
lili = lambda : list(map(int, sys.stdin.readlines()))
li = lambda : list(map(int, input().split()))
I = lambda : int(input())
S = lambda : input().strip()
mod = 1000000007
n = int(input())
s = 0
for i in range(0, n):
	s = s + 1 / (n - i)
print(s)


n = int(input())
b = 0.0
for i in range(n):
	b += 1 / n
	n -= 1
print(b)


n = int(input())
money = 0
for i in range(n):
	if n > 1:
		s = 1
	elif n == 1:
		s = 1
	else:
		s = 0
	money = money + s / n
	n = n - s
print(money)


from collections import Counter
from collections import defaultdict
import math
n = int(input())
ans = 0
for i in range(n, 0, -1):
	ans = ans + 1 / i
print(ans)


a = int(input())
res = 0
for i in range(1, a + 1):
	res += 1 / i
print(res)


n = int(input())

def sum(n):
	i = 1
	s = 0.0
	for i in range(1, n + 1):
		s = s + 1 / i
	return s
print(sum(n))


import sys
from math import *
input = sys.stdin.readline
n = int(input())
s = 0
for i in range(1, n + 1):
	s += 1 / i
print(s)


n = int(input())
s = 0
for i in range(1, n + 1):
	s = round(s + 1 / i, 12)
print('%.12f' % s)


import math
import sys

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

def main():
	n = int(input())
	sm = 0
	for i in range(1, n + 1):
		sm += 1 / i
	print(sm)
main()


t = int(input())
ans = 0
a = t
for i in range(1, t + 1):
	ans += 1 / i
print(ans)


s = int(input())
ans = 1
if s == 1:
	ans = float(1)
else:
	ans = 0
	for i in range(1, s + 1):
		ans = ans + 1 / i
print(ans)


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

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

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

def sarr():
	return [int(i) for i in input()]

def starr():
	return [str(x) for x in input().split()]

def inn():
	return int(input())

def svalue():
	return tuple(map(str, input().split()))

def parr():
	return [value() for i in range(n)]
mo = 1000000007
n = inn()
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


while True:
	x = int(input(''))
	if x > 0:
		break
s = 0
for i in range(1, x + 1):
	s = s + 1 / i
print(s)


def summation(n):
	S = [1 / i for i in range(1, n + 1)]
	return sum(S)
n = int(input())
ans = summation(n)
S_ans = str(ans)
find_dot = S_ans.find('.')
get_len = len(S_ans[find_dot + 1:])
if get_len < 12:
	for i in range(12 - get_len):
		S_ans += '0'
print(S_ans)


from pprint import pprint
import math

def dp(s):
	if True:
		print(s)

def dpp(s):
	if True:
		pprint(s)
n = int(input())
if n != 1:
	ab = 0
	for i in range(2, n + 1):
		ab += 1 / i
	print(1 + ab)
else:
	print('1.0000000000')


n = int(input())
Sum = 0
for i in range(1, n + 1):
	Sum += 1 / i
print(Sum)


n = int(input())
premio = 0
for i in range(1, n + 1):
	premio = premio + 1 / i
print(premio)


n = int(input())
i = n
sum = 0.0
for _ in range(n):
	sum = sum + 1 / i
	i = i - 1
print(sum)


n = int(input())
money = 0
for i in range(1, n + 1):
	money = float(money + float(1 / i))
print(money)


from math import sqrt, ceil

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

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

def li():
	return list(mi())

def si():
	return input()

def p(y):
	print('YES')

def p(n):
	print('NO')
n = ii()
s = 0
for i in range(1, n + 1):
	s += 1 / i
print('%0.5f' % s)


from sys import stdin, stdout
n = int(stdin.readline())
stdout.write(str(sum(map(lambda x: 1 / x, range(1, n + 1)))))


def solve():
	n = int(input())
	ans = sum([1.0 / i for i in range(1, n + 1)])
	print(ans)
for _ in range(1):
	solve()


n = int(input())
result = 0
for x in range(n):
	result += 1 / (x + 1)
print(result)


n = int(input().strip())
result = 0
while n:
	result += 1 / n
	n = n - 1
print(result)


def converge(n):
	s = 0
	for i in range(1, n + 1):
		s = s + 1 / i
	return s
n = int(input())
print('%.12f' % converge(n))


t = int(input())
s = 0
for x in range(t):
	s += 1 / (x + 1)
print('%.10f' % s)


from math import log
n = int(input())
s = 0.0
for i in range(1, n + 1):
	s += 1 / i
print(s)


n = int(input())
s = 0
while n != 0:
	s += 1 / n
	n -= 1
print(round(s, 8))


n = int(input())
ans = 0
while n >= 1:
	d = 1 / n
	ans += d
	n = n - 1
print('%.12f' % ans)


x = int(input())
sum = 0
for i in range(x):
	sum += pow(i + 1, -1)
print(sum)


n = int(input())
sum = 0
for i in range(1, n + 1):
	sum = sum + 1.0 / i
sum = str(sum)
d = len(sum) - 2
e = 12 - d
print(sum + '0' * e)


n = int(input())
x = [1 / i for i in range(1, n + 1)]
print(sum(x))


a = int(input())
ans = 0
for i in range(1, a + 1):
	ans += 1 / i
print(f'{ans:f}')


n = int(input())
SD = 0
while n >= 1:
	SD += pow(n, -1)
	n -= 1
print(SD)


n = int(input())
prize = 0
while n > 0:
	prize += 1 / n
	n -= 1
print('{:.10f}'.format(prize))


def main():
	n = int(input())
	p = 0
	k = -1
	for i in range(n, 0, -1):
		k = max(k, p + i / n)
		p += 1 / (n - i + 1)
	print(k)
	return
main()


z = int(input())
s = 0
while z > 0:
	s += 1 / z
	z -= 1
print(s)


c = 1
for i in range(2, int(input()) + 1):
	c += 1 / i
print(c)


import sys, math
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
t = 1
for tt in range(t):
	n = inp()
	c = 0
	for i in range(1, n):
		c = c + i / (i + 1)
	print(n - c)


k = int(input())
c = 0
for i in range(k):
	c += 1 / (i + 1)
print(c)


import logging
l = logging.Logger('')
h = logging.StreamHandler()
f = logging.Formatter(fmt='[{filename}:{lineno}] {msg}', style='{')
h.setFormatter(f)
l.addHandler(h)
bug = l.info

def main():
	total = 0
	n = int(input())
	for i in range(1, n + 1):
		total += 1 / i
	print(f'{total:.12f}')
main()


n = int(input())
t = 0
for j in range(1, n + 1):
	t += 1 / j
print(t)


n = int(input())
res = 1 + sum([float(1.0 / float(i)) for i in range(n, 1, -1)])
print(round(res, 10))


n = int(input())
(t, m) = (n, 0)
while t > 0:
	m += 1 / t
	t -= 1
print(m)


from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n').split(' ')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
n = val()
dp = [1]
elp = [0, 0]
for i in range(2, n + 1):
	dp.append(dp[-1] + 1 / i)
print(dp[-1])


inp = int(input())
k = 0
res = 0
a = inp
while inp > k:
	res += 1 / a
	a -= 1
	k += 1
print(res)


n = int(input())
x = 0
for i in range(1, n + 1):
	x += 1 / i
x = float(x)
print(x)


import sys
read = lambda : list(map(int, sys.stdin.readline().strip().split()))
n = int(input())
dp = [0 for i in range(n + 1)]
dp1 = [0] * (n + 1)
for i in range(1, n + 1):
	dp1[i] = dp1[i - 1] + 1 / i
print(dp1[n])


n = int(input())
ans = sum([1 / i for i in range(1, n + 1)])
print(ans)


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10 ** 5)
from queue import PriorityQueue
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
n = int(input())
ans = 0
for i in range(n, 0, -1):
	ans += 1 / i
print(ans)


import math
out = 0.0
inp = int(input())
for i in range(1, inp + 1):
	out = out + 1 / i
print(out)


n = int(input())
total = 0
while n > 0:
	total += 1 / n
	n = n - 1
print(total)


from sys import stdin

def iinput():
	return int(stdin.readline())

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
n = iinput()
p = 0
while n:
	p += 1 / n
	n -= 1
print('{:.12f}'.format(p))


n = int(input())
summ = 0
for i in range(n):
	summ += 1 / n
	n -= 1
print(summ)


import sys
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__
n = int(input())
ans = 0
for denom in range(1, n + 1):
	ans += 1 / denom
print(ans)


from sys import stdin, stdout
n = int(stdin.readline().strip())
a = 0
if n == 1:
	stdout.write('1\n')
else:
	for i in range(n):
		a += 1 / n
		n -= 1
	stdout.write('%.6f\n' % a)


n = float(input())
t = 1
s = n
total = 0
while s != 0:
	total = total + t / s
	s = s - 1
print(total)


a = int(input())
total = 0
for i in range(1, a + 1):
	z = 1.0 / i
	total = total + z
print(total)


s = int(input())
f = 0
for i in range(1, s + 1):
	f += 1.0 / i
print(f)


i = int(input())
reci = 0
for i in range(1, i + 1):
	reci = reci + 1 / i
print(reci)


from sys import stdin, stdout
from collections import Counter, deque
import math
cin = stdin.readline
cout = stdout.write

def inpn():
	return int(cin())

def inpl():
	return list(map(int, cin().split()))

def inps():
	return cin()

def invr():
	return map(int, cin().split())

def outs(s):
	cout(s)

def outn(n):
	cout(str(n))

def outl(l):
	for i in l:
		cout(str(i) + ' ')

def outb(s):
	cout(str(s))
n = inpn()
x = 1
gain = 0
while n != 0:
	gain += x / n
	n -= 1
print('%.12f' % gain)


n = int(input())
s = 0.0
for j in range(1, n + 1):
	s += 1 / j
print(s)


print(format(sum([1 / i for i in range(int(input()), 0, -1)]), '.6f'))


a = int(input())
b = 0
for i in range(1, a + 1):
	b += 1 / i
print(b)


opp = int(input().strip())
total = 0
for i in range(1, opp + 1):
	total += 1.0 / i
print(total)


from collections import deque
import itertools
import operator
import queue
import time
import math
import sys
import os
n = int(input())
d = n
s = 0
for i in range(n):
	s += 1 / d
	d -= 1
print(s)


def main():
	s = int(input())
	ret = 0
	for i in range(s):
		ret += 1 / (s - i)
	print(ret)
main()


from collections import defaultdict
import math
x = int(input())
ans = 0
for i in range(2, x + 1):
	ans += 1 / i
ans += 1
print(ans)


n = int(input())
sum = 0
while n > 0:
	t = 1
	if not t:
		t = 1
	sum += t / n
	n -= t
print(sum)


n = int(input())
a = sum((1 / x for x in range(1, n + 1)))
print(a)


n = int(input())
l = [1 / i for i in range(1, n + 1)]
print('%.12f' % sum(l))


n = int(input())

def tes(ho):
	s = ho
	t = 1
	res = 0
	while s != 0:
		res += t / s
		s = s - t
	return res
print(tes(n))


c = int(input())
prize = 0
for i in range(c, 0, -1):
	prize += 1 / i
print(prize)


x = int(input())
s = 0
for i in range(1, x + 1):
	s += 1 / i
print(s)


def inn():
	return map(int, input().split())
(n,) = inn()
c = 0.0
for i in range(1, n + 1):
	c += 1 / i
print(c)


num = int(input())
total = 0
while num != 0:
	total += 1 / num
	num -= 1
print(total)


n = int(input())
d = 0
for s in range(n, 0, -1):
	d += 1 / s
print(d)


t = int(input())
s = 0
for i in range(1, t + 1):
	s = s + 1 / i
s = str(s)
w = s.split('.')
p = w[0]
q = w[1]
if len(q) == 12:
	print(s)
elif len(q) > 12:
	print(p + '.' + q[0:12])
else:
	while len(q) != 12:
		q = q + '0'
	print(p + '.' + q)


s = int(input().strip())
ans = 0
for i in range(1, s + 1):
	ans += 1 / i
print(ans)


n = int(input())
_sum = 0
for i in range(1, n + 1):
	_sum += 1 / i
print(_sum)


n = int(input())
ans = 0
for x in range(n):
	ans += 1 / (x + 1)
print(ans)


n = int(input())
num = n
cash = 0.0
for i in range(n):
	if num != 0:
		cash += 1 / num
		num -= 1
print(cash)


s = 0
for i in range(1, int(input()) + 1):
	s += 1 / i
print('{:.12f}'.format(s))


from sys import stdin

def input():
	return stdin.readline()[:-1]

def intput():
	return int(input())

def sinput():
	return input().split()

def intsput():
	return map(int, sinput())
debugging = False

def dprint(*args):
	if debugging:
		print(*args)
	else:
		pass
n = intput()
ans = 0
for i in range(n, 0, -1):
	ans += 1 / i
print(ans)


n = int(input())
res = 0
for i in range(1, n + 1):
	res += 1 / i
print(round(res, 6))


i = 1
a = []
n = int(input())
while i <= n:
	a.append(1 / i)
	i += 1
print(sum(a))


n = int(input())
som = 0
while n != 0:
	som = som + 1 / n
	n = n - 1
print(som)


N = int(input())
if N == 1:
	print(1)
else:
	ans = 1
	for i in range(2, N + 1):
		ans += 1 / i
	print(ans)


n = int(input())
d = [0] * 100001
d[1] = 1.0
for i in range(2, n + 1):
	d[i] = 1 / i + d[i - 1]
print('%.13f' % d[n])


value = int(input())
result = sum([1 / i for i in range(value, 0, -1)])
print(result)


numb = int(input())
out = float(0)
for i in range(numb):
	down = numb - i
	out = out + float(1 / down)
print(out)


n = int(input())
x = 0
y = 2
for i in range(n - 1):
	z = 1 / y
	y = y + 1
	x = x + z
print(x + 1)


n = int(input())
dollar = 0
for i in range(n, 0, -1):
	dollar += 1 / i
print(dollar)


import sys
input = sys.stdin.readline
(loop, num) = (int(input().strip()), 0)
for i in range(1, loop + 1):
	num += 1 / i
print(num)


n = int(input())
priz = 0
for i in range(n, 0, -1):
	priz += 1 / i
print(f'{priz:.{12}f}')


s = int(input())
prize = 0
while s >= 1:
	prize += 1 / s
	s -= 1
print(prize)


n = int(input())
total = 0
s = n
t = 1
while s != 0:
	total += t / s
	s = s - t
print(format(total, '.12f'))


import sys
input = sys.stdin.readline
hell = 1000000007

def meowmeow321():
	n = int(input())
	ans = 0
	for i in range(1, n + 1):
		ans += 1 / i
	print(ans)
t = 1
for i in range(t):
	meowmeow321()


from sys import stdin, stdout
import gc
gc.disable()
input = stdin.readline
n = int(input().strip())
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


t = int(input())
total = 0
for i in range(1, t + 1):
	total += 1 / i
print(total)


import math
a = int(input())
print(sum((1 / i for i in range(1, a + 1))))


n = int(input())
f = 0
while n > 0:
	f += 1 / n
	n -= 1
print('%.12f' % f)


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys
n = int(input())
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


def func(n):
	sum_n = 0
	for i in range(1, n + 1):
		sum_n += 1 / i
	return sum_n
n = int(input())
print(func(n))


n = int(input())
if n == 1:
	print(float(1))
else:
	sum1 = 0
	while n != 0:
		sum1 += 1 / n
		n -= 1
	print(sum1)


n = int(input())
ans = 0

def toFixed(numObj, digits=0):
	return f'{numObj:.{digits}f}'
for i in range(n):
	ans += 1 / (n - i)
print(toFixed(ans, 6))


n = int(input())
ans = 0
while n > 1:
	ans += 1 / n
	n -= 1
ans += 1
print('{0:.6f}'.format(ans))


res = 0
for jbtk in range(int(input())):
	jbtk += 1
	res += 1 / jbtk
print(res)


x = int(input())
y = 0
while x > 0:
	y += 1 / x
	x -= 1
print(y)


print(sum((1 / ni for ni in range(1, int(input()) + 1))))


def recursion(n):
	sums = 0
	for i in range(n, 0, -1):
		sums = sums + 1 / i
	return sums
try:
	n = int(input())
	ans = recursion(n)
	print(format(ans, '.12f'))
except Exception as e:
	print(e)


import sys
n = int(input())
result = 0
while n > 0:
	result += 1 / n
	n -= 1
print(result)


n = int(input())
val = 0
for i in range(1, n + 1):
	val += 1 / i
print(val)


n = int(input())
answer = sum((1 / x for x in range(1, n + 1)))
print(answer)


n = int(input())
r = 0
while n:
	r += 1 / n
	n -= 1
print(r)


n = int(input())
avg = 0.0
for i in range(1, n + 1):
	avg = avg + 1 / i
print(avg)


def solve(n):
	s = 0
	while n >= 1:
		s += 1 / n
		n -= 1
	return s
n = int(input())
print(solve(n))


t = 1
for i in range(t):
	n = int(input())
	ans = sum([1.0 / i for i in range(1, n + 1)])
	print(ans)


n = int(input())
s = 0
t = 1
val = t / n
flag = 1
while n > 0:
	s += t / n
	n -= 1
print('%.12f' % s)


n = int(input())
p = 0
while n > 0:
	p = p + 1 / n
	n = n - 1
print(p)


n = int(input())
sum = 0
temp = n
for i in range(0, n):
	sum = sum + 1 / n
	n = n - 1
print(sum)


import sys
import os

def d(*args):
	if 'DEBUG' in os.environ:
		print(*args, file=sys.stderr)

def tokenGen():
	(tokens, count, cur) = ([], 0, 0)
	while True:
		while cur == count:
			tokens = sys.stdin.readline().split()
			count = len(tokens)
			cur = 0
		cur += 1
		yield tokens[cur - 1]
token = tokenGen()

def nextStr():
	return next(token)

def nextInt():
	return int(nextStr())
n = nextInt()
s = 0
for i in range(n, 0, -1):
	s += 1 / i
print(s)


s = int(input())
t = 1
d = 0
while s > 0:
	d = d + t / s
	s = s - t
f1 = '{:.12f}'.format(d)
print(f1)


from sys import stdin
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def lsi():
	x = list(stdin.readline())
	x.pop()
	return x

def si():
	return stdin.readline()

def sieve(x):
	a = [True] * (x + 1)
	sq = floor(sqrt(x))
	for i in range(3, sq + 1, 2):
		if a[i]:
			for j in range(i * i, x + 1, i):
				a[j] = False
	if x > 1:
		p = [2]
	else:
		p = []
	for i in range(3, x + 1, 2):
		if a[i]:
			p.append(i)
	return p
n = ii()
s = 0
for i in range(1, n + 1):
	s += 1 / i
print(s)


import sys
from math import log2, floor, ceil, sqrt
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

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

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
n = int(ri())
ans = 0
for i in range(n, 0, -1):
	ans += 1 / i
print(ans)


s = int(input())
t = float()
r = 0
for t in range(1, s + 1):
	r = r + 1 / t
print(r)


def getPrize(n):
	prize = {1: 1, 2: 1.5}
	if n in prize:
		return prize[n]
	else:
		for i in range(3, n + 1):
			prize[i] = prize[i - 1] + 1 / i
		return prize[n]

def main():
	n = int(input())
	print(getPrize(n))
main()


def solve(n):
	hold = 0
	for s in range(1, n + 1):
		pay = 1 / s + hold
		hold = pay
	return hold
n = int(input())
print(solve(n))


n = int(input())
toplam = 0
for i in range(1, n + 1):
	toplam += 1 / i
print(toplam)


import collections
import random
local = False
if local:
	file = open('B.txt', 'r')

def readInput():
	if local:
		return file.readline()
	else:
		return input()

def joe(n):
	res = 0
	for i in range(1, n + 1):
		res += 1 / i
	return res
n = int(readInput())
print(joe(n))


import time, math
from sys import stdin, stdout

def I():
	return int(stdin.readline())

def In():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def Si():
	return sorted(list(map(int, stdin.readline().split())))

def Si():
	return sorted(list(map(int, stdin.readline().split())), reverse=True)

def P(x):
	return stdout.write(str(x) + '\n')

def Pi(x, y):
	return stdout.write(str(x) + ' ' + str(y) + ' ')

def solve():
	n = I()
	ans = sum((1.0 / i for i in range(1, n + 1)))
	print(ans)
solve()


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

def ai():
	a = list(map(int, input().split()))
	return a

def mi():
	a = map(int, input().split())
	return a
ans = [0 for i in range(100001)]
for i in range(1, 100001):
	ans[i] = ans[i - 1] + 1 / i
n = ii()
print(ans[n])


n = int(input())
tot = 0
for i in range(1, n + 1):
	tot += 1 / i
print(tot)


N = int(input())
print('%.9f' % sum((1 / x for x in range(1, 1 + N))))


a = int(input())
c = 0
while a != 0:
	c = c + 1 / a
	a -= 1
print(c)


def main():
	n = int(input())
	print(sum([1 / k for k in range(1, n + 1)]))
main()


n = int(input())
reward = 0
for s in range(n, 0, -1):
	reward += 1 / s
print(reward)


n = int(input())
winning_amount = 0
for i in range(1, n + 1):
	winning_amount = winning_amount + 1.0 / i
print(winning_amount)


import math
s = input()
s = int(s)
t = float()
a = 0
while s > 0:
	b = math.pow(s, 1 / 20)
	b = int(b)
	t = b / s
	a = t + a
	s = s - b
print(a)


a = int(input())
total = 0
i = 0
for i in range(1, a + 1):
	total = 1 / i + total
	i += 1
print('%0.12f' % abs(total))


n = int(input())
dp = [0 for i in range(n + 1)]
for i in range(1, n + 1):
	dp[i] = dp[i - 1] + 1 / i
print(dp[n])


n = int(input())
total = 0
for i in range(1, n + 1):
	total += 1 / i
print(total)


import sys
r_input = sys.stdin.readline
n = int(r_input())
total = 0
for i in range(1, n + 1):
	total += 1 / i
print(total)


n = int(input())
sum = 0
for i in range(1, n + 1):
	c = 1 / i
	sum = sum + c
print('%.10f' % sum)


n = int(input())
s = 0
while n > 0:
	s += 1 / n
	n -= 1
print('%.10f' % s)


from decimal import Decimal

def main():
	n = int(input())
	ans = Decimal()
	for i in range(0, n):
		ans += Decimal(1) / Decimal(n - i)
	print(float(ans))
main()


n = int(input())
profit = 0
for i in range(n):
	profit += 1 / n
	n = n - 1
print(profit)


import io, sys, atexit, os
import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations
from itertools import combinations

def li():
	return list(map(int, sys.stdin.readline().split()))

def num():
	return map(int, sys.stdin.readline().split())

def nu():
	return int(input())

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	gg = find_gcd(x, y)
	return x * y // gg
mm = 1000000007

def solve():
	t = 1
	for tt in range(t):
		x = nu()
		ss = 0
		while x != 0:
			ss += 1 / x
			x -= 1
		print(ss)
solve()


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

def solve():
	n = int(input())
	res = 0
	for i in range(n):
		res += 1 / (n - i)
	return res

def main():
	t = 1
	while t:
		print(solve())
		t -= 1
main()


n = int(input())
soma = 0
for i in range(1, n + 1):
	soma += 1 / i
print(soma)


inp = int(input())
summ = 0
for i in range(inp):
	summ += 1 / (i + 1)
print(summ)


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


nn = int(input())
aa = [1] * nn
for x in range(nn):
	aa[x] = 1 / (x + 1)
print(sum(aa))


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = 1
for tt in range(t):
	n = int(input())
	if n == 1:
		print(1)
		continue
	elif n == 2:
		print(1.5)
		continue
	else:
		ans = 1.5
		while n > 2:
			ans += 1 / n
			n -= 1
	print(ans)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


n = int(input())
from functools import reduce
from operator import add
print(reduce(add, [1.0 / (i + 1) for i in range(n)]))


import math
x = list(map(int, input().split()))
q = 0
for i in range(x[0]):
	q += 1 / (i + 1)
print(q)


import math
from collections import defaultdict
ml = lambda : map(int, input().split())
ll = lambda : list(map(int, input().split()))
ii = lambda : int(input())
ip = lambda : list(input())
ips = lambda : input().split()
t = ii()
ans = 0
for i in range(1, t + 1):
	ans += 1 / i
print(ans)


import sys
import math
import bisect
import itertools
import random

def main():
	n = int(input())
	ans = 0
	for i in range(1, n + 1):
		ans += 1 / i
	print('%.10f' % ans)
main()


def inp(dtype=str, strip=True):
	s = input()
	res = [dtype(p) for p in s.split()]
	res = res[0] if len(res) == 1 and strip else res
	return res

def problem1():

	def test(cur, steps):
		if 0 < cur <= n and cur not in a:
			return steps
		else:
			return -1
	t = inp(int)
	for _ in range(t):
		(n, s, k) = inp(int)
		a = inp(int, strip=False)
		a = set(a)
		res = -1
		steps = 0
		while res < 0:
			res = test(s + steps, steps)
			if res < 0:
				res = test(s - steps, steps)
			steps += 1
		print(res)

def problem2():
	n = inp(int)
	res = 0
	for i in range(1, n + 1):
		res += 1 / i
	print(res)

def problem3():
	pass

def problem4():
	pass

def problem5():
	pass
problem2()


import math
i = int(input())
int(i)
if i == 1:
	print(1)
elif i == 2:
	print(1.5)
else:
	print(math.log(i) + 0.5772156649 + 1 / (2 * i) - 1 / (12 * i ** 2))


n = int(input())
temp = 1
while n > 1:
	temp += 1 / n
	n -= 1
print(temp)


n = int(input())
SUM = 0
for i in range(n, 0, -1):
	SUM += 1 / i
print(SUM)


n = int(input())
suma = 0
while n != 0:
	suma = 1 / n + suma
	n = n - 1
print(suma)


n = int(input())
sm = 1 / n
for i in range(2, n + 1):
	sm += 1 / (n - i + 1)
print(sm)


import math
n = int(input())
i = n
ans = 0
while i > 0:
	ans += 1 / i
	i -= 1
print('{:.12f}'.format(ans))


N = int(input().strip())
T = N
total = 0.0
while T > 0:
	total += 1 / T
	T -= 1
print(total)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from bisect import insort
from collections import Counter
from collections import deque
from heapq import heappush, heappop, heapify
from itertools import permutations, combinations
mod = int(1000000000.0) + 7
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())
ips = lambda : stdin.readline().rstrip()
out = lambda x: stdout.write(str(x) + '\n')
t = 1
for _ in range(t):
	n = ip()
	ans = 0
	for i in range(n, 0, -1):
		ans += 1 / i
	out(ans)


val = int(input())
sum1 = 0
for i in range(val):
	sum1 += 1 / (i + 1)
print(sum1)


n = int(input())
sum = 0
for i in range(n, 0, -1):
	sum += 1 / i
print(float(sum))


def max_money():
	oponents = input()
	output = 0
	for i in range(int(oponents)):
		output += 1 / (int(oponents) - i)
	print(output)
	return
max_money()


n = int(input())
reward = 0.0
for i in range(n, 0, -1):
	reward += float(1) / i
print('%.12f' % reward)


import sys
l = sys.stdin.read()
n = int(l)
s = sum((1 / k for k in range(1, n + 1)))
print(s)


import sys
from sys import stdin, stdout

def get_ints():
	return list(map(float, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()
n = int(input())
s = 0
for i in range(1, n + 1):
	s = s + 1 / i
print(s)


s = int(input())
res = 0
for i in range(1, s + 1):
	res += 1 / i
print(res)


n = int(input())
answer = 0
while n != 0:
	answer += 1 / n
	n -= 1
print(answer)


n = int(input())
A = 0
for i in range(1, n + 1):
	A = A + 1 / i
print(A)


from sys import stdin
n = int(stdin.readline())
arr = [False] * (n + 1)
arr[0] = 0
for index in range(1, n + 1):
	arr[index] = arr[index - 1] + 1 / index
print(arr[-1])


s = input()
s = int(s)
t = 1
amt = 0
while s > 0:
	amt = amt + t / s
	s = s - t
print(amt)


a = int(input())
k = 0
for i in range(1, a + 1):
	k = k + 1 / i
print(k)


sp = lambda : list(map(int, input().split()))
si = lambda : int(input())
n = si()
out = 0
for x in range(1, n + 1):
	out += 1 / x
print(str.format('{0:.15f}', out))


n = int(input())
v = 0.0
if n == 1:
	print(1)
else:
	while n > 0:
		v = v + 1 / n
		n = n - 1
	print(v)


num_inp = lambda : int(input())
arr_inp = lambda : list(map(int, input().split()))
sp_inp = lambda : map(int, input().split())
str_inp = lambda : input()
print(sum((1 / k for k in range(1, int(input()) + 1))))


from fractions import Fraction as frac
n = int(input())
sum = 0.0
for i in range(1, n + 1):
	sum += frac(1, i)
print(sum)


from sys import stdin

def solve():
	n = int(stdin.readline().strip())
	cost = 0
	while n > 1:
		errors = 1
		oks = n - errors
		cost += errors / n
		n = oks
	if n:
		cost += 1
	print(cost)
solve()


import itertools
import math
import sys
import heapq
from collections import Counter
from collections import deque
from fractions import gcd
from functools import reduce
INF = 1 << 60
sys.setrecursionlimit(10 ** 6)
n = int(input())
ans = 1.0
i = n
while i >= 2:
	ans += 1 / i
	i -= 1
print(ans)


print(sum((1 / s for s in range(1, int(input()) + 1))))


import sys
n = int(sys.stdin.readline())
sigma = 0
total = n
while total:
	sigma += 1 / total
	total -= 1
print(sigma)


(n, tmp) = (int(input()), 0)
for i in range(1, n + 1):
	tmp += 1 / i
print(tmp)


import os
import sys
from io import BytesIO, IOBase
from collections import defaultdict

def solution(n):
	res = 0
	for i in range(1, n + 1):
		res += 1 / (n - i + 1)
	write(res)

def main():
	solution(r_int())
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))

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

def write(*args, end='\n'):
	for x in args:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())

def w_array(arr):
	for x in arr:
		write(x, end=' ')
	write()
main()


res = 0
for i in range(1, int(input()) + 1):
	res += 1 / i
print('%.12f' % round(res, 12))


n = int(input())
v = 0
while n > 0:
	v += 1 / n
	n -= 1
print(v)


n = int(input())
total_sum = 0
while n != 0:
	total_sum += 1 / n
	n -= 1
print(total_sum)


n = int(input())
max_price = 0
for i in range(1, n + 1):
	max_price = max_price + 1 / i
print(max_price)


x = int(input())
answer = 0
for i in range(1, x + 1):
	answer = answer + 1 / i
print(answer)


n1 = int(input())
sum1 = 0
a = n1
while a > 0:
	sum1 = sum1 + 1 / a
	a = a - 1
print(sum1)


def maxWin(n):
	res = 0
	for i in range(1, n + 1):
		res += 1 / i
	return res
N = int(input())
print(maxWin(N))


x = 0
n = int(input())
while n:
	x += 1 / n
	n -= 1
print(x)


t = int(input())
li = sum([1.0 / x for x in reversed(range(1, t + 1))])
print(li)


import sys
from bisect import bisect_left as bl, bisect_right as br, bisect
import math
from timeit import default_timer as dt
from itertools import zip_longest as zl
from itertools import groupby as gb
from itertools import combinations as comb
from itertools import combinations_with_replacement as cwr
from collections import defaultdict as dd
from collections import deque as dq
from collections import Counter as c
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return input()

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [[val for i in range(n)] for j in range(m)]
n = int(input())
ans = 0.0
for i in range(1, n + 1):
	ans += 1 / i
print('%.4f' % ans)


from sys import stdin

def harmonic(n):
	ans = 0
	for i in range(1, n + 1):
		ans += 1 / i
	return ans

def main():
	ans = harmonic(int(stdin.readline()))
	print('%.12f' % ans)
main()


n = int(input())
ans = 1
for i in range(2, n + 1):
	ans += 1 / i
print('{0:.12f}'.format(ans))


a = int(input())
su = 0
for i in range(1, a + 1):
	su += 1 / i
print(su)


n = int(input())
s = 0
for i in range(1, n + 1):
	s += 1 / i
print(round(s, 4))


nii = int(input())
sl = 1
while nii > 0:
	sl += 1 / nii
	nii -= 1
print(sl - 1)


import bisect
T = 1
for test_no in range(T):
	n = int(input())
	ans = sum([1.0 / i for i in range(1, n + 1)])
	print('%.8f' % ans)


n = int(input())
dollars = 0
s = n
t = 1
while s != 0:
	x = t / s
	dollars += x
	s -= 1
print(dollars)


n = int(input())
i = n
r = 0.0
while i > 0:
	r += 1 / i
	i -= 1
print('{:.12f}'.format(r))


from decimal import *
s = float(input())
result = 0.0
getcontext().prec = 10
while s > 0:
	result += 1.0 / s
	s -= 1
print(result)


a = int(input())
t = 0
while a > 0:
	t = t + 1 / a
	a = a - 1
print(t)


N = int(input())
X = 0
for I in range(1, N + 1):
	X += 1 / I
print(X)


n = int(input())
ans = float(0)
while n > 0:
	ans += 1 / n
	n -= 1
print('%.12f' % ans)


from math import *
mod = 1000000007

def binpow(a, b):
	global mod
	if b == 1:
		return a % mod
	u = binpow(a, b // 2)
	if b % 2 == 0:
		return u * u % mod
	else:
		return u * u * a % mod

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
for _ in range(1):
	n = int(input())
	total = 0
	for i in range(1, n + 1):
		total += 1 / i
	print(total)


import sys
import math
from collections import defaultdict, Counter
n = int(input())
ans = 0
for j in range(1, n + 1):
	ans += 1 / j
print(ans)


import math
n = int(input())
ans = 0
for i in range(1, n + 1):
	ans += float(1) / float(i)
print(ans)


n = int(input())
c = 1
i = 1
while i < n:
	c += 1 / (i + 1)
	i += 1
print(c)


import os, sys
from io import BytesIO, IOBase

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

def si():
	return input()

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

def li():
	return list(mi())
import math
for i in range(1):
	n = ii()
	ans = 0
	for i in range(n):
		ans += 1 / n
		n -= 1
	print(ans)


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

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

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

def inputstring():
	return [x for x in input()]

def inputstringnum():
	return [ord(x) - ord('a') for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
n = inputnum()
ans = 0
while n > 0:
	ans += 1 / n
	n -= 1
print(ans)


import math
import os
a = int(input())
max_s = 0
while a > 0:
	max_s += 1 / a
	a -= 1
print(max_s)


def cash(n):
	ans = 0
	while n:
		val = 1 / n
		ans += val
		n -= 1
	return ans
n = int(input())
print(cash(n))


q = int(input())
t = 0
for i in range(q):
	t += 1 / q
	q -= 1
print(t)


n = int(input())
sum1 = 1
while n != 1:
	sum1 = sum1 + 1 / n
	n = n - 1
print(sum1)


s = int(input())
rs = 0
for i in range(1, s + 1):
	rs += 1 / i
print(rs)


n = int(input())
value = float(n)
chance = 0
for i in range(n):
	chance += 1.0 / value
	value -= 1
print(chance)


n = int(input())
a = n
x = 1
s = 0
while a >= 1:
	s += 1 / a
	a -= 1
s = str(s)
x = s.index('.')
x = len(s) - (x + 1)
x = 12 - x
print(s + '0' * x)


import sys

def main():
	n = int(input())
	x = n
	ans = 0
	while n != 0:
		ans += 1 / n
		n -= 1
	print(ans)
get_array = lambda : list(map(int, sys.stdin.readline().split()))
get_ints = lambda : map(int, sys.stdin.readline().split())
input = lambda : sys.stdin.readline().strip()
main()


a = []
a.append(round(1, 12))
a.append(round(1.5, 12))
for i in range(3, 100001):
	a.append(round(1 / i + a[i - 2], 12))
n = int(input())
print('%.12f' % a[n - 1])


n = int(input())
ANS = 0
for i in range(1, n + 1):
	ANS += 1 / i
print(ANS)


from math import log, atan
n = int(input())
gamma = 0.5772156649015329
ans = 0.0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


s = int(input())
dolares = 0
for i in range(s):
	dolares = dolares + 1 / s
	s = s - 1
print(float(dolares))


n = int(input())
s = 1
while n > 1:
	s += 1 / n
	n -= 1
print(s)


n = int(input())
sum = 0
for num in range(1, n + 1):
	sum = sum + 1.0 / num
print(sum)


def func(n):
	s = 0
	for i in range(1, n + 1):
		s += 1 / i
	print(s)
n = int(input())
func(n)


N = int(input())
val = 0
for i in range(1, N + 1):
	val += 1 / i
print(val)


from math import *
from bisect import *
n = int(input())
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


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


x = 0
for i in range(1, int(input()) + 1):
	x += 1.0 / i
print('%.12f' % x)


n = int(input())
temp = 0
m = n
while n >= 1:
	temp += 1 / m
	m = m - 1
	n -= 1
print(temp)


n = int(input())
k = 0
while n != 0:
	k += 1 / n
	n -= 1
print(k)


got = 0
all = int(input())
for i in range(all):
	got += 1 / (all - i)
print(got)


n = int(input())
total = 0
for x in range(n, 0, -1):
	total = total + 1 / x
print(total)


import sys
import math
import collections
inp = lambda : sys.stdin.readline()
x = int(inp())
ans = 0
while x > 1:
	ans += 1 / x
	x -= 1
ans += x
print(ans)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def main():
	t = 1
	rr = []
	for _ in range(t):
		n = I()
		r = 0
		for i in range(1, n + 1):
			r += 1 / i
		rr.append(f'{r:0.9f}')
	return JA(rr, '\n')
print(main())


n = int(input())
(anz, s, t) = (0.0, n, 1)
while s:
	anz += t / s
	s -= 1
print('%.12f' % anz)


n = int(input())
count = 0
while n != 1:
	count += 1 / n
	n -= 1
count += 1
print('{0:.4f}'.format(count))


from collections import defaultdict as dc
from heapq import *
import math
import bisect
from collections import deque as dq

def inp():
	p = int(input())
	return p

def line():
	p = list(map(int, input().split()))
	return p

def check(n, d, x):
	if x < 0:
		return 0
	return n >= x + math.ceil(d / (x + 1))

def ans(x, y, n, d):
	for i in range(4):
		if check(n, d, x[i]):
			return 1
	for i in range(4):
		if check(n, d, y[i]):
			return 1
	return 0
n = inp()
z = 0
for i in range(1, n + 1):
	z = z + 1 / i
print(format(z, '.5f'))


import sys
input = sys.stdin.readline
N = int(input())
ans = 0
for n in range(1, N + 1):
	ans += 1 / n
print(ans)


n = int(input())
ans = 0
for i in range(n):
	x = i
	y = i + 1
	ans += 1 / (i + 1)
print(ans)


n = int(input())
ans = 0
while n != 0:
	d = float(format(1 / n, '.15f'))
	ans = ans + d
	n -= 1
print(ans)


n = float(input())
sum = 0
while n > 0:
	sum += 1 / n
	n -= 1
print(sum)


n = int(input())
summ = 0
for i in range(1, n + 1):
	summ += 1.0 / i
print(format(summ, '.6f'))


n = int(input())
s = sum([1 / a for a in range(1, n + 1)])
print(s)


import sys
t = 1
while t:
	n = int(input())
	suma = 0
	for i in range(1, n + 1):
		suma += 1 / i
	print(suma)
	t -= 1


s = int(input())
t = 1
ans = 0
while s != 0:
	ans = ans + t / s
	s = s - 1
print(round(ans, 12))


n = int(input())
s = float(1)
i = 2
while i <= n:
	s = s + 1 / i
	i += 1
print(s)


print(sum((1 / (x + 1) for x in range(int(input())))))


n = float(input())
ln = int(n)
result = 0
for i in range(ln):
	result += 1 / n
	n = n - 1
print(result)


n = int(input())

def f1(n):
	ans = 0
	while n > 1:
		t = n // 2
		ans += t / n
		n = n - t
	return ans + 1

def f2(n):
	ans = 0
	while n:
		ans += 1 / n
		n -= 1
	return ans
print(max(f2(n), f2(n)))


n = int(input())
i = 1
count = 0
while n > 0:
	count += i / n
	n -= 1
print('{0:.12f}'.format(count))


answer = 0
for j in range(1, int(input()) + 1):
	answer += 1 / j
print(answer)


n = int(input())
s = 0
for k in range(1, n + 1):
	s += 1 / k
print('{:.12f}'.format(s))


import math as ma
n = int(input())
s = 0
for k in range(1, n + 1):
	s += 1 / k
print(s)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = int(inp())
ans = 0.0
a = 1.0
for i in range(1, n + 1):
	ans = ans + 1 / a
	a = a + 1.0
print(ans)


n = int(input())
sum1 = 0
i = 1
while i != n + 1:
	sum1 += 1 / i
	i += 1
print(sum1)


n = int(input())
c = 0
for i in range(1, n + 1):
	c += 1 / i
ans = str(c).split('.')
if len(ans[1]) <= 12:
	ans[1] += '0' * (12 - len(ans[1]))
else:
	ans[1] = ans[1][:12]
print('.'.join(ans))


n = int(input())
pas = 0
for i in range(n, 0, -1):
	pas += 1 / i
print(pas)


n = int(input())
res = 1
for i in range(2, n + 1):
	res += 1 / i
print(res)


n = int(input())
count = 0
for _ in range(1, n + 1):
	count += 1.0 / _
print(count)


alph = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
E = 0
for i in range(n, 0, -1):
	E += 1 / i
print('%.5f' % E)


n = int(input())
h = 0.0
for i in range(1, n + 1):
	h += 1 / i
print(h)


n = int(input())
s = 0
while n > 0:
	s += float(1 / n)
	n = n - 1
print(s)


n = int(input())
ans = 0
for I in range(n):
	ans += 1 / (I + 1)
print(ans)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
s = 0
for i in range(1, get_int() + 1):
	s += 1 / i
print(s)


a = int(input())
sum1 = 0
for i in range(a, 0, -1):
	sum1 += 1 / i
print(sum1)


def stairs(t):
	total = 0
	for i in range(1, t + 1):
		total += 1 / i
	return total
t = int(input())
print(stairs(t))


n = int(input())
sum = 0
i = 0
while n - i > 0:
	sum += 1 / (n - i)
	i += 1
print('%.12f' % sum)


n = int(input())
sume = 0
for i in range(n):
	sume += 1 / (n - i)
print('%.12f' % sume)


import math
from re import A
t = int(input())
a = 1
ans = 0
while a <= t:
	ans += 1 / a
	a += 1
print(ans)


def Input():
	tem = input().split()
	ans = []
	for it in tem:
		ans.append(int(it))
	return ans
from collections import Counter
n = Input()[0]
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


from operator import itemgetter
import sys
input = sys.stdin.readline

def solve(n):
	ans = 0.0
	for i in range(1, n + 1):
		ans += 1 / i
	print(ans)

def main():
	n = int(input())
	solve(n)
main()


n = int(input())
gain = 0
for i in range(1, n + 1):
	gain += 1 / i
print(gain)


t = int(input())
res = 0
for i in range(1, t + 1):
	res += 1 / i
print(res)


import math
n = int(input())
total = 0
while n > 0:
	total += 1 / n
	n -= 1
print(total)


numm = int(input())
allValue = []
allValue.append(0)
allValue.append(1)
for i in range(numm - 1):
	num = i + 2
	maxx = 0
	temp = allValue[num - 1] + 1 / num
	allValue.append(temp)
print(allValue[numm])


i = int(input())
g = 0
for x in range(1, i + 1):
	g += 1 / x
print(g)


import sys
input = sys.stdin.readline
n = int(input())
res = 0
while n > 0:
	res += 1 / n
	n -= 1
print(res)


from math import *
from bisect import bisect_left as bl
from bisect import bisect_right as br
from collections import Counter as ctr
from collections import deque as dq
from array import array
from re import search
li = lambda : list(map(int, input().split()))
arr = lambda a: array('i', a)
bi = lambda n: bin(n).replace('0b', '')
yn = lambda f: print('NYOE S'[f::2])
sbstr = lambda a, s: search('.*'.join(a), s)

def solve():
	n = int(input())
	a = 0
	for i in range(1, n + 1):
		a += 1 / i
	print(a)
solve()


n = float(input(''))
total = 0.0
while n > 0.0:
	total += 1.0 / n
	n -= 1.0
print(total)


import sys
inp = sys.stdin.readline
s = 0
for i in range(1, int(inp()) + 1):
	s += 1 / i
print(s)


n = int(input())
curr = 0
while n != 0:
	curr += 1 / n
	n -= 1
print('%.12f' % curr)


import math
n = int(input())
res = 0
while n > 0:
	res += 1 / n
	n -= 1
print(res)


n = int(input())
summ = 0
s = n
while s != 1:
	summ += 1 / s
	s -= 1
summ += 1
print(summ)


(n, maxx) = (int(input()), 1)
while n != 1:
	maxx += 1 / n
	n -= 1
print(maxx)


def inv(n):
	return 1 / n
n = int(input())
sum = 1
for i in range(2, n + 1):
	sum += inv(i)
print('%.12f' % sum)


import sys
N = int(input())
ans = 0
for i in range(1, N + 1):
	ans += 1.0 / i
print(ans)


a = int(input())
b = a
r = 0
s = 0
while r < b:
	s = s + 1 / a
	a = a - 1
	r = r + 1
print(s)


from math import factorial as f
n = int(input())
ans = 0
while n > 0:
	ans += 1 / n
	n -= 1
print(ans)


n = int(input())
soma = 0.0
while n >= 1:
	soma += 1 / n
	n -= 1
print('{:.12f}'.format(soma))


import sys

def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep=' ', end='\n'):
	print(*var, file=sys.stderr, end=end, sep=sep)
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br
(n,) = I()
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(ans)


import sys
import os
import time
import collections
from collections import Counter, deque
import itertools
import math
import timeit
import random

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

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

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def flin(d, x, default=-1):
	left = right = -1
	for i in range(len(d)):
		if d[i] == x:
			if left == -1:
				left = i
			right = i
	if left == -1:
		return (default, default)
	else:
		return (left, right)

def ceil(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)

def ddl():
	return collections.defaultdict(list)
n = ii()
r = 0
for i in range(1, n + 1):
	r += 1 / i
print(r)


INF = 10 ** 10

def main():
	n = get_int()
	res = 0
	while n > 0:
		res += 1 / n
		n -= 1
	print(res)
import sys
from collections import defaultdict, Counter
from bisect import bisect_left, bisect_right
import math
out = []
get_int = lambda : int(input())
get_list = lambda : list(map(int, input().split()))
main()
print(*out, sep='\n')


n = int(input())
sm = 0
while n != 0:
	sm = sm + 1 / n
	n -= 1
print(sm)


import sys

def readnum():
	input = sys.stdin.readline
	a = list(map(int, input().split()))
	return a

def printf(val):
	sys.stdout.write(str(val) + '\n')
n = readnum()[0]
res = 0
for i in range(n):
	res += 1 / (i + 1)
print(res)


t = int(input())
total = float(1)
for i in range(2, t + 1):
	total += 1 / i
print(total)


from math import factorial
from collections import Counter

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

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0
mod = 1000000007
n = int(input())
res = 0
for i in range(1, n + 1):
	res += 1 / i
print(res)


n = int(input().strip())
seen = set()
sum = 1
for i in range(2, n + 1):
	sum += 1 / i
print(sum)


import sys
import math
input = sys.stdin.readline

def sum(n):
	i = 1
	s = 0.0
	for i in range(1, n + 1):
		s = s + 1 / i
	return s
n = int(input())
print(round(sum(n), 6))


T = int(input())

def calc(s):
	win = 0
	while s >= 1:
		win += 1 / s
		s -= 1
	return win
print(calc(T))


s = int(input())
t = 1
sum = 0
while s > 0:
	a = t / s
	sum += a
	s -= t
sum = format(sum, '.12f')
print(sum)


t = int(input())
sum = float()
for i in range(1, t + 1, 1):
	sum += 1 / i
print('%.12f' % sum)


n = int(input())
a = []
a.append(float(0))
a.append(float(1))
for i in range(2, n + 1):
	a.append(float(1 / i) + a[i - 1])
print(round(a[n], 6))


from sys import stdin, stdout
x = [line.rstrip() for line in stdin]
x = int(x[0])
print(sum((1 / y for y in range(1, x + 1))))


s = int(input())
k = 0
for i in range(s, 0, -1):
	k = k + 1 / i
print(k)


import sys
n = int(input())
(ans, num) = (0, n)
for i in range(1, n + 1):
	ans += 1 / num
	num -= 1
print(ans)


n = int(input())
otv = 0
for i in range(n, 0, -1):
	otv += 1 / i
print(otv)


from sys import stdin, stdout
from decimal import getcontext, Decimal
n = float(stdin.readline())
getcontext().prec = 12

def Max_Dollar(s):
	sum = 0.0
	for i in range(1, int(s) + 1):
		sum += 1 / i
	stdout.write(str(sum))
Max_Dollar(n)


oponnents = int(input())
sum = 0
while oponnents > 0:
	sum += 1 / oponnents
	oponnents -= 1
print('%.12f' % sum)


n = int(input())
x = 0
for num in range(n, 0, -1):
	x += 1 / num
print(x)


from collections import Counter
import string
import math
import sys
from math import gcd as bltin_gcd

def coprime2(a, b):
	return bltin_gcd(a, b) == 1
from fractions import Fraction

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))

def printDivisors(n):
	divisors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				divisors.append(i)
			else:
				divisors.extend((i, n // i))
		i = i + 1
	return divisors

def countTotalBits(num):
	binary = bin(num)[2:]
	return len(binary)

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def dfs(node):
	global graph
	mex = 0
	size = 1
	for i in graph[node]:
		t = dfs(i)
		mex = max(mex, t[0])
		size += t[1]
	return [mex + size, size]

def gcd(p, q):
	while q != 0:
		(p, q) = (q, p % q)
	return p

def is_coprime(x, y):
	return gcd(x, y) == 1
n = vary(1)
s = 0
for i in range(1, n + 1):
	s += 1 / (n + 1 - i)
print(s)


n = int(input())
pts = 0
for i in range(n, 0, -1):
	pts += 1 / i
print(pts)


def problemB(n):
	res = 0
	while n > 0:
		res += 1 / n
		n -= 1
	print(f'{res:.12f}')
n = int(input())
problemB(n)


import math
i = int(input())
L = [0, 1]
for j in range(2, i + 1):
	L.append(1 / j + L[j - 1])
print(L[i])


from sys import stdin, stdout
n = int(stdin.readline())
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
stdout.write(str(ans) + '\n')


from sys import stdin
reader = (s.rstrip() for s in stdin)
inp = reader.__next__

def mpint():
	return map(int, inp().split())
ans = 0
for i in range(int(inp())):
	ans += 1 / (i + 1)
print(ans)


from math import fsum

def main():
	(n, l) = (float(input()), [])
	while n:
		l.append(1.0 / n)
		n -= 1.0
	print(fsum(l))
main()


import sys, math
import io, os

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
from decimal import Decimal
INF = float('inf')
mod = int(1000000000.0) + 7
n = int(data())
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
out(ans)


from collections import Counter
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

def solve(adj, colors, n):
	pass
n = iinput()
ans = 0
for i in range(1, n + 1):
	ans += 1 / i
print(round(ans, 7))


a = [1]
for i in range(2, pow(10, 5) + 1):
	x = a[-1] + 1 / i
	a.append(x)
n = int(input())
print(a[n - 1])


total_players = int(input())
sum = 0
for i in range(1, total_players + 1):
	sum += 1 / i
print(format(sum, '.12f'))


from functools import lru_cache, reduce
from sys import setrecursionlimit
import math

def sol(n):
	acc = 0
	for val in range(1, n + 1):
		acc += 1 / val
	return acc
print(sol(int(input().strip())))


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

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

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7
N = INT()
ans = 0
for a in range(N):
	ans += 1 / (N - a)
print(ans)


n = int(input())
summ = 0
for a in range(1, n + 1):
	summ += 1 / a
print(summ)


import sys
inp = sys.stdin.readline
input = lambda : inp().strip()
flush = sys.stdout.flush

def iin():
	return int(input())

def lin():
	return list(map(int, input().split()))
from decimal import *
getcontext().prec = 8

def main():
	n = iin()
	ans = 0
	ans = Decimal(ans)
	for i in range(1, n + 1):
		ans += Decimal(1 / i)
	print(ans)
main()


n = int(input())
l = [1, 1.5]
for i in range(2, n):
	l.append(l[i - 1] + 1 / (i + 1))
print(l[n - 1])


import math
n = int(input())
sum = 0
k = 1
for i in range(n):
	sum = sum + 1 / (i + 1)
print('{0:.12f}'.format(sum))