#include <bits/stdc++.h>
using namespace std;
const int N = 1013;
double p[N][N], f[N], g[N];
bool done[N];
int n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) {
      scanf("%lf", &p[i][j]);
      p[i][j] *= 0.01;
    }
  for (int i = 1; i < n; ++i) f[i] = g[i] = 1.0;
  for (int ct = 1; ct <= n; ++ct) {
    int x = 0;
    double mi = 1e9;
    for (int i = 1; i <= n; ++i)
      if (!done[i] and g[i] < 1)
        if (f[i] / (1 - g[i]) < mi) mi = f[i] / (1 - g[i]), x = i;
    if (!x) break;
    done[x] = true;
    f[x] /= (1 - g[x]);
    for (int i = 1; i <= n; ++i)
      if (!done[i]) {
        f[i] += g[i] * p[i][x] * f[x];
        g[i] *= (1 - p[i][x]);
      }
  }
  printf("%.7lf\n", f[1]);
  return 0;
}
