#include <bits/stdc++.h>
int main() {
  int T;
  long long int n, x, c, f;
  scanf("%d\n", &T);
  for (f = 0; f < T; f++) {
    scanf("%lld %lld", &n, &x);
    c = 2 * x;
    printf("%lld\n", c);
  }
}
