#include <bits/stdc++.h>
template <class T1, class T2>
inline bool cmin(T1 &a, const T2 &b) {
  return b < a ? (a = b, true) : false;
}
template <class T1, class T2>
inline bool cmax(T1 &a, const T2 &b) {
  return a < b ? (a = b, true) : false;
}
template <class Type>
Type read() {
  Type a;
  bool b;
  unsigned char c;
  while (c = getchar() - 48, (c > 9) & (c != 253))
    ;
  for (a = (b = c == 253) ? 0 : c; (c = getchar() - 48) <= 9; a = a * 10 + c)
    ;
  return b ? -a : a;
}
auto rd = read<int>;
const int N = 1001;
int n;
bool vis[N];
double p[N][N], g[N], h[N];
int main() {
  n = rd();
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) p[i][j] = rd() / 100.0;
  vis[n] = true;
  for (int i = 1; i < n; ++i) g[i] = 1, h[i] = 1 - p[i][n];
  while (!vis[1]) {
    int j;
    double f = 1e100;
    for (int i = 1; i < n; ++i)
      if (!vis[i] && cmin(f, g[i] / (1 - h[i]))) j = i;
    vis[j] = true;
    if (j == 1) {
      printf("%.12lf\n", f);
      return 0;
    }
    for (int i = 1; i < n; ++i)
      if (!vis[i]) {
        g[i] += h[i] * p[i][j] * f;
        h[i] *= (1 - p[i][j]);
      }
  }
  puts("0");
  return 0;
}
