#include <bits/stdc++.h>
using namespace std;
int p[1005][1005];
double rem[1005];
double ans[1005];
double calcAns(int ind) {
  return (ans[ind] + rem[ind]) / (1 - rem[ind] + 1e-15);
}
int main() {
  ios::sync_with_stdio(false);
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) scanf("%d", &p[i][j]);
  ans[n - 1] = 0;
  vector<pair<double, int> > bad, good;
  for (int i = 0; i < n - 1; i++) bad.push_back(make_pair(1.0, i));
  good.push_back(make_pair(0.0, n - 1));
  while (!bad.empty()) {
    double best = 1e9;
    int choice = -1;
    for (int i = 0; i < int(bad.size()); i++) {
      int indI = bad[i].second;
      int indJ = good.back().second;
      ans[indI] +=
          bad[i].first * (p[indI][indJ] / 100.0) * (1 + good.back().first);
      bad[i].first *= (1.0 - (p[indI][indJ] / 100.0));
      rem[indI] = bad[i].first;
      double res = calcAns(indI);
      if (res < best) best = res, choice = i;
    }
    int ind = bad[choice].second;
    ans[ind] = best;
    good.push_back(make_pair(ans[ind], ind));
    bad.erase(bad.begin() + choice);
    if (ind == 0) break;
  }
  printf("%.9lf\n", ans[0]);
  return 0;
}
