#include <bits/stdc++.h>
using namespace std;
unsigned long long t;
int main() {
  const int INF = 2147483647;
  cin >> t;
  for (unsigned long long i = 0; i < t; ++i) {
    unsigned long long n, x;
    cin >> n >> x;
    cout << 2 * x << endl;
  }
  return 0;
}
