It's complicated. Consider a full-wave bridge rectifier as the most efficient for transformer utilization.
Working backwards, for a 30V output the LM338 would like 3-5V headroom so 33-35Vin.
Example 1182M12 24VCT 3.33A 80VA transformer gives about 32VDC under full load and 35VDC under no-load, and good for 2A DC.
But note the IC's available output current drops
Fig. 2 with high >30V input-output differentials, due to SOA protection, so at a 5V output you it would get only around 1.2A with >30V input. The IC has to drop over 25V and it can't do that at full current.
This is why (tap) switching to lower voltage transformer winding is done.
If you DPDT switched the transformer secondaries from 24V to 12V, you could get 14.6VDC under full load and 16.2VDC under no-load, so I would expect around 12VDC max. output voltage and good for 4.1A DC.
My numbers are just rough calculations, AC mains varies and can be 115V or 120V and I used 9.7% regulation spec for the 80VA transformer.