#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
int n, a[N][N], p;
double mini, f[N], g1[N], g2[N], sum[N];
bool o[N];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) scanf("%d", &a[i][j]);
    f[i] = 1.0 / a[i][n];
    g1[i] = 1;
  }
  f[n] = 0;
  for (int i = 1; i <= n; i++) {
    mini = 100000000;
    for (int j = 1; j <= n; j++)
      if (!o[j] && f[j] < mini) mini = f[j], p = j;
    o[p] = 1;
    for (int j = 1; j < n; j++)
      if (!o[j]) {
        sum[j] += g1[j] * a[j][p] / 100.0 * (f[p] + 1);
        g1[j] *= 1 - a[j][p] / 100.0;
        f[j] = (sum[j] + g1[j]) / (1 - g1[j]);
      }
  }
  printf("%.7f", f[1]);
}
