#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
const long long int infP = 1e18;
void solve() {
  long long int n, x;
  cin >> n >> x;
  cout << 2 * x << "\n";
}
void debug(long long int tt) {}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
