#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int u = 0, f = 1;
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    u = (u << 1) + (u << 3) + ch - 48;
    ch = getchar();
  }
  return u * f;
}
const int maxn = 1e3 + 10;
const double oo = 1e30;
double f[maxn], g[maxn], h[maxn];
double p[maxn][maxn];
int a[maxn];
bool flag[maxn];
int main() {
  int n = read();
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) p[i][j] = read() / 100.0;
  for (int i = 1; i <= n; ++i) f[i] = oo, g[i] = h[i] = 1;
  f[n] = 0;
  f[0] = oo;
  for (int x = 1; x <= n; ++x) {
    for (int i = 1; i <= n; ++i)
      if (!flag[i] && f[a[x]] > f[i]) a[x] = i;
    flag[a[x]] = 1;
    for (int i = 1; i <= n; ++i)
      if (!flag[i]) {
        g[i] += h[i] * p[i][a[x]] * f[a[x]];
        h[i] *= 1 - p[i][a[x]];
        f[i] = h[i] == 1 ? oo : g[i] / (1 - h[i]);
      }
  }
  printf("%.8lf", f[1]);
  return 0;
}
