#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const int N = 1e6 + 1;
void checkmate() {
  int n;
  cin >> n >> n;
  cout << (2 * n) << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) checkmate();
  return 0;
}
