#include <bits/stdc++.h>
const int INF = (int)1e9 + 100;
const long long lINF = 1e18;
const double EPS = 1e-12;
using namespace std;
const int maxn = 1100;
int n;
long double a[maxn][maxn];
long double curexp[maxn];
long double lft[maxn];
int used[maxn];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      int c;
      scanf("%d", &c);
      a[i][j] = (long double)c / 100;
    }
  }
  for (int i = 0; i < n - 1; i++) {
    lft[i] = 1;
    curexp[i] = 1;
  }
  {
    used[n - 1] = 1;
    for (int i = 0; i < n - 1; i++) {
      lft[i] *= (1 - a[i][n - 1]);
    }
  }
  for (int i = 0; i < n - 1; i++) {
    int mxi = -1;
    for (int j = 0; j < n; j++) {
      if (used[j] == 1) {
        continue;
      }
      if (lft[j] > 1 - EPS) {
        continue;
      }
      if (mxi == -1 ||
          (curexp[j] / (1 - lft[j])) < (curexp[mxi] / (1 - lft[mxi]))) {
        mxi = j;
      }
    }
    used[mxi] = 1;
    curexp[mxi] = curexp[mxi] / (1 - lft[mxi]);
    for (int j = 0; j < n; j++) {
      if (used[j] == 1) {
        continue;
      }
      curexp[j] += lft[j] * a[j][mxi] * curexp[mxi];
      lft[j] *= (1 - a[j][mxi]);
    }
  }
  printf("%.18f\n", (double)curexp[0]);
  return 0;
}
