#include <bits/stdc++.h>
using namespace std;
int n, v[1010];
long double p[1010][1010], a[1010], d[1010];
int work() {
  int k;
  long double x = 1e100L;
  for (int i = 1; i <= n; i++)
    if (!v[i] && (d[i] + a[i]) / (1 - a[i]) <= x)
      x = (d[i] + a[i]) / (1 - a[i]), k = i;
  v[k] = 1, d[k] = (d[k] + a[k]) / (1 - a[k]);
  if (k == 1) return 1;
  for (int i = 1; i <= n; i++)
    if (!v[i]) d[i] += a[i] * p[i][k] * (d[k] + 1), a[i] *= 1 - p[i][k];
  return 0;
}
int main() {
  cin >> n;
  for (int i = 1, x; i <= n; i++) {
    for (int j = 1; j <= n; j++) cin >> x, p[i][j] = 0.01L * x;
    a[i] = 1;
  }
  a[n] = 0;
  for (int i = 1; i <= n; i++)
    if (work()) {
      cout << fixed << setprecision(15) << d[1];
      return 0;
    }
}
