#include <bits/stdc++.h>
using namespace std;
int MAX_INT = numeric_limits<int>::max();
int MIN_INT = numeric_limits<int>::min();
long long MAX_LL = numeric_limits<long long>::max();
long long MIN_LL = numeric_limits<long long>::min();
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  int n;
  int x;
  for (int h = 0; h < t; h++) {
    cin >> n >> x;
    cout << 2 * x << endl;
  }
}
