#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)1e6 + 1;
const int MOD = (int)1e9 + 7;
const int infint = (int)1e8 + 3;
const long long inf = (long long)1e18;
int deg[MAXN], n, s;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    deg[u]++, deg[v]++;
  }
  int leaf = 0;
  for (int i = 1; i <= n; i++)
    if (deg[i] == 1) leaf++;
  cout << fixed << setprecision(7) << s * 2.0 / leaf;
}
