#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  if (fopen("input.in", "r")) {
    freopen("input.in", "r", stdin);
    freopen("output.out", "w", stdout);
  }
  int n;
  long double s;
  cin >> n >> s;
  int counts[101003];
  memset(counts + 1, 0, n);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    counts[a]++;
    counts[b]++;
    assert(a <= 100000);
    assert(b <= 100000);
  }
  long double leaves = count(counts + 1, counts + n + 1, 1);
  cout << fixed << setprecision(12) << (long double)2 * (s / leaves) << endl;
}
