def math = use('math/radians');

function A(i,j) {
  return 1/((i+j)*(i+j+1)/2+i+1);
}

function Au(u,v) {
  var i = 0
  var j = 0
  var t = null
  for (i = 0; i < length(u); ++i) {
    t = 0;
    for (j = 0; j < length(u); ++j)
      t += A(i,j) * u[j];

    v[i] = t;
  }
}

function Atu(u,v) {
  var i = 0
  var j = 0
  var t = null
  for (i = 0; i < length(u); ++i) {
    t = 0;
    for (j = 0; j < length(u); ++j)
      t += A(j,i) * u[j];

    v[i] = t;
  }
}

function AtAu(u,v,w) {
  Au(u,w);
  Atu(w,v);
}

function spectralnorm(n) {
  var i = 0
  var u = []
  var v = []
  var w = []
  var vv = 0
  var vBv = 0
  for (i = 0; i < n; ++i) {
    u[i] = 1; v[i] = 0; w[i] = 0;
  }

  for (i = 0; i < 10; ++i) {
    AtAu(u,v,w);
    AtAu(v,u,w);
  }

  for (i = 0; i < n; ++i) {
    vBv += u[i]*v[i];
    vv  += v[i]*v[i];
  }

  return math.sqrt(vBv/vv);
}

log.console(spectralnorm(arg[0]).toFixed(9));

$stop()