Frame it by escalating timelines under the Mental Healthcare Act 2017 for someone admitted on their own request.
Initial independent admission runs short, but the question asks for the outer limit. When stay must go past 30 days, or there is readmission inside 7 days, the law requires assessment by two psychiatrists and reporting to the Mental Health Review Board. With that safeguard, the admission can be held up to a maximum of 90 days, with consent reviewed fortnightly and a community-care plan made.
The smaller numbers are decoys tied to emergency or review checkpoints, not the maximum. So the maximum voluntary admission duration is 90 days. Ref: MHA 2017.