#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  long double SOSI;
  ;
  cin >> SOSI;
  int s = 0;
  vector<vector<pair<int, int> > > g(n);
  for (int i = 0; i < n - 1; ++i) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    g[x].push_back({y, 1});
    g[y].push_back({x, 1});
  }
  long double kol = 0;
  for (int i = 0; i < n; ++i) {
    if (g[i].size() == 1) {
      kol++;
    }
  }
  cout << fixed << setprecision(16) << (SOSI / kol) * 2 << '\n';
  return 0;
}
