#include <bits/stdc++.h>
using namespace std;
vector<int> v[100005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  int n, s;
  cin >> n >> s;
  for (int i = 1; i <= n - 1; i++) {
    int x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (v[i].size() == 1) {
      cnt++;
    }
  }
  cout << fixed << setprecision(10) << s * 2.0 / cnt << endl;
  return 0;
}
