#include <bits/stdc++.h>
using namespace std;
std::vector<long long int> v[100009];
long long int n, s, a, b;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  for (long long int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  long long int ans = 0;
  for (long long int i = 1; i <= n; i++) {
    if (v[i].size() == 1) {
      ans++;
    }
  }
  cout << setprecision(8) << 2 * (double)(s) / (double)ans << endl;
}
