#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007LL;
int n;
double p[1000 + 3][1000 + 3];
double r[1000 + 3];
double a[1000 + 3];
double b[1000 + 3];
bool done[1000 + 3];
int main() {
  scanf("%d", &n);
  for (int i = 0, _n = n; i < _n; i++)
    for (int j = 0, _n = n; j < _n; j++) scanf("%lf", &p[i][j]);
  for (int i = 0, _n = n; i < _n; i++)
    for (int j = 0, _n = n; j < _n; j++) p[i][j] /= 100.0;
  for (int i = 0, _n = n; i < _n; i++) r[i] = 1000000001;
  for (int i = 0, _n = n; i < _n; i++) a[i] = 0;
  for (int i = 0, _n = n; i < _n; i++) b[i] = 1;
  for (int i = 0, _n = n; i < _n; i++) done[i] = 0;
  priority_queue<pair<double, int> > q;
  q.push(make_pair(0, n - 1));
  while (!q.empty()) {
    pair<double, int> tr = q.top();
    q.pop();
    tr.first = -tr.first;
    if (done[tr.second]) continue;
    done[tr.second] = 1;
    r[tr.second] = tr.first;
    for (int i = 0, _n = n; i < _n; i++) {
      if (i == tr.second) continue;
      if (done[i]) continue;
      a[i] += b[i] * p[i][tr.second] * tr.first;
      b[i] *= (1 - p[i][tr.second]);
      r[i] = (a[i] + 1) / (1 - b[i]);
      q.push(make_pair(-r[i], i));
    }
  }
  printf("%0.15lf\n", r[0]);
  return 0;
}
