#include <bits/stdc++.h>
using namespace std;
const int N = 1100;
const long double eps = 1e-10;
int n, vis[N];
long double p[N][N], cnt[N], dis[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1, x; j <= n; ++j)
      scanf("%d", &x), p[i][j] = (long double)(x) / (long double)(100);
  }
  for (int i = 1; i < n; ++i) dis[i] = 1.0, cnt[i] = 1.0;
  cnt[n] = 0, dis[n] = 0;
  for (int i = 1; i <= n; ++i) {
    long double mn = 1e10;
    int cur = -1;
    for (int j = 1; j <= n; ++j)
      if (!vis[j] && cnt[j] + eps < 1 && dis[j] / (1 - cnt[j]) < mn)
        mn = dis[j] / (1 - cnt[j]), cur = j;
    vis[cur] = 1;
    dis[cur] = dis[cur] / (1 - cnt[cur]);
    if (cur == n) dis[cur] = 0;
    for (int j = 1; j <= n; ++j)
      if (!vis[j]) {
        dis[j] += cnt[j] * p[j][cur] * dis[cur];
        cnt[j] *= (1 - p[j][cur]);
      }
  }
  printf("%.15Lf", dis[1]);
  return 0;
}
