#include <bits/stdc++.h>   using namespace std;   int n, x, y, u, v, to[600005], nxt[600005], p[300005], sz[300005];   void dfs(int x, int lst) {     sz[x] = 1;     for (int i = p[x]; i != -1; i = nxt[i])       if (to[i] != lst) {         dfs(to[i], x);         sz[x] += sz[to[i]];       }   }   int main() {     scanf( %d%d%d , &n, &x, &y);     memset(p, -1, sizeof p);     for (int i = 1; i < n; i++) {       scanf( %d%d , &u, &v);       to[i * 2 - 1] = v, nxt[i * 2 - 1] = p[u], p[u] = i * 2 - 1;       to[i * 2] = u, nxt[i * 2] = p[v], p[v] = i * 2;     }     dfs(x, -1);     long long ans = sz[y];     dfs(y, -1);     ans *= sz[x];     cout << 1LL * n * (n - 1) - ans << endl;     return 0;   }   