#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-15;
int n;
double f[1005], p[1005][1005], prod[1005];
bool vis[1005];
inline int read() {
  int x = 0;
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x;
}
int main() {
  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) prod[i] = 1;
  for (int i = 1; i <= n; ++i) {
    int u = -1;
    double minExp = 1e50;
    if (i != 1) {
      for (int j = 1; j <= n; ++j)
        if (!vis[j] && (1 + f[j]) / (1 - prod[j]) < minExp) {
          u = j;
          minExp = (1 + f[u]) / (1 - prod[u]);
        }
    } else {
      u = n;
      prod[u] = 0;
    }
    vis[u] = true;
    if (u != n) f[u] = (1 + f[u]) / (1 - prod[u]);
    for (int v = 1; v <= n; ++v) {
      if (vis[v]) continue;
      f[v] = f[v] + prod[v] * p[v][u] * f[u];
      prod[v] = prod[v] * (1 - p[v][u]);
    }
  }
  printf("%.10lf", f[1]);
  return 0;
}
