#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  register long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = getchar();
  }
  return (f == 1) ? x : -x;
}
inline void file() {
  freopen(".in", "r", stdin);
  freopen(".out", "w", stdout);
}
int n;
double f[1010], P[1010], p[1010][1010];
bool vis[1010];
signed main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      p[i][j] = 1.0 * read() / 100.0;
    }
  }
  f[n] = 0, P[n] = 0, vis[n] = 1;
  for (int i = 1; i < n; i++) f[i] = 1, P[i] = 1.0 - p[i][n];
  for (int i = 1; i <= n; i++) {
    int k = 0;
    double mi = 1e18;
    for (int j = 1; j <= n; j++) {
      if (!vis[j] && f[j] / (1.0 - P[j]) < mi) k = j, mi = f[j] / (1.0 - P[j]);
    }
    vis[k] = 1;
    if (k == 1) break;
    for (int j = 1; j <= n; j++) {
      if (!vis[j])
        f[j] += (f[k] / (1.0 - P[k])) * p[j][k] * P[j], P[j] *= (1.0 - p[j][k]);
    }
  }
  printf("%.10lf\n", f[1] / (1.0 - P[1]));
  return 0;
}
