#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
using namespace std;
vector<long long> g[200000];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  double s;
  cin >> n >> s;
  for (long long i = 1; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    g[y].push_back(x);
    g[x].push_back(y);
  }
  double ans = 0.0;
  for (long long i = 1; i <= n; i++) {
    if (g[i].size() == 1) {
      ans += 1.0;
    }
  }
  cout.precision(20);
  cout << s / ans * 2;
  return 0;
}
