#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int n, vst[N];
double p[N][N], g[N], f[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) scanf("%lf", &p[i][j]), p[i][j] /= 100.0;
  for (int i = 1; i < n; i++) g[i] = f[i] = 1;
  f[n] = 0;
  for (int i = 1; i <= n; i++) {
    int pos = -1;
    double mn = 1e30;
    for (int j = 1; j <= n; j++)
      if (!vst[j] && g[j] < 1 && f[j] / (1.0 - g[j]) < mn) {
        mn = f[j] / (1.0 - g[j]);
        pos = j;
      }
    if (pos == -1) break;
    vst[pos] = 1;
    f[pos] = f[pos] / (1.0 - g[pos]);
    for (int j = 1; j <= n; j++) {
      if (vst[j]) continue;
      f[j] += f[pos] * p[j][pos] * g[j];
      g[j] *= (1.0 - p[j][pos]);
    }
  }
  printf("%.10f\n", f[1]);
  return 0;
}
