#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
inline void minto(int &a, int b) { a = min(a, b); }
inline void maxto(double &a, double b) { a = max(a, b); }
const int mxn = 406;
int n, m;
vi e[mxn];
int dist[mxn][mxn];
vi s[mxn];
double P[mxn];
double PD[mxn];
int main() {
  cin >> n >> m;
  memset(dist, 63, sizeof dist);
  for (int i = 1; i <= n; ++i) dist[i][i] = 0;
  for (int i = 0; i < m; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    dist[x][y] = dist[y][x] = 1;
    e[x].push_back(y);
    e[y].push_back(x);
  }
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j)
      for (int k = 1; k <= n; ++k) minto(dist[j][k], dist[j][i] + dist[i][k]);
  double ans = 0;
  for (int i = 1; i <= n; ++i) {
    double sum = 0;
    fill(s, s + n, vi{});
    for (int j = 1; j <= n; ++j) s[dist[i][j]].push_back(j);
    for (int j = 0; j < n; ++j)
      if (!s[j].empty()) {
        double P1 = 1.0 / n;
        double P2 = 0;
        vector<int> V = s[j];
        if (j - 1 >= 0) V.insert(V.end(), s[j - 1].begin(), s[j - 1].end());
        if (j + 1 < n) V.insert(V.end(), s[j + 1].begin(), s[j + 1].end());
        for (auto y : V) P[y] = 0;
        for (auto x : s[j])
          for (auto y : e[x]) P[y] += 1.0 / n / e[x].size();
        for (int k = 1; k <= n; ++k) {
          for (auto x : V) maxto(PD[dist[k][x]], P[x]);
          double psum = 0;
          for (auto x : V) {
            psum += PD[dist[k][x]];
            PD[dist[k][x]] = 0;
          }
          maxto(P2, psum);
        }
        sum += max(P1, P2);
      }
    ans = max(ans, sum);
  }
  cout.setf(ios::fixed);
  cout.precision(12);
  cout << ans << endl;
  return 0;
}
