#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1010;
int N;
double P[MAXN][MAXN];
double ans[MAXN];
double noout[MAXN];
bool vis[MAXN];
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
  }
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      scanf("%lf", &P[i][j]);
      P[i][j] /= 100;
    }
  }
  for (int i = 0; i < N; i++) {
    ans[i] = INFINITY;
    noout[i] = 1;
  }
  ans[N - 1] = 0;
  for (int i = 0; i < N; i++) {
    int opt = 0;
    for (int j = 1; j < N; j++) {
      if (!vis[j] && ans[j] < ans[opt]) {
        opt = j;
      }
    }
    vis[opt] = true;
    for (int j = 0; j < N; j++) {
      if (!vis[j] && P[j][opt]) {
        if (ans[j] == INFINITY) {
          ans[j] = 1;
        } else {
          ans[j] *= (1 - noout[j]);
        }
        ans[j] += noout[j] * P[j][opt] * ans[opt];
        noout[j] *= (1 - P[j][opt]);
        ans[j] /= (1 - noout[j]);
      }
    }
  }
  printf("%.10lf\n", ans[0]);
}
