#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1005;
double p[Maxn][Maxn], e[Maxn], f[Maxn];
int vis[Maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) scanf("%lf", &p[i][j]), p[i][j] /= 100;
  for (int i = 1; i < n; i++) f[i] = 1, e[i] = 1;
  for (int i = 1; i <= n; i++) {
    double val = 1e60;
    int pos = 0;
    for (int j = 1; j <= n; j++)
      if (!vis[j] && e[j] / (1 - f[j]) < val) {
        val = e[j] / (1 - f[j]);
        pos = j;
      }
    e[pos] = val;
    vis[pos] = true;
    for (int i = 1; i <= n; i++)
      if (!vis[i]) {
        e[i] += e[pos] * p[i][pos] * f[i];
        f[i] *= (1 - p[i][pos]);
      }
  }
  cout << fixed << setprecision(7) << e[1] << "\n";
  return 0;
}
