#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5;
int n, vis[N];
double dp[N], p[N][N], tmp[N];
template <typename _Tp>
inline void IN(_Tp& x) {
  char ch;
  bool flag = 0;
  x = 0;
  while (ch = getchar(), !isdigit(ch))
    if (ch == '-') flag = 1;
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  if (flag) x = -x;
}
int main() {
  IN(n);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) IN(p[i][j]), p[i][j] = p[i][j] / 100.00;
  if (n == 1) {
    puts("0");
    return 0;
  }
  for (int i = 1; i <= n; ++i) dp[i] = 1, tmp[i] = 1 - p[i][n];
  dp[n] = 0, vis[n] = true;
  for (int i = 1; i <= n; ++i) {
    int id = 0;
    double Mi = 1e18;
    for (int j = 1; j <= n; ++j)
      if (!vis[j] && dp[j] / (1 - tmp[j]) < Mi)
        id = j, Mi = dp[j] / (1 - tmp[j]);
    vis[id] = true;
    if (id == 1) {
      printf("%.10lf\n", dp[1] / (1 - tmp[1]));
      return 0;
    }
    for (int j = 1; j <= n; ++j)
      dp[j] += (dp[id] / (1 - tmp[id])) * p[j][id] * tmp[j],
          tmp[j] *= (1 - p[j][id]);
  }
  return 0;
}
