#include <bits/stdc++.h>
using namespace std;
const int N = 1100;
int n, vi[N];
double p[N][N], dp[N], sum[N][N], all[N];
inline int read() {
  int f = 1, x = 0;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = x * 10 + s - '0';
    s = getchar();
  }
  return x * f;
}
signed main() {
  n = read();
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) p[i][j] = (double)read() / 100.0;
  for (int i = 1; i < n; i++) dp[i] = 1e9, sum[i][0] = all[i] = 1;
  for (int i = 1; i <= n; i++) {
    double MIN = 1e9;
    int wh;
    for (int j = 1; j <= n; j++)
      if (!vi[j] && dp[j] < MIN) MIN = dp[j], wh = j;
    if (wh == 1) break;
    vi[wh] = 1;
    for (int j = 1; j <= n; j++) {
      if (vi[j]) continue;
      all[j] += p[j][wh] * sum[j][i - 1] * dp[wh];
      sum[j][i] = sum[j][i - 1] * (1 - p[j][wh]);
      dp[j] = all[j] / (1.0 - sum[j][i]);
    }
  }
  printf("%.9lf\n", dp[1]);
}
