#include <bits/stdc++.h>
using namespace std;
struct Reader {
  istream& is;
  template <typename T>
  operator T() const {
    T t;
    is >> t;
    return t;
  }
};
const int N = 1000;
double p[N][N], prod[N], E[N];
bool v[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  Reader r{cin};
  int n = int(r) - 1;
  for (int i = 0; i <= n; ++i)
    for (int j = 0; j <= n; ++j) p[i][j] = int(r) / 100.0;
  E[n] = 0.0;
  v[n] = true;
  for (int i = 0; i < n; ++i) {
    E[i] = 1.0;
    prod[i] = 1.0 - p[i][n];
  }
  for (int i = 0; i <= n; ++i) {
    int k = -1;
    for (int j = 0; j <= n; ++j)
      if (!v[j] && (!~k || E[j] / (1.0 - prod[j]) < E[k] / (1.0 - prod[k])))
        k = j;
    if (!~k) break;
    v[k] = true;
    for (int j = 0; j <= n; ++j)
      if (E[k] / (1.0 - prod[k]) < E[j] / (1.0 - prod[j])) {
        E[j] += E[k] / (1.0 - prod[k]) * prod[j] * p[j][k];
        prod[j] *= 1.0 - p[j][k];
      }
  }
  cout << fixed << setprecision(16) << E[0] / (1.0 - prod[0]);
  return 0;
}
