#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, s;
  cin >> n >> s;
  vector<int> deg(n + 1);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    deg[a]++;
    deg[b]++;
  }
  int leaf = 0;
  for (int i = 1; i <= n; i++)
    if (deg[i] == 1) leaf++;
  cout.precision(10);
  cout << fixed << s * 2.0 / leaf << endl;
}
