#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using maxHeap = priority_queue<int>;
using minHeap = priority_queue<int, vector<int>, greater<int>()>;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int t, n, x;
  for (cin >> t; t; t--) {
    cin >> n >> x;
    cout << 2 * x << '\n';
  }
  return 0;
}
