#include <bits/stdc++.h>
using namespace std;
const double pi = 3.141592653589;
const long long int zero = 0;
long long int mod = 1000000007;
const long long int inf = 1e9;
const long long int inff = 9000000000000000000;
char al[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
               'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
char capital[26] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
                    'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
                    'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
int visited[200000];
vector<int> adj[200000];
int cnt[200000];
void subtree(int w) {
  cnt[w - 1] = 0;
  visited[w - 1] = 1;
  vector<int>::iterator it;
  for (it = adj[w - 1].begin(); it != adj[w - 1].end(); it++) {
    if (visited[*it - 1] == 0) {
      visited[*it - 1] = 1;
      subtree(*it);
      cnt[w - 1] += max(cnt[*it - 1], 1);
    }
  }
}
int main() {
  int t = 1;
  while (t--) {
    int n, a, b;
    cin >> n;
    long double s;
    cin >> s;
    for (int i = 0; i < n - 1; i++) {
      cin >> a >> b;
      adj[a - 1].push_back(b);
      adj[b - 1].push_back(a);
    }
    int y, ma = 0;
    for (int i = 0; i < n; i++) {
      if (ma < adj[i].size()) {
        ma = adj[i].size();
        y = i + 1;
      }
    }
    subtree(y);
    long double fuck = cnt[y - 1];
    cout << fixed << setprecision(10) << min(s, (s / fuck) * 2) << "\n";
  }
}
