#include <bits/stdc++.h>
using namespace std;
int n;
long double p[1005][1005];
long double E[1005];
long double prob[1005];
bool bio[1005];
int pp[1005][1005];
int main() {
  cin >> n;
  for (int i = (int)(0); i < (int)(n); ++i)
    for (int j = (int)(0); j < (int)(n); ++j)
      scanf("%d", pp[i] + j), p[i][j] = pp[i][j] / 100.0;
  vector<int> V = {n - 1};
  vector<int> V2;
  for (int i = (int)(0); i < (int)(n - 1); ++i) V2.push_back(i);
  bio[n - 1] = true;
  for (int i = (int)(0); i < (int)(n); ++i) {
    if (bio[i]) continue;
    E[i] = 1;
    prob[i] = 1;
    prob[i] *= 1 - p[i][n - 1];
  }
  while (!V2.empty()) {
    int id = -1;
    long double cal = 1e9;
    for (int i = (int)(0); i < (int)(V2.size()); ++i) {
      if (prob[V2[i]] > 0.999) continue;
      long double cc = E[V2[i]] / (1 - prob[V2[i]]);
      if (cc < cal) cal = cc, id = i;
    }
    if (id == -1) break;
    int first = V2[id];
    V2.erase(V2.begin() + id);
    bio[first] = true;
    E[first] /= 1 - prob[first];
    for (int i = (int)(0); i < (int)(n); ++i) {
      if (bio[i]) continue;
      if (pp[i][first] == 0) continue;
      E[i] += prob[i] * p[i][first] * E[first];
      prob[i] *= 1 - p[i][first];
    }
    V.push_back(first);
  }
  E[n - 1] = 0;
  for (int first = (int)(1); first < (int)(V.size()); ++first) {
    int i = V[first];
    E[i] = 1;
    prob[i] = 1;
    for (int second = (int)(0); second < (int)(first); ++second) {
      int j = V[second];
      if (pp[i][j] == 0) continue;
      E[i] += prob[i] * p[i][j] * E[j];
      prob[i] *= 1 - p[i][j];
    }
    E[i] /= 1 - prob[i];
  }
  printf("%.15lf\n", (double)E[0]);
  return 0;
}
