#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(time(0));
bool isPrime(long long a) {
  long long i;
  for (i = 2; i * i <= a; i++) {
    if (a % i == 0) {
      return 0;
    }
  }
  return (a != 1);
}
bool isPalindrom(const string &s, int l, int r) {
  for (int i = 0; i < (r - l + 1) / 2; i++) {
    if (s[l + i] != s[r - i]) {
      return 0;
    }
  }
  return 1;
}
template <class type1>
type1 gcd(type1 a, type1 b) {
  type1 t;
  while (b) {
    t = b;
    b = a % b;
    a = t;
  }
  return a;
}
long long positiveMod(long long v, long long md) {
  v = v % md;
  if (v < 0) {
    v += md;
  }
  return v;
}
vector<long long> gr[200005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, m, i, j, a, b, k = 0;
  double mm, kk, res;
  cin >> n >> m;
  for (i = 0; i < n - 1; i++) {
    cin >> a >> b;
    gr[b].push_back(a);
    gr[a].push_back(b);
  }
  for (i = 1; i <= n; i++) {
    if (gr[i].size() == 1) {
      k++;
    }
  }
  mm = m;
  kk = k;
  res = mm / kk * 2.0;
  cout.precision(8);
  cout << fixed << res << "\n";
  return 0;
}
