#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
template <typename T1, typename T2>
std::istream &operator>>(std::istream &in, pair<T1, T2> &oth) {
  in >> oth.first >> oth.second;
  return in;
}
template <typename T1, typename T2>
std::ostream &operator<<(std::ostream &out, const pair<T1, T2> &oth) {
  out << oth.first << ' ' << oth.second;
  return out;
}
template <typename T>
std::istream &operator>>(std::istream &in, std::vector<T> &v) {
  for (auto &now : v) in >> now;
  return in;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, const std::vector<T> &v) {
  for (auto &now : v) out << now << ' ';
  out << "\n";
  return out;
}
template <typename T>
T Myceil(T a, T b) {
  return (a + b - 1) / b;
}
template <typename T1, typename T2>
T1 max(T1 a, T2 b) {
  return a > b ? a : b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, s;
  cin >> n >> s;
  vector<vector<int> > G(n);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  long long cnt = 0;
  for (auto now : G) {
    if (now.size() == 1) {
      cnt++;
    }
  }
  cout << setprecision(10) << fixed << (long double)s / cnt * 2;
  return 0;
}
