#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long mod2 = 998244353;
const long long inf = 1e18 * 4;
const long double pai = acos(-1);
int n, s;
int deg[100009];
int main() {
  cin >> n >> s;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b, a--, b--;
    deg[a]++;
    deg[b]++;
  }
  int l = 0;
  for (int i = 0; i < n; i++) l += (deg[i] == 1);
  cout << setprecision(8) << fixed << (2.0 * s / l) << endl;
}
