using System;
class Program
{
static void Main(string[] args)
//Bài 3: Tính S(n) = 1 + ½ + 1/3 + … + 1/n
Console.WriteLine("Nhap so n de tinh tong theo cong thuc tinh S(n) = 1 + ½ + 1/3 + ... + 1/n");
int n = int.Parse(Console.ReadLine());
int i = 1;
double Sum = 0D;
while (i <= n)
Sum += 1D/i;
i++;
}
Console.WriteLine($"Ket qua la {Sum}");