#include <bits/stdc++.h>
using namespace std;
const int MX = 2e5 + 5, MXX = 23;
const long long mod = 1e9 + 7, inf = 1e18 + 6;
int T;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(9);
  cin >> T;
  while (T--) {
    int n, x;
    cin >> n >> x;
    cout << 2 * x << endl;
  }
  return 0;
}
