#include <bits/stdc++.h>
using namespace std;
vector<int> g[100010];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  double s;
  cin >> n >> s;
  for (int i = 1; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  int cnt = 0;
  for (int i = 1; i <= n; ++i)
    if (g[i].size() == 1) cnt++;
  cout << fixed << setprecision(10) << s * 2 / cnt << endl;
}
