#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const long long mod = 1e9 + 7;
const int max_n = 1e5 + 1;
const int max_m = 4 * 1e5 + 1;
int n, s, l;
vector<int> tree[max_n];
void dfs(int here, int parent) {
  if (tree[here].size() == 1) l++;
  for (int i = 0; i < tree[here].size(); i++) {
    int nxt = tree[here][i];
    if (nxt == parent) continue;
    dfs(nxt, here);
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  cin >> n >> s;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    tree[a].push_back(b);
    tree[b].push_back(a);
  }
  dfs(1, -1);
  cout << fixed;
  cout.precision(15);
  cout << (double)2 * s / l;
}
