code: public int first() {
          long remaining;
          long next;
  
          remaining = data;
          while (true) {
              next = remaining / BASE;
              if (next == 0) {
                  return (int) remaining - 1;
              }
              remaining = next;
          }
      }
docs: -- prefix methods