#include <bits/stdc++.h>
using namespace std;
int n, s;
int in[100005];
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> s;
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    ++in[a];
    ++in[b];
  }
  int cnt = 0;
  for (int i = 1; i <= n; ++i) {
    cnt += (in[i] == 1);
  }
  cout << fixed << setprecision(7) << (double)2 * s / cnt << endl;
}
