#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int n;
double p[N][N], d[N], pr[N];
int vis[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      int x;
      scanf("%d", &x);
      p[i][j] = x / 100.0;
    }
  for (int i = 1; i <= n; i++) d[i] = 1, pr[i] = 1 - p[i][n];
  if (n == 1) {
    printf("0.000000000");
    return 0;
  }
  vis[n] = 1;
  d[n] = 0;
  for (int i = 1; i < n; i++) {
    int u = 0;
    double mn = 1e18;
    for (int j = 1; j <= n; j++)
      if (!vis[j] && d[j] / (1 - pr[j]) < mn) mn = d[j] / (1 - pr[j]), u = j;
    vis[u] = 1;
    if (u == 1) {
      printf("%.10lf", d[1] / (1 - pr[1]));
      break;
    }
    for (int j = 1; j <= n; j++)
      d[j] += (d[u] / (1 - pr[u])) * p[j][u] * pr[j], pr[j] *= (1 - p[j][u]);
  }
  return 0;
}
