#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long t;
  cin >> t;
  for (long long _ = (0); _ < (t); _++) {
    long long n, x;
    cin >> n >> x;
    cout << 2 * x << '\n';
  }
  return 0;
}
