#include <bits/stdc++.h>
using namespace std;
vector<int> g[100100];
int main() {
  int n, s;
  scanf("%d%d", &n, &s);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  int c = 0;
  for (int i = 0; i < n; i++) {
    if (g[i].size() == 1) c++;
  }
  cout << setprecision(10) << 2.0 / double(c) * double(s);
  return 0;
}
