#include <bits/stdc++.h>
using namespace std;
int main() {
  long double n, s;
  cin >> n >> s;
  int a, b;
  vector<vector<int>> g(n + 1);
  for (int i = 1; i <= n - 1; i++) {
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  long double count = 0;
  for (int i = 1; i <= n; i++) {
    if (g[i].size() == 1) {
      count++;
    }
  }
  cout << setprecision(15) << 2 * s / count;
  return 0;
}
