#include <bits/stdc++.h>
using namespace std;
constexpr int inf32 = 0x3f3f3f3f;
constexpr long long inf64 = 0x3f3f3f3f3f3f3f3f;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cout.precision(12), cout << fixed;
  int n;
  cin >> n;
  int cnt = n;
  vector<vector<double>> p(n, vector<double>(n));
  for (int u = 0; u < (n); ++u)
    for (int v = 0; v < (n); ++v) {
      int first;
      cin >> first, p[u][v] = first / 100.;
    }
  vector<int> vis(n, false);
  vector<double> f(n), now(n, 1);
  auto calc = [&](int u) -> double { return (f[u] + now[u]) / (1 - now[u]); };
  int u = n - 1;
  auto trans = [&]() -> void {
    if (u != n - 1) f[u] = calc(u);
    vis[u] = true, --cnt;
    for (int v = 0; v < (n); ++v)
      if (!vis[v]) {
        f[v] += now[v] * p[v][u] * (f[u] + 1);
        now[v] *= 1 - p[v][u];
      }
    u = -1;
  };
  for (trans(); cnt; trans())
    for (int v = 0; v < (n); ++v)
      if (!vis[v] && (!~u || calc(v) < calc(u))) u = v;
  cout << f[0] << '\n';
  return 0;
}
