#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, x;
  scanf("%d", &t);
  for (int test = 1; test <= t; test++) {
    scanf("%d%d", &n, &x);
    printf("%d\n", x * 2);
  }
  return 0;
}
