See https://www.irs.gov/publications/p505#en_US_2023_publink1000194557
View solution in original post