#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
int n, s, a[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  int test = 1;
  while (test--) {
    cin >> n >> s;
    for (int i = 1; i < n; i++) {
      int u, v;
      cin >> u >> v;
      a[u]++;
      a[v]++;
    }
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
      if (a[i] == 1) cnt++;
    }
    cout << fixed << setprecision(6) << (double)2 * (double)s / (double)cnt
         << endl;
  }
}
