#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n, s;
  cin >> n >> s;
  vector<int> v(n, 0);
  int f, t;
  for (int i = 0; i < n - 1; ++i) {
    cin >> f >> t;
    v[f - 1]++;
    v[t - 1]++;
  }
  int l = 0;
  for (int i = 0; i < n; ++i) l += (v[i] == 1);
  ld ans = (ld)s / (ld)l;
  cout.precision(9);
  cout << fixed << (2 * ans);
  return 0;
}
