#include <bits/stdc++.h>
using namespace std;
long long mod(long long a) {
  long long c = a % (long long)(1E9 + 7);
  if (c >= 0)
    return c;
  else
    return c + (long long)(1E9 + 7);
}
long long inf = (long long)1E12;
long long max(long long a, long long b) {
  if (a < b)
    return b;
  else
    return a;
}
long long min(long long a, long long b) {
  if (a > b)
    return b;
  else
    return a;
}
void Max(long long* pos, long long val) { *pos = max(*pos, val); }
void Min(long long* pos, long long val) { *pos = min(*pos, val); }
void Add(long long* pos, long long val) { *pos = mod(*pos + val); }
const long double EPS = 1E-8;
int main() {
  long long n, s;
  cin >> n >> s;
  vector<long long> v[n];
  for (long long i = 0; i <= n - 2; i++) {
    long long a, b;
    cin >> a >> b;
    a--;
    b--;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  long long co = 0;
  for (long long i = 0; i <= n - 1; i++)
    if (v[i].size() == 1) co++;
  double ans = 2.0 * (double)s / (double)co;
  printf("%10.10lf", ans);
  return 0;
}
