#include <bits/stdc++.h>
using namespace std;
struct InputReader {
  char buf[1000001];
  int p;
  inline InputReader() { p = 1000001; }
  inline void Flush() {
    p = 0;
    fread(buf, 1, 1000001, stdin);
  }
  inline char C() {
    if (p >= 1000001) Flush();
    return buf[p++];
  }
  inline char Readnum() {
    char ch = C();
    while (!isdigit(ch) && ch != '-') ch = C();
    return ch;
  }
  inline void Readalpha(char &c) {
    c = C();
    while (!isalpha(c)) c = C();
  }
  int operator()() {
    int ans = 0, fu = 1;
    char ch = Readnum();
    if (ch == '-') fu = -1, ch = C();
    while (ch >= '0' && ch <= '9') {
      ans = ans * 10 + ch - '0';
      ch = C();
    }
    return ans * fu;
  }
  long long Readll() {
    long long ans = 0LL, fu = 1LL;
    char ch = Readnum();
    if (ch == '-') fu = -1LL, ch = C();
    while (ch >= '0' && ch <= '9') {
      ans = ans * 10LL + ch - '0';
      ch = C();
    }
    return ans * fu;
  }
  inline void Readstring(string &x) {
    x.clear();
    char ch = C();
    while (!isdigit(ch) && !isalpha(ch) && ch != '-' && ch != '.') ch = C();
    while (isdigit(ch) || isalpha(ch) || ch == '-' || ch == '.') {
      x += ch;
      ch = C();
    }
  }
  inline void Readchstring(char s[]) {
    int len = 0;
    char ch = C();
    while (!isdigit(ch) && !isalpha(ch)) ch = C();
    while (isdigit(ch) || isalpha(ch)) {
      s[len++] = ch;
      ch = C();
    }
    s[len] = '\0';
  }
  inline void Specialread(bool &x) {
    char c = C();
    while (c != '#' && c != '.' && c != '=' && c != 'B') c = C();
    x = c == '#';
  }
} In;
inline void Read(int &x) { x = In(); }
inline void Read(int &x, int &y) {
  x = In();
  y = In();
}
inline void Read(int &x1, int &x2, int &x3) {
  x1 = In();
  x2 = In();
  x3 = In();
}
inline void Read(int &x1, int &x2, int &x3, int &x4) {
  x1 = In();
  x2 = In();
  x3 = In();
  x4 = In();
}
inline void Read(long long &x) { x = In.Readll(); }
inline void Read(long long &x, long long &y) {
  x = In.Readll();
  y = In.Readll();
}
inline void Read(long long &x1, long long &x2, long long &x3) {
  x1 = In.Readll();
  x2 = In.Readll();
  x3 = In.Readll();
}
inline void Read(long long &x1, long long &x2, long long &x3, long long &x4) {
  x1 = In.Readll();
  x2 = In.Readll();
  x3 = In.Readll();
  x4 = In.Readll();
}
inline void FILEIO() {}
inline void FILEIO(string pname) {
  freopen((pname + ".in").c_str(), "r", stdin);
  freopen((pname + ".out").c_str(), "w", stdout);
}
void Printtime() {}
void END() {
  Printtime();
  exit(0);
}
template <typename T>
void END(T mes) {
  cout << mes << endl;
  END();
}
using namespace std;
template <typename T>
void Print(T _a[], int _s, int _t, char sp = ' ', char ed = '\n') {
  for (int i = _s; i <= _t; i++) cout << _a[i] << sp;
  cout << ed;
  cout.flush();
}
int n, s;
vector<int> e[100010];
int cnt = 0;
void Dfs(int pos, int fa) {
  if (e[pos].size() == 1) ++cnt;
  for (register int(i) = 0; (i) < (e[pos].size()); ++(i)) {
    int v = e[pos][i];
    if (v == fa) continue;
    Dfs(v, pos);
  }
}
int main() {
  FILEIO();
  Read(n, s);
  for (register int(i) = 1; (i) <= (n - 1); ++(i)) {
    int a;
    Read(a);
    ;
    int b;
    Read(b);
    ;
    ;
    e[a].push_back(b);
    e[b].push_back(a);
  }
  Dfs(1, 0);
  printf("%.9lf\n", ((double)s * 2.0) / (double)cnt);
  END();
}
