#include <bits/stdc++.h>
using namespace std;
template <typename T>
using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
using max_priority_queue = priority_queue<T, vector<T>, less<T>>;
const int64_t MODVAL = 1e9 + 7;
template <typename T1, typename T2>
istream &operator>>(istream &obj, pair<T1, T2> &p) {
  obj >> p.first >> p.second;
  return obj;
}
template <typename T>
void readv(vector<T> &v, int offset = 0) {
  for (int i = offset; i < v.size(); ++i) {
    cin >> v[i];
  }
}
template <typename T>
void readv(vector<vector<T>> &v, int offset = 0) {
  for (int i = offset; i < v.size(); ++i) {
    readv(v[i], offset);
  }
}
template <typename T>
istream &operator>>(istream &obj, vector<T> &v) {
  readv(v);
  return obj;
}
int64_t powermod(int64_t x, int64_t n, int64_t mod = MODVAL) {
  if (n == 0) {
    return 1;
  } else if (n % 2) {
    return (x * powermod(x, n - 1, mod)) % mod;
  }
  int64_t temp = powermod(x, n / 2, mod);
  return (temp * temp) % mod;
}
int64_t power(int64_t x, int64_t n) {
  if (n == 0) {
    return 1;
  } else if (n % 2) {
    return (x * power(x, n - 1));
  }
  int64_t temp = power(x, n / 2);
  return (temp * temp);
}
map<int64_t, int64_t> modinv;
int64_t inv(int64_t n, int64_t mod = MODVAL) {
  if (modinv[n] == 0) {
    modinv[n] = powermod(n, mod - 2, mod);
  }
  return modinv[n];
}
class dsu {
 public:
  vector<int64_t> par, size;
  dsu(int64_t n)
      : par(vector<int64_t>(n + 1)), size(vector<int64_t>(n + 1, 1)) {
    for (int i = 0; i < n + 1; ++i) {
      par[i] = i;
    }
  }
  int64_t rep(int64_t x) {
    if (par[x] != x) {
      x = rep(par[x]);
    }
    return par[x];
  }
  bool check(int64_t a, int64_t b) { return par[a] == par[b]; }
  void join(int64_t a, int64_t b) {
    a = rep(a);
    b = rep(b);
    if (size[a] < size[b]) {
      swap(a, b);
    }
    par[b] = a;
    size[a] += size[b];
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int64_t N, count = 0;
  long double S;
  cin >> N >> S;
  vector<vector<int64_t>> tree(N + 1, vector<int64_t>());
  for (int i = 0; i < N - 1; ++i) {
    int a, b;
    cin >> a >> b;
    tree[a].push_back(b);
    tree[b].push_back(a);
  }
  for (auto &x : tree) {
    if (x.size() == 1) {
      ++count;
    }
  }
  cout << fixed << 2 * S / count;
  return 0;
}
