#include <bits/stdc++.h>
using namespace std;
const long long N = 400005;
long long n, d[1005], vis[1005] = {0};
double p[1005][1005], ans[1005], sum[1005], mul[1005];
int main() {
  ios::sync_with_stdio(false);
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= n; j++) {
      scanf("%lf", &p[i][j]);
      p[i][j] = p[i][j] / 100.0;
    }
  }
  vis[n] = 1;
  d[1] = n;
  ans[1] = 0.0;
  for (long long i = 1; i <= n; i++) sum[i] = 1.0, mul[i] = 1.0;
  for (long long i = 2; i <= n; i++) {
    long long id = 0;
    for (long long j = 1; j <= n; j++) {
      if (vis[j]) continue;
      sum[j] += mul[j] * ans[d[i - 1]] * p[j][d[i - 1]];
      mul[j] *= (1.0 - p[j][d[i - 1]]);
      ans[j] = sum[j] / (1.0 - mul[j]);
      if (!id || ans[id] > ans[j]) id = j;
    }
    d[i] = id;
    vis[id] = 1;
  }
  printf("%.12lf\n", ans[1]);
  return 0;
}
