#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0;
  bool t = false;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') t = true, ch = getchar();
  while (ch <= '9' && ch >= '0') x = x * 10 + ch - 48, ch = getchar();
  return t ? -x : x;
}
int n, Q[1010], h, t;
bool use[1010], vis[1010];
double E[1010], p[1010][1010], prod[1010];
int main() {
  n = read();
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) p[i][j] = read() / 100.00;
  if (n == 1) {
    puts("0");
    return 0;
  }
  for (int i = 1; i <= n; ++i) E[i] = 1, prod[i] = 1 - p[i][n];
  E[n] = 0;
  vis[n] = true;
  for (int i = 1; i <= n; ++i) {
    int u = 0;
    double mn = 1e18;
    for (int j = 1; j <= n; ++j)
      if (!vis[j] && E[j] / (1 - prod[j]) < mn)
        u = j, mn = E[j] / (1 - prod[j]);
    vis[u] = true;
    if (u == 1) {
      printf("%.10lf\n", E[1] / (1 - prod[1]));
      return 0;
    }
    for (int j = 1; j <= n; ++j)
      E[j] += (E[u] / (1 - prod[u])) * p[j][u] * prod[j],
          prod[j] *= (1 - p[j][u]);
  }
  return 0;
}
