#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target( \
    "avx,avx2,fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int MOD = 1e9 + 7;
vector<vector<double> > p;
vector<int> used;
int n;
vector<double> ans;
vector<double> sm;
vector<double> pr;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0),
      cout << fixed << setprecision(20);
  cin >> n;
  p.resize(n);
  used.resize(n);
  for (int i = 0; i < n; i++) {
    p[i].resize(n);
    for (int j = 0; j < n; j++) {
      int pp;
      cin >> pp;
      p[i][j] = (double)pp / (double)100;
    }
  }
  ans.resize(n);
  sm.resize(n);
  pr.resize(n, 1);
  int nw = n - 1;
  for (int i = 0; i < n; i++) {
    double mn = MOD;
    int mnid = -1;
    for (int j = 0; j < n - 1; j++) {
      if (!used[j]) {
        sm[j] += pr[j] * p[j][nw] * (ans[nw] + 1);
        pr[j] *= (1 - p[j][nw]);
        if (pr[j] == 1) {
          ans[j] = MOD;
        } else {
          ans[j] = (sm[j] + pr[j]) / (1 - pr[j]);
        }
        mn = min(mn, ans[j]);
        if (mn == ans[j]) {
          mnid = j;
        }
      }
    }
    if (mnid == -1) break;
    used[mnid] = 1;
    nw = mnid;
  }
  cout << ans[0] << endl;
}
