#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int n;
double p[N][N], E[N], s[N];
bool vis[N];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) scanf("%lf", &p[i][j]), p[i][j] /= 100.0;
  vis[n] = true;
  if (n == 1) return puts("0"), 0;
  for (int i = 1; i < n; i++) {
    E[i] = 1.0;
    s[i] = 1 - p[i][n];
  }
  for (int i = 1; i <= n; i++) {
    double Min = 1e18;
    int pos = 0;
    for (int j = 1; j <= n; j++)
      if (!vis[j] && E[j] / (1.0 - s[j]) < Min)
        Min = E[j] / (1.0 - s[j]), pos = j;
    vis[pos] = true;
    if (pos == 1) return printf("%.10lf\n", E[1] / (1 - s[1])), 0;
    for (int j = 1; j <= n; j++)
      E[j] += E[pos] / (1 - s[pos]) * s[j] * p[j][pos], s[j] *= (1 - p[j][pos]);
  }
  return 0;
}
