Variable-length quantity solution