#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long inf = 1e18;
const long long p = 998244353;
long long int fac[200005];
double powe(double x, long long int y) {
  if (y == 0) return 1.00;
  double p = powe(x, y / 2);
  p = (p * p);
  return (y % 2 == 0) ? p : (x * p);
}
long long int power(long long int x, long long int y, long long int m) {
  if (y == 0) return 1;
  long long int p = power(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
long long int mod(long long int x) {
  if (x < 0)
    return -x;
  else
    return x;
}
long long int inverse(long long int a, long long int p) {
  return power(a, p - 2, p);
}
long long int ncr(long long int n, long long int r, long long int p) {
  if (r == 0) return 1;
  return (fac[n] * inverse(fac[r], p) % p * inverse(fac[n - r], p) % p) % p;
}
long long int leaves = 0;
vector<long long int> visited;
vector<vector<long long int> > adj;
vector<long long int> dis;
vector<long long int> ans;
void dfs(long long int s) {
  if (visited[s] == 1) return;
  visited[s] = 1;
  if ((long long int)(adj[s].size()) == 1) leaves++;
  for (long long int i = (0); i <= ((long long int)(adj[s].size()) - 1); i++) {
    if (!visited[adj[s][i]]) dfs(adj[s][i]);
  }
}
signed main() {
  long long int n, s;
  cin >> n >> s;
  ;
  adj.resize(n + 1);
  visited.resize(n + 1);
  for (long long int i = (1); i <= (n - 1); i++) {
    long long int x, y;
    cin >> x >> y;
    ;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  dfs(1);
  cout << setprecision(15) << double(2.00 * s) / double(leaves) << '\n';
  adj.clear();
  visited.clear();
}
