#include <bits/stdc++.h>
using namespace std;
inline int max(int a, int b) { return a < b ? b : a; }
inline int min(int a, int b) { return a > b ? b : a; }
inline long long max(long long a, long long b) { return a < b ? b : a; }
inline long long min(long long a, long long b) { return a > b ? b : a; }
const int mod = 1e9 + 7;
const int N = 1e6 + 10;
const long long INF = 1e18;
long double G[1005][1005];
long double ans[1005];
int u[1005];
long double EPS = 1e-12;
long double cur[1005], sum[1005];
vector<int> s;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) {
      int x;
      scanf("%d", &x);
      G[i][j] = x * 1. / 100;
    }
  if (n == 1) {
    printf("%lf\n", 0.0);
    exit(0);
  }
  for (int i = 0; i < n - 1; ++i) sum[i] = 1;
  for (int i = 0; i < n - 1; ++i)
    if (G[i][n - 1] == 100)
      u[i] = 1;
    else
      cur[i] = 1 - G[i][n - 1];
  int it = 0;
  while (!u[0] && it < n + 5) {
    s.clear();
    it++;
    long double mx = INF;
    for (int i = 0; i < n - 1; ++i)
      if (u[i] == 0) {
        long double x = sum[i] / (1 - cur[i]);
        if (abs(x - mx) < EPS)
          s.push_back(i);
        else if (x < mx) {
          s.clear();
          mx = x;
          s.push_back(i);
        }
      }
    for (int i = 0; i < s.size(); ++i) {
      ans[s[i]] = mx;
      u[s[i]] = 1;
    }
    for (int i = 0; i < n - 1; ++i)
      if (u[i] == 0) {
        long double x = 1;
        for (int j = 0; j < s.size(); ++j) x *= (1 - G[i][s[j]]);
        sum[i] += cur[i] * (1 - x) * mx;
        cur[i] *= x;
      }
  }
  printf("%.9lf\n", (double)ans[0]);
  return 0;
}
