#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 1e5 + 5;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, x;
    cin >> n >> x;
    cout << 2 * x << endl;
  }
}
