#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int n, p[N][N], vis[N];
long double E[N], prob[N], coef[N];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) scanf("%d", &p[i][j]);
  for (int i = 0; i < n; i++) E[i] = 1e30, prob[i] = 1, coef[i] = 0;
  E[n - 1] = 0;
  for (int k = 0; k < n; k++) {
    long double mv = 1e30;
    int ps = -1;
    for (int i = 0; i < n; i++)
      if (!vis[i] && E[i] < mv) mv = E[i], ps = i;
    vis[ps] = 1;
    if (ps == 0) {
      printf("%.15f\n", (double)E[0]);
      return 0;
    }
    for (int i = 0; i < n; i++)
      if (!vis[i]) {
        coef[i] += E[ps] * prob[i] * 0.01 * p[i][ps];
        prob[i] *= (1 - 0.01 * p[i][ps]);
        if (prob[i] < 1 - 1e-6) E[i] = (1 + coef[i]) / (1 - prob[i]);
      }
  }
}
