#include <bits/stdc++.h>
const long double EPS = 1e-10;
const long long int MOD = 1000000007ll;
const long long int mod1 = 1000000009ll;
const long long int mod2 = 1100000009ll;
int INF = 2147483645;
long long int INFINF = 9223372036854775807;
int debug = 0;
using namespace std;
void print(int a[], int s, int e) {
  for (int i = s; i <= e; i++) cout << a[i] << " ";
  cout << "\n";
}
void print(vector<int> &v, int s, int e) {
  for (int i = s; i <= e; i++) cout << v[i] << " ";
  cout << "\n";
}
void print(vector<int> &v) {
  for (int x : v) cout << x << " ";
  cout << "\n";
}
long long int bit_count(long long int _x) {
  long long int _ret = 0;
  while (_x) {
    if (_x % 2 == 1) _ret++;
    _x /= 2;
  }
  return _ret;
}
long long int bit(long long int _mask, long long int _i) {
  return (_mask & (1 << _i)) == 0 ? 0 : 1;
}
long long int powermod(long long int _a, long long int _b, long long int _m) {
  long long int _r = 1;
  while (_b) {
    if (_b % 2 == 1) _r = (_r * _a) % _m;
    _b /= 2;
    _a = (_a * _a) % _m;
  }
  return _r;
}
long long int add(long long int a, long long int b, long long int m = MOD) {
  long long int x = a + b;
  while (x >= m) x -= m;
  return x;
}
long long int sub(long long int a, long long int b, long long int m = MOD) {
  long long int x = a - b;
  while (x < 0) x += m;
  return x;
}
long long int mul(long long int a, long long int b, long long int m = MOD) {
  long long int x = a * b;
  x %= m;
  return x;
}
int N, M;
int A[410][410];
vector<int> Neigh[410];
vector<int> Dist[410][410];
long double PD[410];
long double NPD[410];
vector<int> V;
bool vis[410];
int main() {
  srand(time(NULL));
  cout << fixed << setprecision(10);
  scanf("%d", &N);
  scanf("%d", &M);
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++) A[i][j] = 500;
  for (int i = 0; i < N; i++) A[i][i] = 0;
  for (int i = 0; i < M; i++) {
    int u, v;
    scanf("%d", &u);
    u--;
    scanf("%d", &v);
    v--;
    A[u][v] = A[v][u] = 1;
    Neigh[u].push_back(v);
    Neigh[v].push_back(u);
  }
  for (int k = 0; k < N; k++)
    for (int i = 0; i < N; i++)
      for (int j = 0; j < N; j++) A[i][j] = min(A[i][j], A[i][k] + A[k][j]);
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++) Dist[i][A[i][j]].push_back(j);
  long double ans = 0.0;
  for (int c1 = 0; c1 < N; c1++) {
    long double ans2 = 0.0;
    for (int d = 0; d <= N; d++) {
      if (Dist[c1][d].size() == 0) continue;
      long double temp = 1 / (long double)N;
      for (int i = 0; i < N; i++) PD[i] = 0.0, vis[i] = false;
      ;
      V.clear();
      for (int u : Dist[c1][d]) {
        for (int v : Neigh[u]) {
          PD[v] += (long double)1 / (N * Neigh[u].size());
          if (!vis[v]) {
            vis[v] = true;
            V.push_back(v);
          }
        }
      }
      long double temp2 = 0.0;
      for (int c2 = 0; c2 < N; c2++) {
        long double temp3 = 0.0;
        for (int u : V) {
          NPD[A[c2][u]] = max(NPD[A[c2][u]], PD[u]);
        }
        for (int u : V) {
          temp3 += NPD[A[c2][u]];
          NPD[A[c2][u]] = 0;
        }
        temp2 = max(temp2, temp3);
      }
      temp = max(temp, temp2);
      ans2 += temp;
    }
    ans = max(ans, ans2);
  }
  cout << ans;
  return 0;
}
