#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5;
int n;
double g[N][N];
bool used[N];
double e[N], un[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    for (int j = 1, t; j <= n; j++) {
      scanf("%d", &t);
      g[i][j] = 1.0 * t / 100;
    }
  if (n == 1) return 0 & puts("0");
  memset(used, false, sizeof used);
  used[n] = true;
  for (int i = 1; i < n; i++) e[i] = 1, un[i] = 1 - g[i][n];
  for (int i = 1; i <= n; i++) {
    double minn = 1e18;
    int x = -1;
    for (int j = 1; j <= n; j++)
      if (!used[j] && e[j] / (1 - un[j]) < minn)
        minn = e[j] / (1 - un[j]), x = j;
    if (x == -1) break;
    used[x] = true;
    for (int j = 1; j <= n; j++)
      e[j] += e[x] / (1 - un[x]) * g[j][x] * un[j], un[j] *= 1 - g[j][x];
  }
  printf("%.10lf", e[1] / (1 - un[1]));
  return 0;
}
