#include <bits/stdc++.h>
using namespace std;
int n, s, degree[100009];
int main() {
  int u, v;
  scanf("%d %d", &n, &s);
  for (int i = 1; i < n; i++) {
    scanf("%d %d", &u, &v);
    degree[u]++;
    degree[v]++;
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (degree[i] == 1) cnt++;
  }
  double ans, S = s, C = cnt;
  ans = (S / C) * 2.0;
  cout << setprecision(9) << fixed << ans << endl;
  return 0;
}
