#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 1;
vector<long double> ar[N];
int32_t main() {
  ios_base::sync_with_stdio(false);
  long long n, s;
  cin >> n >> s;
  for (long long i = 0; i < n - 1; i++) {
    long long a, b;
    cin >> a >> b;
    a--;
    b--;
    ar[a].push_back(b);
    ar[b].push_back(a);
  }
  double lef = 0;
  for (long long i = 0; i < n; i++)
    if (ar[i].size() == 1LL) lef++;
  cout.precision(8);
  cout << fixed << s * 2 / lef;
}
