#include <bits/stdc++.h>
using namespace std;
int degree[100010 + 1];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(8);
  int n, x, y;
  double s;
  cin >> n >> s;
  for (int i = 0; i < (n - 1); i++) {
    cin >> x >> y;
    degree[x]++;
    degree[y]++;
  }
  x = 0;
  for (int i = 1; i <= n; i++)
    if (degree[i] == 1) x++;
  s /= x;
  s *= 2;
  cout << fixed << s << "\n";
  return 0;
}
