#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
using namespace std;
void fillString(string &s, char x) {
  for (int i = 0; i < s.size(); i++) s[i] = x;
}
long long int max(long long int a, long long int b) { return a >= b ? a : b; }
long long int min(long long int a, long long int b) { return a >= b ? b : a; }
long long int i, j, t, test, x, y, k, n, m, a, b, d;
long long int testArray[10] = {5, 2, 3, 1, 8, 4, 9, 7, 6, 0};
long long int A[1001101] = {0};
long long int B[1001101] = {0};
long long int vis[10001000] = {0};
vector<long long int> adj[1001000];
long long int adder[100100] = {0};
long long int deg[1001000] = {0};
string s;
vector<long long int> path, ans;
void maker(long long int a, long long int b) {
  path.push_back(a);
  vis[a] = 1;
  if (a == b) {
    ans = path;
    return;
  }
  for (auto v : adj[a]) {
    if (vis[v] == 0) {
      maker(v, b);
    }
  }
  vis[a] = 0;
  path.pop_back();
}
stack<long long int> st;
void dfs(long long int i) {
  vis[i] = 1;
  if (A[i] > 0 && vis[B[i]] == 0) {
    dfs(B[i]);
  }
  if (i != -1) st.push(i);
}
void solve() {
  cin >> n >> k;
  for (i = 1; i < n; i++) {
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  x = 0;
  for (i = 1; i <= n; i++) {
    if (adj[i].size() == 1) {
      x++;
    }
  }
  double ans = double(2 * k) / double(x);
  printf("%.10f\n", ans);
}
int main() {
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
