#include <bits/stdc++.h>
using namespace ::std;
const int maxn = 409;
const int inf = 1e9 + 500;
vector<int> ger[maxn];
int d[maxn][maxn];
int n;
long double p[maxn];
long double ma[maxn];
long double W(const vector<int> &vec, int x) {
  for (auto v : vec) {
    ma[d[x][v]] = max(ma[d[x][v]], p[v]);
  }
  long double ans = 0;
  for (auto v : vec) {
    ans += ma[d[x][v]];
    ma[d[x][v]] = 0;
  }
  return ans;
}
long double Q() {
  vector<int> vec;
  for (int i = 0; i < n; i++) {
    if (p[i] > 0) {
      vec.push_back(i);
    }
  }
  long double ans = 0;
  for (int i = 0; i < n; i++) {
    ans = max(ans, W(vec, i));
  }
  return ans;
}
long double g(const vector<int> &ve) {
  if (ve.size() == 0) {
    return 1;
  } else {
    fill(p, p + maxn, 0);
    long double B = ((long double)1 / (long double)ve.size());
    for (auto v : ve) {
      long double D = (B / (long double)ger[v].size());
      for (auto u : ger[v]) {
        p[u] += D;
      }
    }
    return max((long double)1 / (long double)(ve.size()), Q());
  }
}
vector<int> vec[maxn];
long double R(int a) {
  for (int i = 0; i < n; i++) {
    vec[i].clear();
  }
  for (int i = 0; i < n; i++) {
    vec[d[a][i]].push_back(i);
  }
  long double ans = 0;
  for (int i = 0; i < n; i++) {
    ans += ((long double)vec[i].size() / (long double)n) * g(vec[i]);
  }
  return ans;
}
void bfs(int a) {
  for (int i = 0; i < n; i++) {
    d[a][i] = inf;
  }
  queue<pair<int, int> > qu;
  qu.push(make_pair(a, 0));
  while (qu.size()) {
    pair<int, int> e = qu.front();
    qu.pop();
    if (d[a][e.first] == inf) {
      d[a][e.first] = e.second;
      for (auto v : ger[e.first]) {
        qu.push(make_pair(v, e.second + 1));
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int v, u;
    cin >> v >> u;
    v--;
    u--;
    ger[u].push_back(v);
    ger[v].push_back(u);
  }
  for (int i = 0; i < n; i++) {
    bfs(i);
  }
  long double ans = 0;
  for (int i = 0; i < n; i++) {
    ans = max(ans, R(i));
  }
  cout << fixed << setprecision(10) << ans;
}
