#include <bits/stdc++.h>
#pragma GCC omptimize("unroll-loops")
#pragma optimize("SEX_ON_THE_BEACH")
#pragma GCC optimize("no-stack-protector")
#pragma comment(linker, "/STACK:1000000000")
using namespace std;
const int INF32 = 1e9;
const int sz = 1e4;
const long long INF64 = 1e18;
void Solve() {
  int n, x;
  cin >> n >> x;
  cout << (x << 1) << endl;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int q;
  cin >> q;
  while (q--) Solve();
}
