#include <bits/stdc++.h>
using namespace std;
FILE* in = stdin;
FILE* out = stdout;
const int MAX = 100001;
const int INF = 1000000001;
int n;
double s;
vector<int> v[MAX], id[MAX];
bool used[MAX];
int dist[MAX];
double maxLen[MAX];
bool markPath(int node, int prev, int target, int toStart, int toEnd) {
  if (node == target) {
    dist[node] = max(toStart, toEnd);
    used[node] = true;
    return true;
  }
  for (int i = 0; i < (int)v[node].size(); i++) {
    if (v[node][i] == prev) continue;
    if (markPath(v[node][i], node, target, toStart + 1, toEnd - 1)) {
      maxLen[id[node][i]] = toStart + toEnd;
      dist[node] = max(toStart, toEnd);
      used[node] = true;
      return true;
    }
  }
  return false;
}
pair<int, int> findMostDistant(int node, int prev) {
  pair<int, int> ret = make_pair(node, 0);
  for (int i = 0; i < (int)v[node].size(); i++) {
    if (v[node][i] == prev) continue;
    pair<int, int> cur = findMostDistant(v[node][i], node);
    if (cur.second + 1 > ret.second) {
      ret = make_pair(cur.first, cur.second + 1);
    }
  }
  return ret;
}
int fill(int node, int prev, int curDist, int edgeId) {
  int maxDist = 0;
  for (int i = 0; i < (int)v[node].size(); i++) {
    if (v[node][i] == prev) continue;
    int dist = fill(v[node][i], node, curDist + 1, id[node][i]) + 1;
    maxDist = max(maxDist, dist);
  }
  maxLen[edgeId] = curDist + maxDist;
  return maxDist;
}
int main(void) {
  fscanf(in, "%d", &n);
  fscanf(in, "%lf", &s);
  for (int i = 0; i < n - 1; i++) {
    int node1, node2;
    fscanf(in, "%d %d", &node1, &node2);
    node1--, node2--;
    v[node1].push_back(node2), id[node1].push_back(i);
    v[node2].push_back(node1), id[node2].push_back(i);
  }
  vector<int> leaves;
  for (int node = 0; node < n; node++) {
    if ((int)v[node].size() == 1) {
      leaves.push_back(node);
    }
  }
  double weight = s / (double)leaves.size();
  fprintf(out, "%.9lf\n", weight * 2);
  return 0;
}
