Earnings Per Share - Reconciliation of Numerator and Denominator of Basic and Diluted Earnings Per Share (Parenthetical) (Detail) - shares |
3 Months Ended | 6 Months Ended | ||
|---|---|---|---|---|
Nov. 30, 2023 |
Nov. 30, 2022 |
Nov. 30, 2023 |
Nov. 30, 2022 |
|
| Stock-Based Compensation Plans | ||||
| Antidilutive Securities Excluded From Computation Of Earnings Per Share [Line Items] | ||||
| Shares excluded from the calculation of diluted earnings per share | 360,000 | 700,000 | 280,000 | 720,000 |