#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, m, d, a = 0, b = 0, c = 0, x, y, z, r, count = 0, i, j, k,
                         sum = 0, ans = 0, l, xx, sign = 1;
  cin >> n >> x;
  cout << x * 2 << "\n";
}
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int main() {
  fast();
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
