#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, s;
  cin >> n >> s;
  unordered_map<int, int> m;
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    cin >> x >> y;
    m[x]++;
    m[y]++;
  }
  double cnt = 0;
  for (const auto &i : m) {
    if (i.second == 1) cnt++;
  }
  cout << setprecision(12) << (s / cnt * 2) << endl;
}
