#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> G;
int main() {
  int n, s;
  cin >> n >> s;
  G.resize(n + 1);
  int D[n + 1];
  memset(D, 0, sizeof(D));
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    D[x]++;
    D[y]++;
  }
  int r = 0;
  int l = 0;
  for (int i = 0; i <= n; i++) {
    if (D[i] > 1) r = i;
    l += (D[i] == 1);
  }
  if (not r) {
    cout << s << endl;
    return 0;
  }
  cout << fixed << setprecision(10) << ((2.0 * s) / (double)l) << endl;
  return (0 - 0);
}
