#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  long double c = 2, s, le = 0;
  cin >> n >> s;
  vector<int> deg(n + 1);
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    deg[a]++, deg[b]++;
  }
  for (int i = 1; i <= n; ++i) {
    if (deg[i] == 1) le++;
  }
  cout << fixed << setprecision(20);
  cout << (c * s) / le;
  return 0;
}
