#include <bits/stdc++.h>
using namespace std;
int mas[100007];
int main() {
  cout << fixed << setprecision(10);
  long long n, s, kol = 0, a, b, i, j;
  cin >> n >> s;
  for (i = 0; i < n - 1; i++) {
    cin >> a >> b;
    mas[a]++;
    mas[b]++;
  }
  for (i = 1; i <= 100000; i++) {
    if (mas[i] == 1) {
      kol++;
    }
  }
  cout << double(s) / double(kol) * 2;
  return 0;
}
