#include <iomanip>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
#define rep(i,n) for (int i=0;i<n;i++)

#define DENOM 1000000007

using namespace std;
using ll = long long;


int main(){
  int n ;
  double x = 0;
  cin >> n ;
  for (int i=1;i<n;i++) {
    double p = double(n)/double(n-i)  ;
    x += p ;
  }
  cout << fixed << setprecision(10) ;
  cout << x << endl ;
  return 0 ;
}

#include <bits/stdc++.h>
#define rep(i, start, end) for(int i = start; i < end; i++)
using namespace std;
typedef long long ll;
 
int main(void){
  ll n, m;
  int c = 0;
  string s;
  
  cin >> n;

  rep(i, 1, 1e6){
    s = to_string(i);
    m = stoll(s + s);
    if(m <= n)
      c++;
    else
      break;
  }
    
  cout << c << endl;

  return 0;
}
