#include <bits/stdc++.h>
using namespace std;
vector<int> g[1000010];
int main() {
  long long n;
  long double s;
  cin >> n >> s;
  for (long long i = 0; i < n - 1; ++i) {
    long long x, y;
    cin >> x >> y;
    --x, --y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  long long cnt = 0;
  for (long long i = 0; i < n; ++i) {
    if (g[i].size() == 1) {
      ++cnt;
    }
  }
  cout << setw(0) << setprecision(10) << fixed << s / cnt * 2 << endl;
  return 0;
}
