#include <iostream>   
#include <string>

using namespace std;

int main()
{

  int num;
  float sum=0.0;

  cout << "Enter an integer: ";
  cin >> num;

  for(int i=1; i<=num; i++){
    sum = sum+(1.0/float(i));
  }

  cout << "The sum of the reciprocals from 1 to " 
       << num << " is " 
       << sum << endl;

  return 0;
}
