#include <bits/stdc++.h>
using namespace std;
int n;
double s;
vector<int> a[100001];
int main() {
  cin >> n >> s;
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  int nr = 0;
  for (int i = 1; i <= n; i++)
    if (a[i].size() == 1) nr = nr + 1;
  cout << setprecision(10) << fixed << s * 2 / nr;
  return 0;
}
