UNITED STATES
 SECURITIES AND EXCHANGE COMMISSION
 WASHINGTON, D.C. 20549

 FORM 10-K

 ANNUAL REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934

 For the fiscal year ended December 31, 2023
 OR

 TRANSITION REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934

 For the transition period from ______to_______
 Commission file number 1-183

 THE HERSHEY CO MPANY
 (Exact name of registrant as specified in its charter)

 Delaware
 23-0691590

 (State or other jurisdiction of incorporation or organization)
 (I.R.S. Employer Identification No.)

 19 East Chocolate Avenue, Hershey, PA 17033
 (Address of principal executive offices and Zip Code)

 ( 717) 534-4200
 (Registrant's telephone number, including area code)

 Securities registered pursuant to Section 12(b) of the Act:

 Title of each class
 Trading Symbol(s)
 Name of each exchange on which registered

 Common Stock, one dollar par value
 HSY
 New York Stock Exchange

 Securities registered pursuant to Section 12(g) of the Act: Class B Common Stock, one dollar par value

 Indicate by check mark if the registrant is a well-known seasoned issuer, as defined in Rule 405 of the Securities Act. Yes No

 Indicate by check mark if the registrant is not required to file reports pursuant to Section 13 or Section 15(d) of the Act. Yes No

 Indicate by check mark whether the registrant (1) has filed all reports required to be filed by Section 13 or 15(d) of the Securities Exchange Act of 1934 during the preceding 12 months (or for such shorter period that the registrant was required to file such reports), and (2) has been subject to such filing requirements for the past 90 days. Yes No

 Indicate by check mark whether the registrant has submitted electronically every Interactive Data File required to be submitted pursuant to Rule 405 of Regulation S-T (§232.405 of this chapter) during the preceding 12 months (or for such shorter period that the registrant was required to submit such files). Yes No

 Indicate by check mark whether the registrant is a large accelerated filer, an accelerated filer, a non-accelerated filer, a smaller reporting company, or an emerging growth company. See the definitions of "large accelerated filer," "accelerated filer," "smaller reporting company" and "emerging growth company" in Rule 12b-2 of the Exchange Act.

 Large accelerated filer

 Accelerated filer

 Non-accelerated filer

 Smaller reporting company

 Emerging growth company

 If an emerging growth company, indicate by check mark if the registrant has elected not to use the extended transition period for complying with any new or revised financial accounting standards provided pursuant to Section 13(a) of the Exchange Act.

 Indicate by check mark whether the registrant has filed a report on and attestation to its management's assessment of the effectiveness of its internal control over financial reporting under Section 404(b) of the Sarbanes-Oxley Act (15 U.S.C. 7262(b)) by the registered public accounting firm that prepared or issued its audit report.

 If securities are registered pursuant to Section 12(b) of the Act, indicate by check mark whether the financial statements of the registrant included in the filing reflect the correction of an error to previously issued financial statements.

 Indicate by check mark whether any of those error corrections are restatements that required a recovery analysis of incentive-based compensation received by any of the registrant's executive officers during the relevant recovery period pursuant to § 240.10D-1(b).
 Indicate by check mark whether the registrant is a shell company (as defined in Rule 12b-2 of the Exchange Act). Yes No

 As of June 30, 2023 (the last business day of the registrant's most recently completed second fiscal quarter), the aggregate market value of the voting and non-voting common equity held by non-affiliates was $ 36,849,433,110. Class B Common Stock is not listed for public trading on any exchange or market system. However, Class B shares are convertible into shares of Common Stock at any time on a share-for-share basis. Determination of aggregate market value assumes all outstanding shares of Class B Common Stock held by non-affiliates were converted to Common Stock as of June 30, 2023. The market value indicated is calculated based on the closing price of the Common Stock on the New York Stock Exchange on June 30, 2023 ($ 249.70 per share).

 Indicate the number of shares outstanding of each of the registrant's classes of common stock, as of the latest practicable date.
 Common Stock, one dollar par value— 149,336,442 shares, as of February 16, 2024.
 Class B Common Stock, one dollar par value— 54,613,514 shares, as of February 16, 2024.

 DOCUMENTS INCORPORATED BY REFERENCE
 Portions of the Company's Proxy Statement for the 2024 Annual Meeting of Stockholders are incorporated by reference into Part III of this Annual Report on Form 10-K.

 Annual Report on Form 10-K
 For the Fiscal Year Ended December 31, 2023

 Item 1.

 Business

 Item 1A.

 Risk Factors

 Item 1B.

 Unresolved Staff Comments

 Item 1C.

 Cybersecurity

 Item 2.

 Properties

 Item 3.

 Legal Proceedings

 Item 4.

 Mine Safety Disclosures

 Supplemental Item

 Information About Our Executive Officers

 Item 5.

 Market for Registrant's Common Equity, Related Stockholder Matters and Issuer Purchases of Equity Securities

 Item 6.

 [Reserved]

 Item 7.

 Management's Discussion and Analysis of Financial Condition and Results of Operations

 Item 7A.

 Quantitative and Qualitative Disclosures About Market Risk

 Item 8.

 Financial Statements and Supplementary Data

 Item 9.

 Changes in and Disagreements with Accountants on Accounting and Financial Disclosure

 Item 9A.

 Controls and Procedures

 Item 9B.

 Other Information

 Item 9C.

 Disclosure Regarding Foreign Jurisdictions that Prevent Inspections

 Item 10.

 Directors, Executive Officers and Corporate Governance

 Item 11.

 Executive Compensation

 Item 12.

 Security Ownership of Certain Beneficial Owners and Management and Related Stockholder Matters

 Item 13.

 Certain Relationships and Related Transactions, and Director Independence

 Item 14.

 Principal Accountant Fees and Services

 Item 15.

 Exhibits and Financial Statement Schedules

 Item 16.

 Form 10-K Summary

 Signatures

 Schedule II—Valuation and Qualifying Accounts

 Cautionary Note Regarding Forward-Looking Statements
 This Annual Report on Form 10-K, including the exhibits hereto and the information incorporated by reference herein, contains "forward-looking statements" within the meaning of the Private Securities Litigation Reform Act of 1995. Many of these forward-looking statements can be identified by the use of words such as "anticipate," "assume," "believe," "continue," "estimate," "expect," "forecast," "future," "intend," "plan," "potential," "predict," "project," "strategy," "target" and similar terms, and future or conditional tense verbs like "could," "may," "might," "should," "will" and "would," among others. Forward-looking statements are predictions only and actual results could differ materially from management's expectations due to a variety of factors, including those described below in Item 1A. "Risk Factors" and in Item 7. "Management's Discussion and Analysis of Financial Condition and Results of Operations." All forward-looking statements attributable to us or persons working on our behalf are expressly qualified in their entirety by such risk factors. Given these risks and uncertainties, you should not rely on forward-looking statements as a prediction of actual results. The forward-looking statements that we make in this Annual Report on Form 10-K are based on management's current views and assumptions regarding future events and speak only as of their dates. We assume no obligation to update developments of these risk factors or to announce publicly any revisions to any of the forward-looking statements that we make, or to make corrections to reflect future events or developments, except as required by the federal securities laws.

 The Hershey Company | 2023 Form 10-K | Page 1

 Item 1. BUSINESS
 The Hershey Company was incorporated under the laws of the State of Delaware on October 24, 1927 as a successor to a business founded in 1894 by Milton S. Hershey. In this report, the terms "Hershey," "Company," "we," "us" or "our" mean The Hershey Company and its wholly-owned subsidiaries and entities in which it has a controlling financial interest, unless the context indicates otherwise.
 Hershey is a global confectionery leader known for making more moments of goodness through chocolate, sweets, mints and other great tasting snacks. We are the largest producer of quality chocolate in North America, a leading snack maker in the United States and a global leader in chocolate and non-chocolate confectionery. We market, sell and distribute our products under more than 90 brand names in approximately 80 countries worldwide.
 Reportable Segments
 The Company reports its operations through three segments: (i) North America Confectionery, (ii) North America Salty Snacks and (iii) International. This organizational structure aligns with how our Chief Operating Decision Maker ("CODM") manages our business, including resource allocation and performance assessment, and further aligns with our product categories and the key markets we serve.
 • North America Confectionery – This segment is responsible for our traditional chocolate and non-chocolate confectionery market position in the United States and Canada. This includes our business in chocolate and non-chocolate confectionery, gum and refreshment products, protein bars, spreads, snack bites and mixes, as well as pantry and food service lines. This segment also includes our retail operations, including Hershey's Chocolate World stores in Hershey, Pennsylvania; New York, New York; Las Vegas, Nevada; Niagara Falls (Ontario) and Singapore, as well as operations associated with licensing the use of certain of the Company's trademarks and products to third parties around the world.
 • North America Salty Snacks – This segment is responsible for our salty snacking products in the United States. This includes ready-to-eat popcorn, baked and trans fat free snacks, pretzels and other snacks.
 • International – International is a combination of all other operating segments that are not individually material, including those geographic regions where we operate outside of North America. We currently have operations and manufacture product in Mexico, Brazil, India and Malaysia, primarily for consumers in these regions, and also distribute and sell confectionery products in export markets of Asia, Latin America, Middle East, Europe, Africa and other regions.
 Financial and other information regarding our segments is provided in our Management's Discussion and Analysis and Note 13 to the Consolidated Financial Statements.
 Business Acquisitions and Divestitures
 On May 31, 2023, we completed the acquisition of certain assets that provide additional manufacturing capacity from Weaver Popcorn Manufacturing, Inc. ("Weaver"), a leader in the production and co-packing of microwave popcorn and ready-to-eat popcorn, and former co-manufacturer of the Company's SkinnyPop brand.
 In December 2021, we completed the acquisition of Pretzels Inc. ("Pretzels"), previously a privately held company that manufactures and sells pretzels and other salty snacks for other branded products and private labels in the United States. Pretzels is an industry leader in the pretzel category with a product portfolio that includes filled, gluten free and seasoned pretzels, as well as extruded snacks that complements Hershey's snacks portfolio. Based in Bluffton, Indiana, Pretzels operates three manufacturing locations in Indiana and Kansas. Pretzels provides Hershey deep pretzel category and product expertise and the manufacturing capabilities to support brand growth and future pretzel innovation. Additionally in December 2021, we completed the acquisition of Dot's Pretzels, LLC ("Dot's"), previously a privately held company that produces and sells pretzels and other snack food products to retailers and distributors in the United States, with Dot's Homestyle Pretzels snacks as its primary product, which complements Hershey's snacks portfolio.
 In June 2021, we completed the acquisition of Lily's Sweets, LLC ("Lily's"), previously a privately held company that sells a line of sugar-free and low-sugar confectionery foods to retailers and distributors in the United States and

 The Hershey Company | 2023 Form 10-K | Page 2

 Canada. Lily's products include dark and milk chocolate style bars, baking chips, peanut butter cups and other confection products that complement Hershey's confectionery and confectionery-based portfolio.
 In January 2021, we completed the divestiture of Lotte Shanghai Foods Co., Ltd. ("LSFC"), which was previously included within the International segment results in our consolidated financial statements. Total proceeds from the divestiture and the impact on our consolidated financial statements were immaterial.
 Products and Brands
 Our principal product offerings include chocolate and non-chocolate confectionery products; gum and mint refreshment products and protein bars; snack items such as popcorn, pretzels, spreads, snack bites and mixes; and pantry items, such as baking ingredients, toppings and beverages.
 • Within our North America Confectionery segment, our product portfolio includes a wide variety of chocolate offerings marketed and sold under the renowned brands of Hershey's, Reese's and Kisses, along with other popular chocolate and non-chocolate confectionery brands such as Jolly Rancher, Almond Joy, Brookside, barkTHINS, Cadbury, Good & Plenty, Heath, Kit Kat, Payday, Rolo, Twizzlers, Whoppers and York. Our protein bar products include ONE bar and our gum and mint products include Ice Breakers mints and chewing gum, Breath Savers mints and Bubble Yum bubble gum. We also have pantry items, including baking products, toppings and sundae syrups sold under the Hershey's, Reese's, Heath and Lily's brands, as well as Hershey's and Reese's chocolate spreads and snack bites and mixes.
 • Within our North America Salty Snacks segment, we have our salty snack items. This includes ready-to-eat SkinnyPop popcorn, baked and trans fat free Pirates Booty snacks and Dot's Homestyle Pretzels snacks.
 • Within our International segment, we manufacture, market and sell many of these same brands, as well as other brands that are marketed regionally, such as Pelon Pelo Rico confectionery products in Mexico, IO-IO snack products in Brazil and Sofit beverage products in India.
 Principal Customers and Marketing Strategy
 Our customers are mainly wholesale distributors, chain grocery stores, mass merchandisers, chain drug stores, vending companies, wholesale clubs, convenience stores, dollar stores, concessionaires and department stores. The majority of our customers, with the exception of wholesale distributors, resell our products to end-consumers in retail outlets in North America and other locations worldwide.
 In 2023, approximately 28% of our consolidated net sales were made to McLane Company, Inc., one of the largest wholesale distributors in the United States ("U.S.") to convenience stores, drug stores, wholesale clubs and mass merchandisers and the primary distributor of our products to Wal-Mart Stores, Inc.
 The foundation of our marketing strategy is our strong brand equities, product innovation and the consistently superior quality of our products. We devote considerable resources to the identification, development, testing, manufacturing and marketing of new products. We utilize a variety of promotional programs directed towards our customers, as well as advertising and promotional programs for consumers of our products, to stimulate sales of certain products at various times throughout the year.
 In conjunction with our sales and marketing efforts, our efficient product distribution network helps us maintain sales growth and provide superior customer service by facilitating the shipment of our products from our manufacturing plants to strategically located distribution centers. We primarily use common carriers to deliver our products from these distribution points to our customers.

 The Hershey Company | 2023 Form 10-K | Page 3

 Raw Materials and Pricing
 Cocoa products, including cocoa liquor, cocoa butter and cocoa powder processed from cocoa beans, are the most significant raw materials we use to produce our chocolate products. These cocoa products are purchased directly from third-party suppliers, who source cocoa beans that are grown principally in Far Eastern, West African, Central and South American regions. West Africa accounts for approximately 70% of the world's supply of cocoa beans.
 Adverse changes in climate or extreme weather, crop disease, political unrest and other problems in cocoa-producing countries have caused price fluctuations in the past, but have never resulted in the total loss of a particular producing country's cocoa crop and/or exports. In the event that a significant disruption occurs in any given country, we believe cocoa from other producing countries and from current physical cocoa stocks in consuming countries would provide a significant supply buffer.
 Our trading company in Switzerland performs all aspects of cocoa procurement, including price risk management, physical supply procurement and sustainable sourcing oversight. The trading company optimizes the supply chain for our cocoa requirements, with a strategic focus on gaining real time access to cocoa market intelligence. It also provides us with the ability to recruit and retain world class commodities traders and procurement professionals and enables enhanced collaboration with commodities trade groups, the global cocoa community and sustainable sourcing resources.
 We also use substantial quantities of sugar, corn products, Class II and IV dairy products, wheat products, peanuts, almonds and energy in our production process. Most of these inputs for our domestic and Canadian operations are purchased from suppliers in the United States. For our international operations, inputs not locally available may be imported from other countries.
 We change prices and weights of our products when necessary to accommodate changes in input costs, the competitive environment and profit objectives, while at the same time maintaining consumer value. Price increases and weight changes help to offset increases in our input costs, including raw and packaging materials, fuel, utilities, transportation costs and employee benefits. When we implement price increases, there is usually a time lag between the effective date of the list price increases and the impact of the price increases on net sales, in part because we typically honor previous commitments to planned consumer and customer promotions and merchandising events subsequent to the effective date of the price increases. In addition, promotional allowances may be increased subsequent to the effective date, delaying or partially offsetting the impact of price increases on net sales.
 Competition
 Many of our confectionery and salty snack brands enjoy wide consumer acceptance and are among the leading brands sold in the marketplace in North America and certain international markets. We sell our brands in highly competitive markets with many other global multinational, national, regional and local firms. Some of our competitors are large private companies, as well as large retailers, that have significant resources and substantial international operations. Competition in our product categories is based on product innovation, product quality, price, brand recognition and loyalty, effectiveness of marketing and promotional activity, the ability to identify and satisfy consumer preferences, as well as convenience and service. We have also experienced increased competition from other snack items, and through innovation and acquisitions, we are continuing to expand the boundaries of our brands to capture new snacking occasions.
 Working Capital, Seasonality and Backlog
 Our sales are typically higher during the third and fourth quarters of the year, representing seasonal and holiday-related sales patterns. We manufacture primarily for stock and typically fill customer orders within a few days of receipt. Therefore, the backlog of any unfilled orders is not material to our total annual sales. Additional information relating to our cash flows from operations and working capital practices is provided in our Management's Discussion and Analysis.

 The Hershey Company | 2023 Form 10-K | Page 4

 Trademarks, Service Marks and License Agreements
 We own various registered and unregistered trademarks and service marks. The trademarks covering our key product brands are of material importance to our business. Depending on the country, trademarks remain valid for as long as they are in use or their registration status is maintained. Trademark registrations generally are renewable for fixed terms. We follow a practice of seeking trademark protection in the United States and other key international markets where our products are sold. We also grant trademark licenses to third parties to produce and sell pantry items, flavored milks and various other products primarily under the Hershey's and Reese's brand names.
 Furthermore, we have rights under license agreements with several companies to manufacture and/or sell and distribute certain products. Our rights under these agreements are extendible on a long-term basis at our option. Our most significant licensing agreements are as follows:

 Company

 Brand
 Location
 Requirements

 Kraft Foods Ireland Intellectual Property Limited/Cadbury UK Limited
 York
Peter Paul Almond Joy
Peter Paul Mounds
 Worldwide

 None

 Cadbury UK Limited
 Cadbury
Caramello

 Minimum sales requirement exceeded in 2023

 Soci t des Produits Nestl SA

 Kit Kat
 Rolo

 Minimum unit volume sales exceeded in 2023

 Iconic IP Interests, LLC
 Good & Plenty
 Heath
 Jolly Rancher
 Milk Duds
 Payday
 Whoppers

 Worldwide

 None

 Research and Development
 We engage in a variety of research and development activities in a number of countries, including the U.S., Mexico, Brazil, India and Malaysia. We develop new products, improve the quality of existing products, improve and modernize production processes and develop and implement new technologies to enhance the quality and value of both current and proposed product lines. Information concerning our research and development expense is contained in Note 1 to the Consolidated Financial Statements.
 Food Quality and Safety Regulation
 The manufacture and sale of consumer food products is highly regulated. In the U.S., our activities are subject to regulation by various government agencies, including the Food and Drug Administration, the Department of Agriculture, the Federal Trade Commission, the Department of Commerce and the Environmental Protection Agency, as well as various state and local agencies. Similar agencies also regulate our businesses outside of the U.S.
 We believe our Product Excellence Program provides us with an effective product quality and safety program. This program is integral to our global supply chain platform and is intended to ensure that all products we purchase, manufacture and distribute are safe, are of high quality and comply with applicable laws and regulations.
 Through our Product Excellence Program, we evaluate our supply chain including ingredients, packaging, processes, products, distribution and the environment to determine where product quality and safety controls are necessary. We identify risks and establish controls intended to ensure product quality and safety. Various government agencies and third-party firms, as well as our quality assurance staff, conduct audits of all facilities that manufacture our products to assure effectiveness and compliance with our program and applicable laws and regulations.

 The Hershey Company | 2023 Form 10-K | Page 5

 Environmental Considerations
 Beyond ordinary operating and capital expenditures that we make to comply with government regulations, including environmental laws and regulations, we have made a number of voluntary commitments to drive long-term growth and business resilience and reduce our environmental impacts, including efforts to eliminate commodity-driven deforestation and reduce greenhouse gas ("GHG") emissions across our own operations and supply chain. Our climate change related investments and expenditures primarily focus on achieving a 50% absolute reduction in our Scope 1 and 2 GHG emissions and a 25% absolute reduction in our Scope 3 GHG emissions by 2030 (compared to a 2018 baseline), as well as having 100% of plastic packaging be recyclable, reusable or compostable and eliminating 25 million pounds of packaging by 2030. All of our climate-related investments are in progress or on track as outlined in our Environmental, Social and Governance ("ESG") Report. The annual operating and capital expenditures associated with these ordinary course payments and additional climate change commitments are not material with respect to our results of operations, capital expenditures or competitive position.
 Sustainability
 The Company's commitment to sustainability started with our founder's belief in responsible citizenship. He was a purpose-driven leader who believed we could use chocolate to Make More Moments of Goodness in the world for our consumers today and for many generations to come. This belief resulted in a strong investment in local communities and the establishment of Milton Hershey School for disadvantaged kids. We continue that legacy today through our global sustainability strategy: Our Shared Goodness Promise, which guides how we empower the remarkable people who make and sell our brands, interact with farming communities that grow our ingredients, deliver on our commitments to consumers, customers, and external stakeholders, protect the environment and support children and youth.
 To learn more about our ESG-related goals, progress and initiatives, as well as review our annual ESG Report and accompanying suite of ESG reporting frameworks, policies, and disclosures, access the Sustainability section of our website at:  Information found on the Company's website is not part of this Annual Report on Form 10-K or any other report filed with the United States Securities and Exchange Commission ("SEC").
 Financial Information by Geographic Area
 Our principal operations and markets are located in the United States. The percentage of total consolidated net sales for our businesses outside of the United States was 12.7% for 2023, 12.5% for 2022 and 13.0% for 2021. The percentage of total long-lived assets outside of the United States was 17.4% as of December 31, 2023 and 17.9% as of December 31, 2022.
 Human Capital
 As of December 31, 2023, the Company employed approximately 18,650 full-time and 1,855 part-time employees worldwide. Collective bargaining agreements covered approximately 6,295 employees, or approximately 31% of the Company's employees worldwide. During 2024, agreements are expected to be negotiated for certain employees at five facilities, four of which are outside of the United States, comprising approximately 72% of total employees under collective bargaining agreements. We believe our efforts in managing our workforce have been effective, as evidenced by a strong culture and a good relationship between the Company and our employees.
 We are a purpose-driven company and for more than a century, our iconic brands have been built on a foundation of community investment and connections between people around the world. We could not have achieved this without our remarkable employees who make our purpose a reality. As a result, our human capital strategies are material to our operations and core to the long-term success of the Company.
 • Our People, Safety and Employee Engagement. Our employees are among our most important resources and are critical to our continued success. We provide a workplace that develops, supports and motivates our people. The overall well-being and safety of our employees remains one of our top priorities. We continue to invest in training, workplace resources and leading systems and processes to ensure the responsible management of all facilities. Additionally, continuous listening surveys are distributed throughout the year to all employees globally to hear their thoughts on the Company's direction and their place in it. These continuous touchpoints allow for real-time feedback and action from the Company. These surveys are further

 The Hershey Company | 2023 Form 10-K | Page 6

 supplemented with quarterly and informative enterprise and team town halls, which, in conjunction with the continuous listening surveys, generate stronger employee engagement with the Company's strategy, initiatives and leadership.
 • Talent Acquisition, Development and Training. Hiring and developing our employees is critically important to our operations and we are focused on creating experiences and programs that foster growth and performance. We provide all employees the chance to learn, grow and own their work. We have partnered with leading online content experts and increased internal learning development to expand our catalog of online and classroom courses. Additionally, we co-created a culture of development with the enthusiastic support of our employees. Through individual development plans, learning opportunities, feedback and coaching, employees can build careers at The Hershey Company, as evidenced by the fact that the majority of our ten executive officers were promoted from within the organization (see Information about Our Executive Officers).
 • Compensation, Benefits and Wellness. In addition to offering competitive, fair and transparent compensation, we also offer a suite of benefits, including comprehensive health and meaningful retirement benefits to eligible employees, tying incentive compensation to both business and individual performance, offering parental leave and adoption benefits and maintaining an employee stock purchase plan. We also provide a number of innovative programs designed to promote physical and emotional well-being, including ergonomic workspaces, a state-of-the-art fitness center at our Hershey, Pennsylvania campus and private rooms designed for quiet reflection, prayer or wellness breaks. The Company also offers SmartFlex benefits which is our suite of policies that allows individuals to create their own balance between work and personal life, including flexing work time based on work priorities or personal commitments, such as caring for children or family members. We believe that this flexibility improves productivity, boosts job satisfaction and increases employee engagement. Additionally, the Company offers a "Best of Both" flexible work model for corporate and commercial employees to balance work and personal well-being. This model allows employees the option to work either remotely, in-office, or both, depending on individual needs, personal schedules and work demands. This offers the benefits of flexibility and in-person collaboration, while maintaining productivity and overall job satisfaction.
 • Diversity, Equity and Inclusion. Our diverse and inclusive culture makes the difference across all areas of the business around the world. Our gender representation includes women occupying many of the top positions in the Company, including Chief Executive Officer and Chairman of the Board, Chief Accounting Officer and President, Salty Snacks, and approximately 50% representation across the Company. Additionally, five of our 11 Board members are women (45% representation). In 2023, we maintained fair and equitable pay achievements, including 1:1 aggregate people of color pay equity (2021) and 1:1 aggregate gender pay (2020) for salaried employees in the United States. Further, our eight employee-led Business Resource Groups, which include Abilities First, Black Heritage, Asian and Pacific Islander, GenH (Generations), Latino, Prism (LGBTQ), Veteran's and Women's, play a critical role in attracting diverse talent, providing mentoring and career development opportunities, delivering commercial business insights and connecting people to the Company and the communities where we do business. In 2023, the Company was ranked #3 on DiversityInc's Top 50 Companies for Diversity and was ranked as a top 50 company on Forbes Top Companies for Women. Additionally, the Company also ranked as a top 30 company on Wall Street Journal's Top 250 Best-Managed Companies of 2023, and was recognized as a Best Place to Work for Disability Inclusion based on our Disability Equality Index score.
 • Community and Social Impact. Our philanthropy and volunteerism efforts reflect how we live out the Company's value of Making More Moments of Goodness, from supporting causes our employees care about to investing in the long-term success of the communities where we live and work. We work closely with counterparts in each of our plant and office locations across the United States and globally to identify local community needs and craft tailored approaches to provide support. This work includes forging partnerships with local non-governmental organizations, providing grants and contributions and organizing volunteer service activities and employee fundraisers.

 The Hershey Company | 2023 Form 10-K | Page 7

 Business Realignment Activities and Strategic Initiatives
 From time to time, we implement business realignment activities to support key strategic initiatives designed to maintain long-term growth. Further to such goal, we completed our International Optimization Program in 2023, an initiative which began in the fourth quarter of 2020 and was designed to increase our operating effectiveness and efficiency, to reduce our costs and/or to generate savings that can be reinvested in other areas of our business.

 In February 2024, the Board of Directors approved the Advancing Agility & Automation Initiative, which is a multi-year productivity program to improve supply chain and manufacturing-related spend, optimize selling, general and administrative expenses, leverage new technology and business models to further simplify and automate processes, and generate long-term savings.

 Costs associated with business realignment activities are classified in our Consolidated Statements of Income as described in Note 9 to the Consolidated Financial Statements.
 Available Information
 The Company's website address is www.thehersheycompany.com. We file or furnish annual, quarterly and current reports, proxy statements and other information, including amendments to these reports, with the SEC. You may obtain a copy of any of these reports, free of charge, from the Investors section of our website as soon as reasonably practicable after we electronically file such material with, or furnish it to, the SEC. The SEC maintains an Internet site that also contains these reports at www.sec.gov. In addition, copies of the Company's annual report will be made available, free of charge, on written request to the Company.
 We have a Code of Conduct that applies to our Board of Directors ("Board") and all Company officers and employees, including, without limitation, our Chief Executive Officer and "senior financial officers" (including the Chief Financial Officer, Chief Accounting Officer and persons performing similar functions). You can obtain a copy of our Code of Conduct, as well as our Corporate Governance Guidelines and charters for each of the Board's standing committees, from the Investors section of our website at:  If we change or waive any portion of the Code of Conduct that applies to any of our directors, executive officers or senior financial officers, we will post that information on our website. Information found on the Company's website is not part of this Annual Report on Form 10-K or any other report filed with the SEC.

 The Hershey Company | 2023 Form 10-K | Page 8

 Item 1A. RISK FACTORS
 You should carefully read the following discussion of significant factors, events and uncertainties when evaluating our business and the forward-looking information contained in this Annual Report on Form 10-K. The events and consequences discussed in these risk factors could materially and adversely affect our business, operating results, liquidity and financial condition. While we believe we have identified and discussed below the key risk factors affecting our business, these risk factors do not identify all the risks we face, and there may be additional risks and uncertainties that we do not presently know or that we do not currently believe to be significant that may have a material adverse effect on our business, performance or financial condition in the future.
 Risks Related to Our Business and Operations
 Our Company's reputation or brand image might be impacted as a result of issues or concerns relating to the quality and safety of our products, ingredients or packaging, human and workplace rights, and other environmental, social or governance matters, which in turn could result in litigation or otherwise negatively impact our operating results.
 In order to sell our iconic, branded products, we need to maintain a good reputation with our customers, consumers, suppliers, vendors and employees, among others. Issues related to the quality and safety of our products, ingredients or packaging could jeopardize our Company's image and reputation. We have in the past recalled or removed certain products from store shelves, and may in the future need to do so again in the future. Negative publicity related to these types of concerns, or related to product contamination or product tampering, whether valid or not, could decrease demand for our products or cause production and delivery disruptions. In addition, negative publicity related to our environmental, social or governance practices could also impact our reputation with customers, consumers, suppliers and vendors.
 We have been in the past and in the future could potentially be subject to litigation or government actions as a result of issues or concerns relating to the quality and safety of our products, ingredients or packaging, human and workplace rights, and other environmental, social or governance matters, which could result in payments of fines or damages. Costs associated with these potential actions, as well as the potential impact on our reputation or ability to sell our products, could negatively affect our operating results.
 Disruption to our manufacturing operations or supply chain could impair our ability to produce or deliver finished products, resulting in a negative impact on our operating results.
 Approximately 72% of our manufacturing capacity is located in the United States. Disruption to our global manufacturing operations or our supply chain could result from, among other factors, the following:
 • Natural disasters;
 • Pandemics, epidemics or other outbreak of disease (such as the coronavirus disease 2019 ("COVID-19") global pandemic);
 • Climate change and severity of extreme weather;
 • Fires or explosions;
 • Terrorism or other acts of violence;
 • Labor strikes or other labor activities;
 • Unavailability of raw or packaging materials;
 • Third party service provider disruptions, such as cyber breaches or system failures;
 • Operational and/or financial instability of key suppliers, and other vendors or service providers; and
 • Suboptimal production planning which could impact our ability to cost-effectively meet product demand.

 We believe that we take adequate precautions to mitigate the impact of possible disruptions. We have strategies and plans in place to manage disruptive events if they were to occur, including our global supply chain strategies and our principle-based global labor relations strategy. If we are unable, or find that it is not financially feasible, to effectively plan for, mitigate or manage operational stability and business resiliency risks, particularly within our international markets and snacks portfolio, due to the potential impacts of such disruptive events on our manufacturing operations or supply chain, our financial condition and results of operations could be negatively impacted if such events were to occur.

 The Hershey Company | 2023 Form 10-K | Page 9

 We might not be able to hire, engage and retain the talented global human capital we need to drive our growth strategies.
 Our future success depends upon our ability to identify, hire, develop, engage and retain talented personnel across the globe. Competition for global talent is intense, and we might not be able to identify and hire the personnel we need to continue to evolve and grow our business. In particular, if we are unable to hire the right individuals to fill new or existing senior management positions as vacancies arise, our business performance may be adversely impacted.
 Activities related to identifying, recruiting, hiring and integrating qualified individuals require significant time and attention. We may also need to invest significant amounts of cash and equity to attract talented new employees, and we may never realize returns on these investments.
 In addition to hiring new employees, we must continue to focus on retaining and engaging the talented individuals we need to sustain our core business and lead our developing businesses into new markets, channels and categories. This may require significant investments in training, coaching and other career development and retention activities. If we are not able to effectively retain and grow our talent, our ability to achieve our strategic objectives will be adversely affected, which may negatively impact our financial condition and results of operations.
 Risks associated with climate change and other environmental impacts, and increased focus and evolving views of our customers, stockholders and other stakeholders on climate change issues, could negatively affect our business and operations.
 Climate-related changes can increase variability in, or otherwise impact, natural disasters, including weather patterns, with the potential for increased frequency and severity of significant weather events, natural hazards, rising mean temperature and sea levels, and long-term changes in precipitation patterns. Climate change or weather-related disruptions to our supply chain can impact the availability and cost of materials needed for manufacturing, which may increase insurance and other operating costs.
 Increased focus on climate change has led to legislative and regulatory efforts to combat both potential causes and adverse impacts of climate change, including regulation of GHG emissions. New or increasing laws and regulations related to GHG emissions and other climate change related concerns may adversely affect us, our suppliers and our customers, and may require the Company to invest in additional capital investments to maintain compliance. Our value chain faces similar challenges as our products rely on agricultural ingredients and a global supply chain. Climate change poses a significant and increasing risk to global food production systems and to the safety and resilience of the communities where we live, work and source our ingredients. The GHG impacts of land-use change are most pronounced in our cocoa supply chain, where we have already been working for several years to prevent deforestation and build climate resilience. Additionally, any non-compliance with legislative and regulatory requirements could negatively impact our reputation and ability to do business.
 Investors, customers, advisory services, government regulators and other market participants have increasingly focused on the environmental or sustainability practices of companies, including Hershey. Shareholders and financial institutions have increasingly evaluated a company's ESG practices, disclosures and performance before making investments or other financial decisions. We believe our sustainability practices, disclosures and performance are focused on the most material risks and opportunities to our business and support our environmental goals and continue to evolve to meet the growing needs of our stakeholders. However, if our environmental goals do not meet investor or other external stakeholder expectations and standards, our access to capital may be negatively impacted. An enforcement action for non-compliance with regulations or reporting requirements could harm our reputation, financial position and ability to grow. A failure to meet investor or other external stakeholder expectations or standards may adversely affect our results of operations, ability to manage our liquidity, or ability to implement our strategies.
 The Company publishes its environmental goals, with a particular focus on achieving a 50% absolute reduction in our Scope 1 and 2 GHG emissions and a 25% absolute reduction in our Scope 3 GHG emissions by 2030 (compared to a 2018 baseline), as well as having 100% of plastic packaging be recyclable, reusable or compostable and eliminating 25 million pounds of packaging by 2030. The costs of these voluntary commitments may be greater than expected, and there can be no assurance the Company will achieve its goals, or meet the evolving sustainability expectations and standards of our investors or other external stakeholders. Any failure to achieve our goals, a perception of our failure to act responsibly with respect to the environment, or failure to respond to new or evolving legal and regulatory

 The Hershey Company | 2023 Form 10-K | Page 10

 requirements or other sustainability concerns could adversely affect our business, reputation and increase risk of litigation.
 The effects and costs of climate change, or any failure to meet related requirements and expectations, could have a negative impact on our reputation, financial condition and results of operations.
 Risks Related to the Industry in Which We Operate
 Increases in raw material and energy costs along with the availability of adequate supplies of raw materials could affect future financial results.
 We use many different commodities for our business, including cocoa products, sugar, corn products, dairy products, wheat products, peanuts, almonds, natural gas and diesel fuel.
 Commodities are subject to price volatility and changes in supply caused by numerous factors, including:
 • Commodity market fluctuations;
 • Currency exchange rates;
 • Imbalances between supply and demand;
 • Rising levels of inflation and interest rates related to domestic and global economic conditions or supply chain issues;
 • The effects of climate change and extreme weather on crop yield and quality;
 • Speculative influences;
 • Trade agreements among producing and consuming nations;
 • Supplier compliance with commitments;
 • Import/export requirements for raw materials and finished goods;
 • Political unrest in producing countries;
 • Introduction of living income premiums or similar requirements;
 • Changes in governmental agricultural programs and energy policies; and
 • Other events beyond our control such as the impacts on the business or supply chain arising from the ongoing conflict between Russia and Ukraine.

 Although we use forward contracts and commodity futures and options contracts to hedge commodity prices where possible, commodity price increases ultimately result in corresponding increases in our raw material and energy costs. If we are unable to offset cost increases for major raw materials and energy, there could be a negative impact on our financial condition and results of operations.
 Price increases may not be sufficient to offset cost increases and maintain profitability or may result in sales volume declines associated with pricing elasticity.
 We may be able to pass some or all raw material, energy and other input cost increases to customers by increasing the selling prices of our products or decreasing the size of our products; however, higher product prices or decreased product sizes may also result in a reduction in sales volume and/or consumption. If we are not able to increase our selling prices or reduce product sizes (including if inflation outpaces our pricing elasticity) sufficiently, or in a timely manner, to offset increased raw material, energy or other input costs, including packaging, freight, direct labor, overhead and employee benefits, or if our sales volume decreases significantly, there could be a negative impact on our financial condition and results of operations.

 The Hershey Company | 2023 Form 10-K | Page 11

 Market demand for new and existing products could decline.
 We operate in highly competitive markets and rely on continued demand for our products. To generate revenues and profits, we must sell products that appeal to our customers and to consumers. Our continued success is impacted by many factors, including the following:

 • Effective retail execution;
 • Appropriate advertising campaigns and marketing programs;
 • Our ability to secure adequate shelf space at retail locations;
 • Our ability to drive sustainable innovation and maintain a strong pipeline of new products in the confectionery and broader snacking categories;
 • Our ability to react to changes in product category consumption;
 • Our response to consumer demographics and trends, including but not limited to, trends relating to store trips and the impact of the growing digital commerce channel; and
 • Consumer health and wellness concerns, including weight management (i.e., use of medications, dieting) and the consumption of certain ingredients.

 There continues to be competitive product and pricing pressures in the markets where we operate, as well as challenges in maintaining profit margins. We must maintain mutually beneficial relationships with our key customers, including retailers and distributors, to compete effectively. Our largest customer, McLane Company, Inc., accounted for approximately 28% of our total net sales in 2023. McLane Company, Inc. is one of the largest wholesale distributors in the United States to convenience stores, drug stores, wholesale clubs and mass merchandisers, including Wal-Mart Stores, Inc.
 Increased marketplace competition could hurt our business.
 The global confectionery and snacks packaged goods industry is intensely competitive and consolidation in this industry continues. Some of our competitors are large private companies, as well as large retailers, that have significant resources and substantial international operations. We continue to experience increased levels of in-store activity for other snack items, which has pressured confectionery category growth. In order to protect our existing market share or capture increased market share in this highly competitive retail environment, we may be required to increase expenditures for promotions and advertising, and must continue to introduce and establish new products. Due to inherent risks in the marketplace associated with advertising and new product introductions, including uncertainties about trade and consumer acceptance, increased expenditures may not prove successful in maintaining or enhancing our market share and could result in lower sales and profits. In addition, we may incur increased credit and other business risks because we operate in a highly competitive retail environment.
 Risks Related to Strategic Initiatives
 Our financial results may be adversely impacted by the failure to successfully execute or integrate acquisitions, divestitures and joint ventures.
 From time to time, we may evaluate potential acquisitions, divestitures or joint ventures that align with our strategic objectives. The success of such activity depends, in part, upon our ability to identify suitable buyers, sellers or business partners; perform effective assessments prior to contract execution; negotiate contract terms; and, if applicable, obtain government approval. These activities may present certain financial, managerial, staffing and talent, and operational risks, including diversion of management's attention from existing core businesses; difficulties integrating or separating businesses from existing operations; and challenges presented by acquisitions or joint ventures which may not achieve sales levels and profitability that justify the investments made. If the acquisitions, divestitures or joint ventures are not successfully implemented or completed, there could be a negative impact on our financial condition, results of operations and cash flows.
 In 2023, we completed the acquisition of certain assets that provide additional manufacturing capacity from Weaver Popcorn, a manufacturer of SkinnyPop popcorn, which helped us strengthen our supply chain capabilities. In 2021, we successfully completed the divestiture of LSFC as we better prioritize resources against assets and brands that fit our business model and scale capabilities. Additionally, we completed the acquisitions of Lily's in June 2021 and Dot's and Pretzels in December 2021. While we believe significant operating synergies can be obtained in connection with these acquisitions, achievement of these synergies will be driven by our ability to successfully leverage Hershey's

 The Hershey Company | 2023 Form 10-K | Page 12

 resources, expertise, capability-building, distribution locations and customer base. In addition, the acquisitions of Dot's and Pretzels are important steps in our journey to expand our breadth in snacking, as they should enable us to bring scale and category management capabilities to a key sub-segment of the warehouse snack aisle. If we are unable to successfully couple Hershey's scale and expertise in brand building with Lily's, Dot's and Pretzels' existing operations, it may impact our ability to expand our snacking footprint at our desired pace.
 Our international operations may not achieve projected growth objectives, which could adversely impact our overall business and results of operations.
 In 2023, 2022 and 2021, respectively, we derived approximately 12.7%, 12.5% and 13.0% of our net sales from customers located outside of the United States. Additionally, approximately 17% of our total long-lived assets were located outside of the United States as of December 31, 2023. As part of our strategy, we have made investments outside of the United States, particularly in Canada, Malaysia, Mexico, Brazil and India. As a result, we are subject to risks and uncertainties relating to international sales and operations, including:
 • The inability to manage operational stability and business resiliency within our international markets due to unforeseen global economic and environmental changes resulting in business interruption, supply constraints, inflation, deflation or decreased demand;
 • The inability to establish, develop and achieve market acceptance of our global brands in international markets;
 • Difficulties and costs associated with compliance and enforcement of remedies under a wide variety of complex laws, treaties and regulations;
 • Unexpected changes in regulatory environments;
 • Political and economic instability, including the possibility of civil unrest, terrorism, mass violence or armed conflict;
 • Nationalization of our properties by foreign governments;
 • Tax rates that may exceed those in the United States and earnings that may be subject to withholding requirements and incremental taxes upon repatriation;
 • Potentially negative consequences from changes in tax laws;
 • The imposition of tariffs, quotas, trade barriers, other trade protection measures and import or export licensing requirements;
 • Increased costs, disruptions in shipping or reduced availability of freight transportation;
 • The impact of currency exchange rate fluctuations between the U.S. dollar and foreign currencies;
 • Failure to gain sufficient profitable scale in certain international markets resulting in an inability to cover manufacturing fixed costs or resulting in losses from impairment or sale of assets; and
 • Failure to recruit, retain and build a talented and engaged global workforce.

 If we are not able to achieve our projected international growth objectives and mitigate the numerous risks and uncertainties associated with our international operations, there could be a negative impact on our financial condition and results of operations.

 We may not fully realize the expected cost savings and/or operating efficiencies associated with our strategic initiatives or restructuring programs, which may have an adverse impact on our business.
 We depend on our ability to evolve and grow, and as changes in our business environment occur, we may adjust our business plans by introducing new strategic initiatives or restructuring programs to meet these changes. Recently introduced strategic initiatives include our efforts to continue to expand our presence in digital commerce, to transform our manufacturing, commercial and corporate operations through digital technologies and to enhance our data analytics capabilities to develop new commercial insights. If we are not able to capture our share of the expanding digital commerce market, if we do not adequately leverage technology to improve operating efficiencies or if we are unable to develop the data analytics capabilities needed to generate actionable commercial insights, our business performance may be impacted, which may negatively impact our financial condition and results of operations.
 Additionally, from time to time we implement business realignment activities to support key strategic initiatives designed to maintain long-term sustainable growth, such as the International Optimization Program, which we commenced in the fourth quarter of 2020 and completed in 2023. This program was intended to increase our operating effectiveness and efficiency, to reduce our costs and/or to generate savings that can be reinvested in other areas of our

 The Hershey Company | 2023 Form 10-K | Page 13

 business. Additionally, in February 2024, the Board of Directors approved the Advancing Agility & Automation Initiative, which is a multi-year productivity program to improve supply chain and manufacturing-related spend, optimize selling, general and administrative expenses, leverage new technology and business models to further simplify and automate processes, and generate long-term savings. We cannot guarantee that we will be able to successfully implement these strategic initiatives and restructuring programs, that we will achieve or sustain the intended benefits under these programs, or that the benefits, even if achieved, will be adequate to meet our long-term growth and profitability expectations, which could in turn adversely affect our business.
 Risks Related to Governmental and Regulatory Changes
 Changes in governmental laws and regulations could increase our costs and liabilities or impact demand for our products.
 Changes in U.S. and non-U.S. laws and regulations and the manner in which they are interpreted or applied may alter our business environment. These negative impacts could result from changes in food and drug laws, laws related to advertising and marketing practices, accounting standards, taxation compliance and requirements, competition laws, employment laws, import/export requirements and environmental laws, among others. For example, the European Union's Deforestation Regulation ("EUDR") will require the Company to conduct extensive diligence on seven commodities, including cocoa, palm oil and soy, as well as products derived from these commodities, such as chocolate, and the value chain, to ensure the goods do not result from recent deforestation, forest degradation, or breaches of local laws in order to sell such products in the European Union market or exported from it. The EUDR is scheduled to be effective in December 2024. The EUDR, and other current or proposed regulations in markets in which we operate, are likely to increase our compliance costs, could depress sales in such markets if our products are not in compliance by applicable effective dates, and could result in fines and penalties or reputational harm if we do not fully comply. It is possible that we could become subject to additional liabilities in the future resulting from changes in laws and regulations that could result in an adverse effect on our financial condition and results of operations.
 Political, economic and/or financial market conditions, including impacts on our business arising from the ongoing conflict between Russia and Ukraine, could negatively impact our financial results.
 Our operations are impacted by consumer spending levels and impulse purchases, which are affected by general macroeconomic conditions, consumer confidence, employment levels, the availability of consumer credit and interest rates on that credit, consumer debt levels, energy costs and other factors. Volatility in food and energy costs, sustained global recessions, broad political instability, rising unemployment, pandemic, or other outbreak of disease (such as COVID-19), climate change, weather, natural and other disasters and declines in personal spending could adversely impact our revenues, profitability and financial condition.
 Changes in financial market conditions may make it difficult to access credit markets on commercially acceptable terms, which may reduce liquidity or increase borrowing costs for our Company, our customers and our suppliers. A significant reduction in liquidity could increase counterparty risk associated with certain suppliers and service providers, resulting in disruption to our supply chain and/or higher costs, and could impact our customers, resulting in a reduction in our revenue, or a possible increase in bad debt expense.
 Additionally, in February 2022, Russia invaded Ukraine and this conflict is still ongoing. In response, the U.S. and other countries have imposed sanctions on Russia and may impose further sanctions that could damage or disrupt international commerce and the global economy. With respect to the conflict between Russia and Ukraine, the situation remains dynamic and subject to rapid and possibly material change. The Company's efforts to manage and mitigate any direct or indirect effects from this conflict may ultimately be unsuccessful, and the effectiveness of these efforts depends on factors beyond our control, including the duration of the conflict and potential governmental actions. The potential effects of the ongoing conflict between Russia and Ukraine may also impact many of the other risk factors described herein.

 The Hershey Company | 2023 Form 10-K | Page 14

 Risks Related to Digital Transformation, Cybersecurity and Data Privacy
 Disruptions, failures or security breaches of our information technology infrastructure could have a negative impact on our operations.
 Information technology is critically important to our business operations. We use information technology to manage all business processes including manufacturing, financial, logistics, sales, marketing and administrative functions. These processes collect, interpret and distribute business data and communicate internally and externally with employees, suppliers, customers and other third parties.
 We are regularly the target of cyber, ransomware and other security threats. Therefore, we continuously monitor and update our information technology networks and infrastructure to prevent, detect, address and mitigate the risk of unauthorized access, misuse, computer viruses and other events that could have a security impact. We invest in industry standard security technology to protect the Company's data and business processes against risk of data security breach and cyber attack. Our data security management program includes identity, trust, vulnerability and threat management business processes as well as adoption of standard data protection policies. We measure our data security effectiveness through industry-accepted methods and remediate significant findings. Additionally, we certify our major technology suppliers and any outsourced services through accepted security certification standards. We maintain and routinely test backup systems and disaster recovery, along with external network security penetration testing by an independent third party as part of our business resiliency preparedness. We also have processes in place to prevent disruptions resulting from our implementation of new software and systems. Employees are trained annually on cybersecurity wellness and our acceptable use policy and we have implemented phishing simulations to increase awareness and compliance. We also currently maintain a cyber insurance policy that provides coverage for security breaches; however, such insurance may not be sufficient in type or amount to cover us against claims related to security breaches, cyber-attacks and other related breaches.
 We have been subject to cyber attacks, ransomware and other security breaches, though these incidents historically have not had a significant impact on our business operations. The techniques that are used to obtain unauthorized access, disable or degrade service or sabotage systems change frequently and may be difficult to detect for long periods of time, and the sophistication of efforts by hackers to gain unauthorized access to information systems has continued to increase in recent years and may continue to do so. Despite continued vigilance in these areas, disruptions in or failures of information technology systems are possible and could have a negative impact on our operations or business reputation. For instance, in September 2023, we experienced a smishing breach, which did not have an impact on our consolidated financial statements. Promptly after extracting the threat actor, we worked with a cyber expert firm and determined that certain employee and third-party personal information was exposed. Failure of our systems, including failures due to cyber attacks, ransomware or other security breaches that would prevent the ability of systems to function as intended, could cause transaction errors, loss of customers and sales, and could have negative consequences to our Company, our employees and those with whom we do business. This in turn could have a negative impact on our financial condition and results or operations. In addition, the cost to remediate any damages to our information technology systems suffered as a result of a cyber attack, ransomware or other security breach could be significant.
 Complications with the design or implementation of our new enterprise resource planning system could adversely impact our business and operations.
 We rely extensively on information systems and technology to manage our business and summarize operating results. We are in the process of a multi-year implementation of a new global enterprise resource planning ("ERP") system. This ERP system will replace our existing operating and financial systems. The ERP system is designed to accurately maintain the Company's financial records, enhance operational functionality and provide timely information to the Company's management team related to the operation of the business. The ERP system implementation process has required, and will continue to require, the investment of significant personnel and financial resources. We may not be able to successfully implement the ERP system without experiencing further delays, increased costs and other difficulties. If we are unable to successfully design and implement the new ERP system as planned, our financial positions, results of operations and cash flows could be negatively impacted. Additionally, if we do not effectively implement the ERP system as planned or the ERP system does not operate as intended, the effectiveness of our internal control over financial reporting could be adversely affected or our ability to assess those controls adequately could be further delayed.

 The Hershey Company | 2023 Form 10-K | Page 15

 Item 1B. UNRESOLVED STAFF COMMENTS
 None.

 Item 1C. CYBERSECURITY

 Cybersecurity Risk Management and Strategy
 Information technology is important to our business operations, and we are committed to protecting the privacy, security and integrity of our data, as well as our employee and customer data. The Company has a comprehensive cybersecurity program in place for assessing, identifying and managing cybersecurity risks that is designed to protect its systems and data from unauthorized access, use or other security impact. This program is integrated into the Company's overall Enterprise Risk Management and Resiliency process.
 We continuously monitor and update our information technology networks and infrastructure to prevent, detect, address and mitigate risks associated with unauthorized access, misuse, computer viruses and other events that could have a security impact. We invest in industry standard security technology to protect the Company's data and business processes against risk of cybersecurity incidents. Our data security management program includes identity, trust, vulnerability and threat management business processes, as well as adoption of standard data protection policies. We measure our data security effectiveness by benchmarking against industry-accepted methods and we work to remediate any significant findings. We maintain and routinely test backup systems and disaster recovery and also have processes in place to prevent disruptions resulting from our implementation of new software and systems.
 The Company has a comprehensive incident response plan to address cybersecurity incidents. The Company's incident response plan includes procedures for identifying, containing and responding to cybersecurity incidents and is subject to regular review and assessment to ensure that it is effective in protecting the Company's information technology. To date, the Company believes that its cybersecurity program has been effective in protecting the confidentiality, integrity, and availability of its information; however, the Company cannot guarantee that its cybersecurity program will be successful in preventing all cybersecurity incidents. Further, we currently maintain a cyber insurance policy that provides coverage for security breaches; however, such insurance may not be sufficient in type or amount to cover us against claims related to security breaches, cyber-attacks and other related breaches.
 The Company engages external parties, including consultants, computer security firms and risk management and governance experts, to enhance its cybersecurity oversight. In order to oversee and identify risks from cybersecurity threats associated with the Company's use of third-party service providers, we also have a third-party risk management program designed to help protect against the misuse of information technology by third parties and business partners, which includes certification of our major technology suppliers and any outsourced services through accepted security certification standards.
 While we are regularly subject to cybersecurity attacks, ransomware and other security breaches, the Company has not experienced any material cybersecurity incidents or a series of related unauthorized occurrences for the year ended December 31, 2023. The Company does not believe that there are currently any known risks from cybersecurity threats that are reasonably likely to materially affect the Company or its business strategy, results of operations or financial condition. However, as discussed under " Item 1A. Risk Factors," specifically the risks titled "Disruptions, failures or security breaches of our information technology infrastructure could have a negative impact on our operations," the sophistication of cyber, ransomware and other security threats continues to increase, and the preventative actions we take to reduce the risk of these incidents and protect our systems and information may be insufficient. Accordingly, no matter how well designed or implemented our controls are, we will not be able to anticipate all cybersecurity attacks, ransomware and other security breaches and we may not be able to implement effective preventive measures against such security breaches in a timely manner.
 Cybersecurity Governance and Oversight
 The Company's Board of Directors has a mix of experiences, skills, qualifications and backgrounds to support strategy and risk oversight, including expertise in cybersecurity and oversight of cybersecurity matters. This oversight is achieved through the Company's Finance and Risk Management ("F&RM") Committee, which is comprised of five members of our Board of Directors, and one Board member who serves in an ex-officio capacity. The F&RM Committee is responsible for reviewing key enterprise risks identified through our Enterprise Risk Management and

 The Hershey Company | 2023 Form 10-K | Page 16

 Resiliency process, which includes information security strategies and risks, as well as data privacy and protection risks and mitigation strategies (collectively, "Information Security"). At each regularly scheduled F&RM Committee meeting, management, through the Company's Chief Information Security Officer ("CISO"), reports on Information Security controls, audits, guidelines and developments and the F&RM Committee is notified between such updates regarding significant new cybersecurity threats or incidents.
 The CISO, who reports to the Chief Technology Officer ("CTO"), oversees a dedicated Information Security team that is supported by the Privacy Center of Excellence, and works in partnership with internal audit to review certain information technology-related internal controls with our independent auditors as part of the overall internal controls process. Our CTO, who reports to the Chief Executive Officer, has oversight of our Information Security team and leads the company's global technology strategy, architecting and deploying digital capabilities that are innovative, flexible and prepared to meet the changing needs of our consumers, retail partners and employees.
 The CISO's cybersecurity experience includes over thirty years of Information Technology experience, including twenty years within the Information Security field. The CISO's Information Security roles have included security engineering, security architecture, strategy development and execution, risk and compliance management and identity and access management and incident response. The Company's CTO has over twenty years of experience, including deep expertise in developing cutting-edge automated systems, supply chain planning, optimization and simulation, artificial intelligence and predictive analytics. Additional experience held by the CTO is described further under Information about Our Executive Officers.
 To ensure our employees are educated on potential cybersecurity threats or actions, we train our executive officers and global workforce on an ongoing basis in the event of a potential cyber threat or cybersecurity incident. Our Company-wide Information Security training program includes security awareness training, including regular phishing simulations, acceptable use training, cyber wellness trainings and other targeted trainings throughout the year. These trainings provide employees the opportunity to gain an understanding of the various forms of cybersecurity incidents and enable our employees to handle and report any suspicious activity or threat.

 The Hershey Company | 2023 Form 10-K | Page 17

 Item 2. PROPERTIES
 Our principal properties include the following:

 Country

 Location
 Type

 Status
(Own/Lease)

 Hershey, Pennsylvania
(2 principal plants)
 Manufacturing—confectionery products and pantry items
 Own

 Lancaster, Pennsylvania
 Manufacturing—confectionery products
 Own

 Hazleton, Pennsylvania
 Manufacturing—confectionery products
 Own

 Robinson, Illinois
 Manufacturing—confectionery products and pantry items
 Own

 Stuarts Draft, Virginia
 Manufacturing—confectionery products and pantry items
 Own

 Edgerton, Kansas
 Own

 Bluffton, Indiana
 Lease

 Plymouth, Indiana
 Lease

 Lawrence, Kansas
 Lease

 Whitestown, Indiana
 Lease

 Annville, Pennsylvania
 Own

 Palmyra, Pennsylvania
 Own

 Edwardsville, Illinois
 Own

 Ogden, Utah
 Own

 Kennesaw, Georgia
 Lease

 Whitestown, Indiana
 Lease

 Hershey, Pennsylvania
 Corporate administrative
 Lease

 New York, New York
 Retail
 Lease

 Canada
 Brantford, Ontario
 Own

 Mexico
 Monterrey, Mexico
 Manufacturing—confectionery products
 Own

 El Salto, Mexico
 Manufacturing—confectionery products and pantry items
 Own

 Malaysia
 Johor, Malaysia
 Manufacturing—confectionery products
 Own

 In addition to the locations indicated above, we also own or lease several other properties and buildings worldwide which we use for manufacturing, sales, distribution and administrative functions. Our facilities are well maintained and generally have adequate capacity to accommodate seasonal demands, changing product mixes and certain additional growth. We regularly improve our facilities to incorporate the latest technologies. The largest facilities are located in Hershey, Lancaster and Hazleton, Pennsylvania; Monterrey and El Salto, Mexico; and Stuarts Draft, Virginia. The U.S., Canada and Mexico facilities in the table above primarily support our North America Confectionery and North America Salty Snacks segments, while the Malaysia facility primarily serves our International segment. As discussed in Note 13 to the Consolidated Financial Statements, we do not manage our assets on a segment basis given the integration of certain manufacturing, warehousing, distribution and other activities in support of our global operations.

 Item 3. LEGAL PROCEEDINGS
 Information on legal proceedings is included in Note 15 to the Consolidated Financial Statements.

 Item 4. MINE SAFETY DISCLOSURES
 Not applicable.

 The Hershey Company | 2023 Form 10-K | Page 18

 SUPPLEMENTAL ITEM. INFORMATION ABOUT OUR EXECUTIVE OFFICERS
 The executive officers of the Company, their positions and, as of February 16, 2024, their ages are set forth below.

 Name
 Age
 Positions Held During the Last Five Years

 Deepak Bhatia (1)

 Senior Vice President, Chief Technology Officer (October 2023)

 Michele G. Buck
 Chairman of the Board, President and Chief Executive Officer (October 2019);
President and Chief Executive Officer (March 2017)

 Rohit Grover
 President, International (April 2019);
Vice President, General Manager, General China (January 2017)

 Jennifer L. McCalman (2)

 Vice President, Chief Accounting Officer (February 2021);
Senior Director, Global Controller (March 2019)

 Charles R. Raup
 President, U.S. Confection (November 2022);
President, U.S. (January 2020);
Vice President, U.S. CMG (June 2018)

 Jason R. Reiman
 Senior Vice President, Chief Supply Chain Officer (June 2019);
Vice President, Supply Chain Operations (August 2018)

 Kristen J. Riggs
 President, Salty Snacks (November 2022);
Senior Vice President, Chief Growth Officer (January 2020);
Vice President, Innovation and Strategic Growth Platforms (September 2019);
Vice President, Commercial Planning (June 2018)

 Christopher M. Scalia
 Senior Vice President, Chief Human Resources Officer (January 2020);
Vice President, Global Human Resources (March 2018)

 James Turoff
 Senior Vice President, General Counsel and Secretary (May 2021);
 Acting General Counsel (December 2020);
 Vice President, Deputy General Counsel (March 2019);
 Vice President, SEC, Corporate Governance & Compliance (March 2018)

 Steven E. Voskuil (3)

 Senior Vice President, Chief Financial Officer (February 2021);
Senior Vice President, Chief Financial Officer and Chief Accounting Officer (November 2019);
Senior Vice President, Chief Financial Officer (May 2019)

 There are no family relationships among any of the above-named officers of our Company.

 (1) Mr. Bhatia was appointed Senior Vice President, Chief Technology Officer effective October 23, 2023. Prior to joining our Company he was the Vice President of Supply Chain Optimization Technologies (August 2021), Vice President of Technology, Inventory Planning & Control in Supply Chain Optimization Technologies (March 2019), and Director, Inventory Optimization, Simulations, S&OP in Inventory Planning & Control (April 2014) at Amazon.com, Inc., a multinational technology company.
 (2) Ms. McCalman was appointed Vice President, Chief Accounting Officer effective February 23, 2021. Prior to joining our Company she was Senior Director and Assistant Controller for Keurig Dr. Pepper (formerly Keurig Green Mountain) (May 2017), a beverage and coffeemaker company.
 (3) Mr. Voskuil was appointed Senior Vice President, Chief Financial Officer effective May 13, 2019. Prior to joining our Company he was Senior Vice President and Chief Financial Officer at Avanos Medical, Inc. (November 2014), a medical technology company.
 Our Executive Officers are generally appointed each year at the organization meeting of the Board in May.

 The Hershey Company | 2023 Form 10-K | Page 19

 Item 5. MARKET FOR THE REGISTRANT'S COMMON EQUITY, RELATED STOCKHOLDER MATTERS AND ISSUER PURCHASES OF EQUITY SECURITIES
 Our Common Stock is listed and traded principally on the New York Stock Exchange under the ticker symbol "HSY." The Class B Common Stock ("Class B Stock") is not publicly traded.
 The closing price of our Common Stock on December 29, 2023 (the last business day of the of the fiscal year) was $186.44. There were 23,327 stockholders of record of our Common Stock and 5 stockholders of record of our Class B Stock as of December 31, 2023.
 We paid $889.1 million in cash dividends on our Common Stock and Class B Stock in 2023 and $775.0 million in 2022. The annual dividend rate on our Common Stock in 2023 was $4.456 per share.
 On February 7, 2024, our Board declared a quarterly dividend of $1.370 per share of Common Stock payable on March 15, 2024, to stockholders of record as of February 20, 2024. It is the Company's 376th consecutive quarterly Common Stock dividend. A quarterly dividend of $1.245 per share of Class B Stock also was declared.
 Unregistered Sales of Equity Securities and Use of Proceeds
 None.
 Issuer Purchases of Equity Securities
 The following table shows the purchases of shares of Common Stock made by or on behalf of Hershey, or any "affiliated purchaser" (as defined in Rule 10b-18(a)(3) under the Securities Exchange Act of 1934, as amended) of Hershey, for each fiscal month in the three months ended December 31, 2023:

 Period

 Total Number
of Shares
Purchased (1)
 Average Price
Paid
per Share
 Total Number of
Shares Purchased
as Part of Publicly
Announced Plans
or Programs (2)

 Approximate
Dollar Value of
Shares that May
Yet Be Purchased
Under the Plans or
Programs (2)

 (in thousands of dollars)

 October 2 through October 29
 —
 $
 —
 —
 $
 370,073

 October 30 through November 26
 127,609
 $
 196.33
 —
 $
 370,073

 November 27 through December 31
 —
 $
 —
 —
 $
 370,073

 Total
 127,609
 $
 —
 —

 (1) During the three months ended December 31, 2023, 127,609 shares of Common Stock were purchased in open market transactions in connection with our standing authorization to buy back shares sufficient to offset those issued under incentive compensation plans, which authorization does not have a dollar or share limit and is not included in our share repurchase authorizations described in the following note (2).
 (2) In July 2018, our Board of Directors approved a $500 million share repurchase authorization. In May 2021, our Board of Directors approved an additional $500 million share repurchase authorization. As a result of the February 2023 Stock Purchase Agreement with Hershey Trust Company, as trustee for the Milton Hershey School Trust (the "School Trust"), the July 2018 share repurchase authorization was completed and as of December 31, 2023, approximately $370 million remained available for repurchases of our Common Stock under our May 2021 share repurchase authorization. In December 2023, our Board of Directors approved an additional $500 million share repurchase authorization. This program is to commence after the existing 2021 authorization is completed and is to be utilized at management's discretion. The May 2021 and December 2023 share repurchase programs do not have an expiration date.

 The Hershey Company | 2023 Form 10-K | Page 20

 In February 2023, the Company entered into a Stock Purchase Agreement with Hershey Trust Company, as trustee for the School Trust, pursuant to which the Company purchased 1,000,000 shares of the Company's Common Stock from the School Trust at a price equal to $239.91 per share, for a total purchase price of $239.9 million.
 In February 2022, the Company entered into a Stock Purchase Agreement with Hershey Trust Company, as trustee for the School Trust, pursuant to which the Company purchased 1,000,000 shares of the Company's Common Stock from the School Trust at a price equal to $203.35 per share, for a total purchase price of $203.4 million.
 Stockholder Return Performance Graph
 The following graph compares our cumulative total stockholder return (Common Stock price appreciation plus dividends, on a reinvested basis) over the last five fiscal years with the Standard & Poor's 500 Index and the Standard & Poor's 500 Packaged Foods Index.

 Comparison of 5 Year Cumulative Total Return*
 Among The Hershey Company, the S&P 500 Index,
 and the S&P 500 Packaged Foods Index

 Company/Index
 2018
 2019
 2020
 2021
 2022
 2023

 The Hershey Company
 $
 $
 $
 $
 $
 $

 S&P 500 Index
 $
 $
 $
 $
 $
 $

 S&P 500 Packaged Foods Index
 $
 $
 $
 $
 $
 $

 The stock price performance included in this graph is not necessarily indicative of future stock price performance.

 Item 6. [RESERVED]

 The Hershey Company | 2023 Form 10-K | Page 21

 Item 7. MANAGEMENT'S DISCUSSION AND ANALYSIS OF FINANCIAL CONDITION AND RESULTS OF OPERATIONS
 This Management's Discussion and Analysis ("MD&A") is intended to provide an understanding of Hershey's financial condition, results of operations and cash flows by focusing on changes in certain key measures from year to year. The MD&A should be read in conjunction with our Consolidated Financial Statements and accompanying Notes included in Item 8 of this Annual Report on Form 10-K. This discussion contains forward-looking statements that involve risks and uncertainties. Our actual results could differ materially from those anticipated in these forward-looking statements as a result of various factors, including those discussed elsewhere in this Annual Report on Form 10-K, particularly in Item 1A. "Risk Factors."
 The MD&A is organized in the following sections:
 • Business Model and Growth Strategy
 • Overview
 • Trends Affecting Our Business
 • Consolidated Results of Operations
 • Segment Results
 • Liquidity and Capital Resources
 • Critical Accounting Policies and Estimates

 BUSINESS MODEL AND GROWTH STRATEGY
 We are the largest producer of quality chocolate in North America, a leading snack maker in the United States and a global leader in chocolate and non-chocolate confectionery. We report our operations through three segments: (i) North America Confectionery, (ii) North America Salty Snacks and (iii) International, as discussed in Note 13 to the Consolidated Financial Statements.
 Our vision is to be a leading snacking powerhouse. We aspire to be a leader in meeting consumers' evolving snacking needs while strengthening the capabilities that drive our growth. We are focused on four strategic imperatives to ensure the Company's success now and in the future:

 • Drive Core Confection Business and Broaden Participation in Snacking. We continue to be the undisputed leader in U.S. confection by taking actions to deepen our consumer connections and utilize our beloved brands to deliver meaningful innovation, while also diversifying our portfolio to capture profitable and incremental growth across the broader snacking continuum.
 Our products frequently play an important role in special moments among family and friends. Seasons are an important part of our business model and for consumers, as they are highly anticipated, cherished times, centered around traditions. For us, it's an opportunity for our brands to be part of many connections during the year when family and friends gather.
 Innovation is an important lever in this variety-seeking category and we are leveraging work from our proprietary demand landscape analytical tool to shape our future innovation and make it more impactful. We are becoming more disciplined in our focus on platform innovation, which should enable sustainable growth over time and significant extensions to our core.
 To expand our breadth in snacking and become a leading snacking powerhouse, we are focused on continuing to expand the boundaries of our core confection brands to capture new snacking occasions and increasing our exposure into new snack categories through acquisitions. Our expansion into snacking was fueled by the acquisitions of Dot's and Pretzels in December 2021 and the acquisition of Weaver in 2023, which are included in our North America Salty Snacks segment.

 • Deliver Profitable International Growth. We are focused on ensuring that we efficiently allocate our resources to the areas with the highest potential for profitable growth. We have reset our international investment strategy, while holding fast to our belief that our targeted emerging market strategy will deliver long-term, profitable growth. The uncertain macroeconomic environment in many of these markets is expected to continue and we aim to ensure our investments in these international markets are appropriate relative to the size of the opportunity.

 The Hershey Company | 2023 Form 10-K | Page 22

 • Expand Competitive Advantage through Differentiated Capabilities. In order to generate actionable insights, we must acquire, integrate, access and utilize vast sources of the right data in an effective manner. We are working to leverage our advanced data and analytical techniques to gain a deep understanding of our consumers, our customers, our shoppers, our end-to-end supply chain, our retail environment and key economic drivers at both a macro and precision level, including digital transformation and new media models. In addition, we are in the process of transforming our supply chain capabilities and enterprise resource planning system, which will enable employees to work more efficiently and effectively.

 • Responsibly Manage Our Operations to Ensure the Long-Term Sustainability of Our Business, Our Planet and Our People. We are a purpose-driven company and for more than a century, our iconic brands have been built on a foundation of community investment and connections between people around the world. We could not have achieved this without our remarkable employees who make our purpose a reality. We believe our long-standing values make our Company a special place to work.
 We believe our employees are among our most important resources and are critical to our continued success. We utilize continuous listening surveys that are distributed throughout the year to all employees globally to hear their thoughts on the Company's direction and their place in it. These continuous touchpoints allow for real-time feedback and action from the Company. These surveys are further supplemented with quarterly and informative enterprise and team town halls, which, in conjunction with the continuous listening surveys, generate stronger employee engagement with the Company's strategy, initiatives and leadership.
 Our diverse and inclusive culture makes the difference across all areas of the business. Our gender representation includes women occupying many of the top positions in the Company, including Chief Executive Officer and Chairman of the Board, Chief Accounting Officer and President, Salty Snacks, and approximately 50% representation across the Company. In 2023, we maintained fair and equitable pay achievements, including 1:1 aggregate people of color pay equity (2021) and 1:1 aggregate gender pay (2020) for salaried employees in the United States.
 We continue to make progress on our ESG priorities and continue to elevate these ESG initiatives for a greater global impact. Through our focus on sustainability and social impact across our value chain, we continue to improve and focus on the lives of cocoa farmers and cocoa communities, the environmental priorities of climate change and the role of packaging in our business, responsibly and sustainably sourcing the inputs to our products and increasing investments in human rights and diversity initiatives and growing diverse representation across the organization.

 OVERVIEW
 Hershey is a global confectionery leader known for making more moments of goodness through chocolate, sweets, mints and other great tasting snacks. We are the largest producer of quality chocolate in North America, a leading snack maker in the United States and a global leader in chocolate and non-chocolate confectionery. We market, sell and distribute our products under more than 90 brand names in approximately 80 countries worldwide.
 Our principal product offerings include chocolate and non-chocolate confectionery products; gum and mint refreshment products and protein bars; pantry items, such as baking ingredients, toppings and beverages; and snack items such as spreads, bars, and snack bites and mixes, popcorn and pretzels.
 Business Acquisitions and Divestitures
 On May 31, 2023, we completed the acquisition of certain assets that provide additional manufacturing capacity from Weaver Popcorn Manufacturing, Inc. ("Weaver"), a leader in the production and co-packing of microwave popcorn and ready-to-eat popcorn, and former co-manufacturer of the Company's SkinnyPop brand.
 In December 2021, we completed the acquisition of Pretzels Inc. ("Pretzels"), previously a privately held company that manufactures and sells pretzels and other salty snacks for other branded products and private labels in the United States. Pretzels is an industry leader in the pretzel category with a product portfolio that includes filled, gluten free and seasoned pretzels, as well as extruded snacks that complements Hershey's snacks portfolio. Based in Bluffton, Indiana, Pretzels operates three manufacturing locations in Indiana and Kansas. Pretzels provides Hershey with deep pretzel category and product expertise and the manufacturing capabilities to support brand growth and future pretzel

 The Hershey Company | 2023 Form 10-K | Page 23

 innovation. Additionally, we completed the acquisition of Dot's Pretzels, LLC ("Dot's"), previously a privately held company that produces and sells pretzels and other snack food products to retailers and distributors in the United States, with Dot's Homestyle Pretzels snacks as its primary product, which complements Hershey's snacks portfolio.
 In June 2021, we completed the acquisition of Lily's Sweets, LLC ("Lily's"), previously a privately held company that sells a line of sugar-free and low-sugar confectionery foods to retailers and distributors in the United States and Canada. Lily's products include dark and milk chocolate style bars, baking chips, peanut butter cups and other confection products that complement Hershey's confectionery and confectionery-based portfolio.
 In January 2021, we completed the divestiture of Lotte Shanghai Foods Co., Ltd. ("LSFC"), which was previously included within the International segment results in our consolidated financial statements. Total proceeds from the divestiture and the impact on our consolidated financial statements were immaterial.

 TRENDS AFFECTING OUR BUSINESS
 Throughout 2023, the rate of inflation has slowed; however, negative macroeconomic conditions and future outlook, including fears of a pending recession, have negatively impacted consumer behaviors. Net sales and net income increased during the year ended December 31, 2023; however, this was primarily driven by price increases on certain products across our portfolio. Additionally, we continued to experience corresponding incremental costs and gross margin pressures during the year ended December 31, 2023 (see Consolidated Results of Operations included in this MD&A). Despite specific actions taken to mitigate these gross margin pressures, higher prices for direct materials used to manufacture our products were, and continue to be, the primary incremental cost to our business. We utilize many exchange traded commodities for our business that are subject to price volatility, specifically cocoa products, which experienced an average increase in market prices of approximately 32% during 2023. We continue to monitor and use our risk management strategy where possible to hedge commodity prices in order to mitigate corresponding increases in our raw materials and energy costs.

 Furthermore, certain geopolitical events, specifically the conflict between Russia and Ukraine, have increased global economic and political uncertainty. For the year ended December 31, 2023, this conflict did not have a material impact on our commodity prices or supply availability. However, we are continuing to monitor for any significant escalation or expansion of economic or supply chain disruptions or broader inflationary costs, which may result in material adverse effects on our results of operations.

 As of December 31, 2023, we believe we have sufficient liquidity to satisfy our key strategic initiatives and other material cash requirements in both the short-term and in the long-term; however, we continue to evaluate and take action, as necessary, to preserve adequate liquidity and ensure that our business can operate effectively during the current economic environment. We continue to monitor our discretionary spending across the organization (see Liquidity and Capital Resources included in this MD&A).

 Based on the length and severity of fluctuating levels of inflation, including price volatility for our commodities, the likelihood of a potential recession, changes in consumer shopping and consumption behavior, and changes in geopolitical events, including the ongoing conflict between Russia and Ukraine, we may experience increasing supply chain costs, higher inflation and other impacts to our business. We will continue to evaluate the nature and extent of these potential and evolving impacts on our business, consolidated results of operations, segment results, liquidity and capital resources.

 The Hershey Company | 2023 Form 10-K | Page 24

 CONSOLIDATED RESULTS OF OPERATIONS

 Percent Change

 2023
 2022
 2021
 2023 vs 2022
 2022 vs 2021

 In millions of dollars except per share amounts

 $
 11,165.0
 $
 10,419.3
 $
 8,971.3
 7.2
 %
 16.1
 %

 Cost of sales
 6,167.2
 5,920.5
 4,922.7
 4.2
 %
 20.3
 %

 Gross profit
 4,997.8
 4,498.8
 4,048.6
 11.1
 %
 11.1
 %

 Gross margin
 44.8
 %
 43.2
 %
 45.1
 %

 Selling, Marketing & Administrative ("SM&A") expense
 2,436.5
 2,236.0
 2,001.4
 9.0
 %
 11.7
 %

 SM&A expense as a percent of net sales
 21.8
 %
 21.5%
 22.3%

 Business realignment costs
 0.4
 2.0
 3.5
 (77.8)
 %
 (43.6)
 %

 Operating profit
 2,560.9
 2,260.8
 2,043.7
 13.3
 %
 10.6
 %

 Operating profit margin
 22.9
 %
 21.7
 %
 22.8
 %

 151.8
 137.6
 127.4
 10.3
 %
 8.0
 %

 Other (income) expense, net
 237.2
 206.1
 119.1
 15.1
 %
 73.1
 %

 Provision for income taxes
 310.1
 272.3
 314.4
 13.9
 %
 (13.4)
 %

 Effective income tax rate
 14.3
 %
 14.2
 %
 17.5
 %

 Net income including noncontrolling interest
 1,861.8
 1,644.8
 1,482.8
 13.2
 %
 10.9
 %

 Less: Net gain (loss) attributable to noncontrolling interest
 —
 —
 5.3
 NM
 NM

 Net income attributable to The Hershey Company
 $
 1,861.8
 $
 1,644.8
 $
 1,477.5
 13.2
 %
 11.3
 %

 Net income per share—diluted
 $
 9.06
 $
 7.96
 $
 7.11
 13.8
 %
 12.0
 %

 Note: Percentage changes may not compute directly as shown due to rounding of amounts presented above.

 NM = not meaningful

 Net Sales
 Net sales were $11,165.0 million in 2023 compared to $10,419.3 million in 2022, an increase of $745.7 million, or 7.2%. The net sales increase reflects a favorable price realization of 8.3% due to higher list prices across all segments and by a favorable impact from foreign currency exchange rates of 0.2%. These increases were slightly offset by a volume decrease of 1.3% due to a decrease in consumer demand primarily in everyday core U.S. confection brands.
 Net sales were $10,419.3 million in 2022 compared to $8,971.3 million in 2021, an increase of $1,448.0 million, or 16.1%. The net sales increase reflects a volume increase of 8.0% due to higher prices on certain products, a 4.3% benefit from net acquisitions and divestitures driven by the 2021 acquisitions of Lily's, Dot's and Pretzels and a volume increase of 4.0% due to an increase in consumer demand primarily in everyday core U.S. confection brands and salty snack brands. These increases were slightly offset by an unfavorable impact from foreign currency exchange rates of 0.2%.
 Key U.S. Marketplace Metrics
 For the full year 2023, our total U.S. retail takeaway increased 6.0% in the expanded multi-outlet combined plus convenience store channels (IRI MULO + C-Stores), which includes candy, mint, gum, salty snacks and grocery items. Our U.S. candy, mint and gum ("CMG") consumer takeaway increased 6.0% and experienced a CMG market share decline of 83 basis points. Our Salty consumer takeaway increased 5.6% and experienced a Salty market share decline of 9 basis points.

 The Hershey Company | 2023 Form 10-K | Page 25

 The CMG consumer takeaway and market share information reflect measured channels of distribution accounting for approximately 90% of our U.S. confectionery retail business. These channels of distribution primarily include food, drug, mass merchandisers and convenience store channels, plus Wal-Mart Stores, Inc., partial dollar, club and military channels. These metrics are based on measured market scanned purchases as reported by Circana, the Company's market insights and analytics provider, and provide a means to assess our retail takeaway and market position relative to the overall category.
 Cost of Sales and Gross Margin
 Cost of sales were $6,167.2 million in 2023 compared to $5,920.5 million in 2022, an increase of $246.7 million, or 4.2%. The increase included $356.2 million of unfavorable costs driven by higher supply chain costs, including higher labor costs partially offset by lower logistics costs, and unfavorable mix. The increase was further driven by an incremental $97.7 million of unfavorable mark-to-market activity on our commodity derivative instruments intended to economically hedge future years' commodity purchases (See Item 7A - Quantitative and Qualitative Disclosures About Market Risk for more information). These increases were partially offset by $207.2 million of favorable supply chain productivity and price realization.

 Gross margin was 44.8% in 2023 compared with 43.2% in 2022, an increase of 160 basis points. The increase was driven by favorable price realization and increased supply chain productivity. The increase was partially offset by unfavorable activity on our mark-to-market impact from commodity derivative instruments, higher supply chain costs, including higher labor costs and increased waste. The increase was further driven by unfavorable mix and foreign exchange rates.
 Cost of sales were $5,920.5 million in 2022 compared with $4,922.7 million in 2021, an increase of $997.8 million, or 20.3%. The increase included $767.7 million of unfavorable costs driven by higher sales volume and higher supply chain inflation costs, including higher logistics and labor costs. The increase was further driven by an incremental $40.8 million of unfavorable mark-to-market activity on our commodity derivative instruments intended to economically hedge future years' commodity purchases. Additionally, we incurred incremental costs of $263.3 million associated with our 2021 acquisitions of Dot's and Pretzels. These increases were offset by $74.0 million of favorable price realization and supply chain productivity.
 Gross margin was 43.2% in 2022 compared with 45.1% 2021, a decrease of 190 basis points. The decrease was driven by unfavorable year-over-year mark-to-market impact from commodity derivative instruments, higher supply chain inflation costs, including higher logistics and labor costs, and unfavorable product mix. These declines were offset by favorable price realization and volume increases.
 Selling, Marketing and Administrative
 Selling, marketing and administrative ("SM&A") expenses were $2,436.5 million in 2023 compared to $2,236.0 million in 2022, an increase of $200.5 million, or 9.0%. The increase was driven by increased corporate expenses. Total advertising and related consumer marketing expenses increased 12.2% driven by North America Confectionery and North America Salty Snacks. SM&A expenses, excluding advertising and related consumer marketing, increased approximately 7.5% in 2023 driven by higher compensation costs and investments in capabilities and technology across segments.
 SM&A expenses were $2,236.0 million in 2022 compared to $2,001.4 million in 2021, an increase of $234.6 million, or 11.7%, driven by increased corporate expenses. Total advertising and related consumer marketing expenses increased 2.7% driven by advertising increases in our confectionery brands and increased investment in our salty snacks portfolio, which were partially offset by cost efficiencies related to new media partners. SM&A expenses, excluding advertising and related consumer marketing, increased approximately 16.3% in 2022 driven by an increase in acquisition and integration related costs, as well as higher compensation costs, investments in capabilities and technology and broad-based marketplace inflation.

 The Hershey Company | 2023 Form 10-K | Page 26

 Business Realignment Activities
 We periodically undertake business realignment activities designed to increase our efficiency and focus our business in support of our key growth strategies. In 2023, 2022 and 2021, we recorded business realignment costs of $0.4 million, $2.0 million and $3.5 million, respectively. The 2023, 2022, and 2021 costs related primarily to the International Optimization Program, a program focused on optimizing our China operating model to improve our operational efficiency and provide for a strong, sustainable and simplified base going forward. Additionally, in February 2024, the Board of Directors approved the Advancing Agility & Automation Initiative, which is a multi-year productivity program to improve supply chain and manufacturing-related spend, optimize selling, general and administrative expenses, leverage new technology and business models to further simplify and automate processes, and generate long-term savings. Costs associated with business realignment activities are classified in our Consolidated Statements of Income as described in Note 9 to the Consolidated Financial Statements.
 Operating Profit and Operating Profit Margin
 Operating profit was $2,560.9 million in 2023 compared to $2,260.8 million in 2022, an increase of $300.1 million, or 13.3%. The increase was predominantly due to higher gross profit, partially offset by higher SM&A expenses, as noted above. Operating profit margin increased to 22.9% in 2023 from 21.7% in 2022 by the same factors noted above in gross margin.
 Operating profit was $2,260.8 million in 2022 compared to $2,043.7 million in 2021, an increase of $217.1 million, or 10.6%. The increase was predominantly due to higher gross profit, partially offset by higher SM&A expenses, as noted above. Operating profit margin decreased to 21.7% in 2022 from 22.8% in 2021 driven by these same factors.
 Interest Expense, Net
 Net interest expense was $151.8 million in 2023 compared to $137.6 million in 2022, an increase of $14.2 million, or 10.3%. The increase was primarily due to higher rates on short-term debt balances in 2023 versus 2022, specifically related to outstanding commercial paper borrowings, and higher rates on long-term debt balances, specifically related to the $350 million 4.25% Notes and $400 million 4.50% Notes issued in May 2023. The increase in the expense was partially offset by an increase in interest income.
 Net interest expense was $137.6 million in 2022 compared to $127.4 million in 2021, an increase of $10.2 million, or 8.0%. The increase was primarily due to higher rates on short-term debt balances in 2022 versus 2021, specifically related to outstanding commercial paper borrowings. The increase was partially offset due to lower average long-term debt balances, specifically resulting from the repayment of $84.7 million of 8.800% Debentures upon their maturity in February 2021 and $350 million of 3.100% Notes upon their maturity in May 2021.

 The Hershey Company | 2023 Form 10-K | Page 27

 Other (Income) Expense, Net
 Other (income) expense, net totaled an expense of $237.2 million in 2023 versus an expense of $206.1 million in 2022, an increase of $31.1 million, or 15.1%. The increase in the net expense was primarily driven by an increase of $22.2 million of higher write-downs on equity investments qualifying for tax credits in 2023 versus 2022 and an increase of $9.5 million of higher non-service cost components of net periodic benefit cost relating to pension and other post-retirement benefit plans.
 Other (income) expense, net totaled an expense of $206.1 million in 2022 versus an expense of $119.1 million in 2021, an increase of $87.0 million, or 73.1%. The increase in the net expense was primarily driven by an increase of $75.4 million of higher write-downs on equity investments qualifying for tax credits in 2022 versus 2021 and an increase of $13.3 million of non-service cost components of net periodic benefit cost relating to pension and other post-retirement benefit plans.
 Income Taxes and Effective Tax Rate
 Our effective income tax rate was 14.3% for 2023 compared with 14.2% for 2022. Relative to the 21% statutory rate, the 2023 effective tax rate benefited from investment tax credits, partially offset by state taxes. The 2022 effective rate, relative to the 21% statutory rate, benefited from investment tax credits, partially offset by state taxes.
 Our effective income tax rate was 14.2% for 2022 compared with 17.5% for 2021. Relative to the 21% statutory rate, the 2022 effective tax rate benefited from investment tax credits, partially offset by state taxes. The 2021 effective rate, relative to the 21% statutory rate, benefited from investment tax credits, partially offset by incremental tax reserves incurred as a result of an adverse ruling in connection with a non-U.S. tax litigation matter, as well as state taxes.

 Net Income Attributable to The Hershey Company and Earnings Per Share-diluted
 Net income was $1,861.8 million in 2023 compared to $1,644.8 million in 2022, an increase of $217.0 million, or 13.2%. EPS-diluted was $9.06 in 2023 compared to $7.96 in 2022, an increase of $1.1, or 13.8%. The increase in both net income and EPS-diluted was driven primarily by higher gross profit, partially offset by higher SM&A expenses, higher income taxes, and higher other income and expenses. Our 2023 EPS-diluted also benefited from lower weighted-average shares outstanding as a result of share repurchases pursuant to our Board-approved repurchase programs..
 Net income was $1,644.8 million in 2022 compared to $1,477.5 million in 2021, an increase of $167.3 million, or 11.3%. EPS-diluted was $7.96 in 2022 compared to $7.11 in 2021, an increase of $0.85, or 12.0%. The increase in both net income and EPS-diluted was driven primarily by higher gross profit and lower income taxes, partially offset by higher SM&A expenses and higher other income and expenses. Our 2022 EPS-diluted also benefited from lower weighted-average shares outstanding as a result of share repurchases pursuant to our Board-approved repurchase programs.

 The Hershey Company | 2023 Form 10-K | Page 28

 SEGMENT RESULTS
 The summary that follows provides a discussion of the results of operations of our three segments: North America Confectionery, North America Salty Snacks and International. For segment reporting purposes, we use "segment income" to evaluate segment performance and allocate resources. Segment income excludes unallocated general corporate administrative expenses, unallocated mark-to-market gains and losses on commodity derivatives, business realignment and impairment charges, acquisition-related costs and other unusual gains or losses that are not part of our measurement of segment performance. These items of our operating income are largely managed centrally at the corporate level and are excluded from the measure of segment income reviewed by the Chief Operating Decision Maker and used for resource allocation and internal management reporting and performance evaluation. Segment income and segment income margin, which are presented in the segment discussion that follows, are non-GAAP measures and do not purport to be alternatives to operating income as a measure of operating performance. We believe that these measures are useful to investors and other users of our financial information in evaluating ongoing operating profitability as well as in evaluating operating performance in relation to our competitors, as they exclude the activities that are not directly attributable to our ongoing segment operations.
 Our segment results, including a reconciliation to our consolidated results, were as follows:

 2023
 2022
 2021

 Net Sales:

 $
 9,123.1
 $
 8,536.5
 $
 7,682.4

 1,092.7
 1,029.4
 555.4

 949.2
 853.4
 733.5

 Total
 $
 11,165.0
 $
 10,419.3
 $
 8,971.3

 Segment Income:

 $
 3,117.0
 $
 2,811.1
 $
 2,475.9

 158.3
 159.9
 100.7

 148.3
 107.9
 74.2

 Total segment income
 3,423.6
 3,078.9
 2,650.8

 Unallocated corporate expense (1)
 800.4
 735.5
 614.9

 Unallocated mark-to-market losses (gains) on commodity derivatives (2)
 58.9
 78.2
 (24.4)

 Costs associated with business realignment activities
 3.4
 4.4
 16.6

 Operating profit
 2,560.9
 2,260.8
 2,043.7

 151.8
 137.6
 127.4

 Other (income) expense, net
 237.2
 206.2
 119.1

 Income before income taxes
 $
 2,171.9
 $
 1,917.0
 $
 1,797.2

 (1)Includes centrally-managed (a) corporate functional costs relating to legal, treasury, finance and human resources, (b) expenses associated with the oversight and administration of our global operations, including warehousing, distribution and manufacturing, information systems and global shared services, (c) non-cash stock-based compensation expense, (d) acquisition-related costs and (e) other gains or losses that are not integral to segment performance.
 (2)Net losses (gains) on mark-to-market valuation of commodity derivative positions recognized in unallocated derivative losses (gains). See Note 13 to the Consolidated Financial Statements.

 The Hershey Company | 2023 Form 10-K | Page 29

 The North America Confectionery segment is responsible for our chocolate and non-chocolate confectionery market position in the United States and Canada. This includes developing and growing our business in chocolate and non-chocolate confectionery, gum and refreshment products, protein bars, spreads, snack bites and mixes, as well as pantry and food service lines. While a less significant component, this segment also includes our retail operations, including Hershey's Chocolate World stores in Hershey, Pennsylvania; New York, New York; Las Vegas, Nevada; Niagara Falls (Ontario) and Singapore, as well as operations associated with licensing the use of certain trademarks and products to third parties around the world. North America Confectionery accounted for 81.7%, 81.9% and 85.6% of our net sales in 2023, 2022 and 2021, respectively. North America Confectionery results for the years ended December 31, 2023, 2022 and 2021 were as follows:
 Percent Change

 2023
 2022
 2021
 2023 vs 2022
 2022 vs 2021

 $
 9,123.1
 $
 8,536.5
 $
 7,682.4
 6.9
 %
 11.1
 %

 Segment income
 3,117.0
 2,811.1
 2,475.9
 10.9
 %
 13.5
 %

 Segment margin
 34.2
 %
 32.9
 %
 32.2
 %

 Net sales of our North America Confectionery segment were $9,123.1 million in 2023 compared to $8,536.5 million in 2022, a increase of $586.6 million, or 6.9%. The increase reflected a favorable price realization of 9.0% due to price increases on certain products across our portfolio. The increases were partially offset by a volume decrease of 1.9% driven by a decrease in everyday core U.S. confection brands, and an unfavorable impact from foreign currency exchange rates of 0.2%.
 Our North America Confectionery segment also includes licensing and owned retail. This includes our Hershey's Chocolate World stores in the United States (3 locations), Niagara Falls (Ontario) and Singapore. Our net sales for licensing and owned retail increased approximately 12.1% during 2023 compared to 2022.
 Our North America Confectionery segment income was $3,117.0 million in 2023 compared to $2,811.1 million in 2022, a increase of $305.9 million, or 10.9%. The increase was primarily due to favorable price realization and supply chain productivity, partially offset by higher supply chain costs, including higher labor costs, as well as unfavorable product mix.
 Net sales of our North America Confectionery segment were $8,536.5 million in 2022 compared to $7,682.4 million 2021, an increase of $854.1 million, or 11.1%. The increase reflected a favorable price realization of 8.1% due to higher prices on certain products, a volume increase of 2.8% due to an increase in everyday core U.S. confection brands, and a 0.4% benefit from the 2021 acquisition of Lily's. These increases were partially offset by an unfavorable impact from foreign currency exchange rates of 0.2%.
 Our North America Confectionery segment also includes licensing and owned retail. This includes our Hershey's Chocolate World stores in the United States (3 locations), Niagara Falls (Ontario) and Singapore. Our net sales for licensing and owned retail increased approximately 12.7% during 2022 compared to 2021.
 Our North America Confectionery segment income was $2,811.1 million in 2022 compared to $2,475.9 million in 2021, an increase of $335.2 million, or 13.5%. The increase was primarily due to favorable price realization and volume increases, partially offset by higher supply chain inflation costs, including higher logistics and labor costs, as well as, unfavorable product mix.

 The Hershey Company | 2023 Form 10-K | Page 30

 The North America Salty Snacks segment is responsible for our grocery and snacks market positions, including our salty snacking products. North America Salty Snacks accounted for 9.8%, 9.9% and 6.2% of our net sales in 2023, 2022 and 2021, respectively. North America Salty Snacks results for the years ended December 31, 2023, 2022 and 2021 were as follows:

 Percent Change

 2023
 2022
 2021
 2023 vs 2022
 2022 vs 2021

 $
 1,092.7
 $
 1,029.4
 $
 555.4
 6.1
 %
 85.3
 %

 Segment income
 158.3
 159.9
 100.7
 (1.0)
 %
 58.8
 %

 Segment margin
 14.5
 %
 15.5
 %
 18.1
 %

 Net sales for our North America Salty Snacks segment were $1,092.7 million in 2023 compared to $1,029.4 million in 2022, an increase of $63.3 million, or 6.1%. The increase reflected a favorable price realization of 5.4% due to price increases on products across our portfolio, primarily SkinnyPop and Dot's Homestyle Pretzels snacks, and a volume increase of 0.7%, primarily related to Dot's Homestyle Pretzels snacks.
 Our North America Salty Snacks segment income was $158.3 million in 2023 compared to $159.9 million in 2022 a decrease of $1.6 million, or 1.0%. The decrease is primarily due to increased advertising and related consumer marketing costs and costs related to the voluntary removal of certain Paqui branded items in 2023. The decrease was partially offset by favorable price realization and favorable product mix.
 Net sales for our North America Salty Snacks segment was $1,029.4 million in 2022 compared to $555.4 million in 2021, an increase of $474.0 million, or 85.3%. The increase reflected a 64.0% benefit from the 2021 acquisitions of Dot's and Pretzels, a favorable price realization of 12.0% due to higher prices on certain products and a volume increase of 9.3% primarily related to SkinnyPop and Pirates Booty snacks.
 Our North America Salty Snacks segment income was $159.9 million in 2022 compared to $100.7 million in 2021, an increase of $59.2 million, or 58.8%. The increase is primarily due to favorable price realization and volume increases, partially offset by higher supply chain inflation costs, including higher logistics and labor costs, as well as, unfavorable product mix.

 The Hershey Company | 2023 Form 10-K | Page 31

 The International segment includes all other countries where we currently manufacture, import, market, sell or distribute chocolate and non-chocolate confectionery and other products. We currently, have operations and manufacture product in Mexico, Brazil, India and Malaysia, primarily for consumers in these regions, and also distribute and sell confectionery products in export markets of Latin America, as well as Europe, Asia, the Middle East and Africa ("AMEA") and other regions. International results, which accounted for 8.5%, 8.2% and 8.2% of our net sales in 2023, 2022 and 2021, respectively. International results for the years ended December 31, 2023, 2022 and 2021 were as follows:

 Percent Change

 2023
 2022
 2021
 2023 vs 2022
 2022 vs 2021

 $
 949.2
 $
 853.4
 $
 733.5
 11.2
 %
 16.3
 %

 Segment income
 148.3
 107.9
 74.2
 37.4
 %
 45.4
 %

 Segment margin
 15.6
 %
 12.6
 %
 10.1
 %

 Net sales of our International segment were $949.2 million in 2023 compared to $853.4 million in 2022, an increase of $95.8 million, or 11.2%. The increase reflected a favorable price realization of 4.7%, driven by price increases across the segment, a favorable impact from foreign currency exchange rates of 3.4%, primarily driven by Mexico, and a volume increase of 3.1%. The net sales increase was primarily attributable to World Travel Retail, Mexico and Brazil & Latin America, where net sales increased 15.6%, 14.3% and 13.0%, respectively.
 Our International segment income was $148.3 million in 2023 compared to $107.9 million in 2022, an increase of $40.4 million, or 37.4%, primarily resulting from favorable price realization, favorable foreign currency exchange rates, and minimal volume increases, partially offset by increased supply chain costs.
 Net sales of our International segment were $853.4 million in 2022 compared to $733.5 million in 2021, an increase of $119.9 million, or 16.3% reflecting a volume increase of 11.9%, a favorable price realization of 4.1%, and a favorable impact from foreign currency exchange rates of 0.3%. The volume increase was primarily attributed to solid marketplace growth in Brazil, Mexico and India, where net sales increased by 21.6%, 20.6% and 13.7%, respectively. Our International segment also includes world travel retail, where net sales increased approximately 28.6%.
 Our International segment income was $107.9 million in 2022 compared to $74.2 million in 2021, an increase of $33.7 million, or 45.4%, primarily resulting from volume increases, favorable price realization, and the execution of our International Optimization Program in China, as we streamline and optimize our China operating model.

 The Hershey Company | 2023 Form 10-K | Page 32

 Unallocated Corporate Expense
 Unallocated corporate expense includes centrally-managed (a) corporate functional costs relating to legal, treasury, finance and human resources, (b) expenses associated with the oversight and administration of our global operations, including warehousing, distribution and manufacturing, information systems and global shared services, (c) non-cash stock-based compensation expense and (d) other gains or losses that are not integral to segment performance.
 Unallocated corporate expense totaled $800.4 million in 2023 as compared to $735.5 million in 2022, an increase of $64.9 or, or 8.8%. The increase was primarily driven by incremental investments in capabilities and technology, higher compensation costs, and an increase in acquisition and integration related costs.
 Unallocated corporate expense totaled $735.5 million in 2022 as compared to $614.9 million in 2021, an increase of $120.6 million, or 19.6%. The increase was primarily driven by an increase in acquisition and integration related costs, as well as higher compensation costs, investments in capabilities and technology and broad-based marketplace inflation.

 LIQUIDITY AND CAPITAL RESOURCES
 We assess our liquidity in terms of our ability to generate cash to fund our operating, investing and financing activities. Significant factors affecting liquidity include cash flows generated from operating activities, capital expenditures, acquisitions, dividends, repurchases of outstanding shares, the adequacy of available commercial paper and bank lines of credit, and the ability to attract long-term capital with satisfactory terms. We generate substantial amounts of cash from operations and remain in a strong financial position, with sufficient liquidity available for capital reinvestment, strategic acquisitions and the payment of dividends.
 Cash Flow Summary
 The following table is derived from our Consolidated Statements of Cash Flows:

 2023
 2022
 2021

 Net cash provided by (used in):

 Operating activities
 $
 2,323.2
 $
 2,327.8
 $
 2,082.9

 Investing activities
 (1,198.7)
 (787.4)
 (2,222.8)

 Financing activities
 (1,148.3)
 (1,415.7)
 (681.1)

 Effect of exchange rate changes on cash and cash equivalents
 (38.2)
 9.9
 (5.1)

 Less: Cash classified as assets held for sale
 —
 —
 11.4

 (Decrease) increase in cash and cash equivalents
 $
 (62.0)
 $
 134.6
 $
 (814.7)

 Operating activities
 Our principal source of liquidity is cash flow from operations. Our net income and, consequently, our cash provided by operations are impacted by sales volume, seasonal sales patterns, timing of new product introductions, profit margins and price changes. Sales are typically higher during the third and fourth quarters of the year due to seasonal and holiday-related sales patterns. Generally, working capital needs peak during the summer months. We meet these needs primarily with cash on hand, bank borrowings or the issuance of commercial paper.
 We generated cash of $2.32 billion from operating activities in 2023, a decrease of $4.6 million compared to $2.33 billion in 2022. The decrease in net cash provided by operating activities was mainly driven by the following factors:
 • In the aggregate, select net working capital items, specifically, trade accounts receivable, inventory, accounts payable and accrued liabilities, consumed cash of $209.0 million in 2023, compared to $8.6 million in 2022. This $200.4 million fluctuation was mainly driven by mainly driven by an increase in cash used by accounts receivable due to an increase in sales of U.S. seasonal products and the timing of vendor and supplier payments.
 • Timing of income tax payments contributed to a decrease in operating cash of $32.5 million in 2023, compared to an increase of $5.0 million in 2022. This $37.5 million fluctuation was primarily due to the variance in actual tax

 The Hershey Company | 2023 Form 10-K | Page 33

 expense for 2023 relative to the timing of quarterly estimated tax payments. We paid cash of $303.9 million for income taxes during 2023 compared to $221.3 million in the same period of 2022.
 • Other assets and liabilities consumed cash of $100.4 million in 2023, compared to $25.7 million in 2022. This $74.7 million fluctuation was primarily due to our purchase of an irrevocable group annuity contract to settle a portion of our post retirement benefit obligation.
 • The decrease in cash provided by operating activities was partially offset by the following net cash inflows:
 Net income adjusted for non-cash charges to operations (including depreciation, amortization, stock-based compensation, deferred income taxes, write-down of equity investments and other charges) resulted in $256.7 million of higher cash flow in 2023 relative to 2022.
 We generated cash of $2.3 billion from operating activities in 2022, an increase of $244.9 million compared to $2.1 billion in 2021. This increase in net cash provided by operating activities was mainly driven by the following factors:
 • In the aggregate, select net working capital items, specifically, trade accounts receivable, inventory, accounts payable and accrued liabilities, consumed cash of $9 million in 2022 and generated cash of $47 million in 2021. This $56 million fluctuation was mainly driven by a higher year-over-year build up of U.S. inventories to satisfy product requirements and maintain sufficient levels to accommodate customer requirements, partially offset by the timing of vendor and supplier payments.
 • Net income adjusted for non-cash charges to operations (including depreciation, amortization, stock-based compensation, deferred income taxes, write-down of equity investments and other charges) resulted in $348 million of higher cash flow in 2022 relative to 2021.
 Pension and Post-Retirement Activity. We recorded net periodic benefit costs of $43.2 million, $36.3 million and $28.4 million in 2023, 2022 and 2021, respectively, relating to our benefit plans (including our defined benefit and other post retirement plans). The main drivers of fluctuations in expense from year to year are assumptions in formulating our long-term estimates, including discount rates used to value the service and interest costs and the amortization of actuarial gains and losses.
 The funded status of our qualified defined benefit pension plans is dependent upon many factors, including returns on invested assets, the level of market interest rates and the level of funding. We contribute cash to our plans at our discretion, subject to applicable regulations and minimum contribution requirements. Cash contributions to our pension and post retirement plans totaled $27.6 million, $78.5 million and $51.1 million in 2023, 2022 and 2021, respectively.
 Investing activities
 Our principal uses of cash for investment purposes relate to purchases of property, plant and equipment and capitalized software, as well as acquisitions of businesses, partially offset by proceeds from sales of property, plant and equipment. We used cash of $1.2 billion for investing activities in 2023 compared to $0.8 billion in 2022, with the increase in cash spend driven by an increase of investments in capabilities and technology as well as a higher level of acquisition activity. We used cash of $2.2 billion for investing activities in 2021, with the decrease in 2022 in cash spend driven by lower levels of acquisition activity, partially offset by higher capital spend and investment tax credits.
 Primary investing activities include the following:
 • Capital spending. Capital expenditures, including capitalized software, primarily to support our ERP system implementation, capacity expansion, innovation and cost savings, were $771.1 million in 2023, $519.5 million in 2022 and $495.9 million in 2021. For each of the years presented, our expenditures increased due to progress on capacity expansion projects and our ERP system implementation. We expect 2024 capital expenditures, including capitalized software, to approximate $600 million to $650 million. The decrease in our 2024 capital expenditures is largely driven by the wind down of our key strategic initiatives, including completion of the upgrade of a new ERP system across the enterprise in 2024. We intend to use our existing cash and internally generated funds to meet our 2024 capital requirements.

 The Hershey Company | 2023 Form 10-K | Page 34

 • Investments in partnerships qualifying for tax credits. We make investments in partnership entities that in turn make equity investments in projects eligible to receive federal historic and energy tax credits. We invested approximately $256.8 million in 2023, $275.5 million in 2022 and $128.4 million in 2021 in projects qualifying for tax credits.
 • Business acquisitions. In 2023, we spent $165.8 million to acquire Weaver (May 2023). In 2022, we had no acquisition activity. In 2021, we spent an aggregate $1.6 billion to acquire Lily's (June 2021), as well as Dot's and Pretzels (December 2021). Further details regarding our business acquisition activity is provided in Note 2 to the Consolidated Financial Statements.
 • Other investing activities. In 2023, 2022, and 2021, our other investing activities were minimal.
 Financing activities
 Our cash flow from financing activities generally relates to the use of cash for purchases of our Common Stock and payment of dividends, offset by net borrowing activity and proceeds from the exercise of stock options. Financing activities in 2023 used cash of $1.1 billion, compared to cash used of $1.4 billion in 2022. We used cash of $0.7 billion for financing activities in 2021.
 The majority of our financing activity was attributed to the following:
 • Short-term borrowings, net. In addition to utilizing cash on hand, we use short-term borrowings (commercial paper and bank borrowings) to fund seasonal working capital requirements and ongoing business needs. In 2023, our short-term borrowings increased $26.0 million predominately through the issuance of short-term commercial paper, as well as an increase in short-term foreign bank borrowings. In 2022, we used cash of $245.6 million to reduce a portion of our short-term commercial paper borrowings originally used to fund our 2021 acquisitions of Dot's and Pretzels, partially offset by an increase in short-term foreign bank borrowings. In 2021, we generated cash flow of $869.0 million predominantly through the issuance of short-term commercial paper.
 • Long-term debt borrowings and repayments. In May 2023, we repaid $250 million of 2.625% Notes and $500 million of 3.375% Notes due upon their maturities. In May 2023, we issued $350 million of 4.250% Notes due in May 2028 and $400 million of 4.500% Notes due in May 2033 (the "2023 Notes"). Proceeds from the issuance of the 2023 Notes, net of discounts and issuance costs, totaled $744.1 million. In 2022, long-term debt activity was minimal. In February 2021 and May 2021, we repaid $84.7 million of 8.800% Debentures and $350 million of 3.100% Notes due upon their maturities, respectively. In 2024, we expect our long-term debt repayments to approximate $300 million upon the maturity of $300 million of 2.050% Notes due in November 2024.
 • Dividend payments. Total dividend payments to holders of our Common Stock and Class B Common Stock were $889.1 million in 2023, $775.0 million in 2022 and $686.0 million in 2021. Dividends per share of Common Stock increased 15.0% to $4.456 per share in 2023 compared to $3.874 per share in 2022, while dividends per share of Class B Common Stock increased 15.0% in 2023. Details regarding our 2023 cash dividends paid to stockholders are as follows:

 Quarter Ended

 In millions of dollars except per share amounts
 April 2, 2023
 July 2, 2023
 October 1, 2023
 December 31, 2023

 Dividends paid per share – Common stock
 $
 1.036
 $
 1.036
 $
 1.192
 $
 1.192

 Dividends paid per share – Class B common stock
 $
 0.942
 $
 0.942
 $
 1.083
 $
 1.083

 Total cash dividends paid
 $
 207.4
 $
 206.1
 $
 237.8
 $
 237.8

 Declaration date
 January 31, 2023
 April 25, 2023
 July 27, 2023
 October 25, 2023

 Record date
 February 17, 2023
 May 19, 2023
 August 18, 2023
 November 17, 2023

 Payment date
 March 15, 2023
 June 15, 2023
 September 15, 2023
 December 15, 2023

 The Hershey Company | 2023 Form 10-K | Page 35

 • Share repurchases. We repurchase shares of Common Stock to offset the dilutive impact of treasury shares issued under our equity compensation plans. The value of these share repurchases in a given period varies based on the volume of stock options exercised and our market price. In addition, we periodically repurchase shares of Common Stock pursuant to Board-authorized programs intended to drive additional stockholder value. Details regarding our share repurchases are as follows:

 In millions
 2023
 2022
 2021

 Milton Hershey School Trust repurchase (1)(2)
 $
 239.9
 $
 203.4
 $
 —

 Shares repurchased in the open market under pre-approved share repurchase programs (2)
 —
 —
 150.0

 Shares repurchased in the open market to replace Treasury Stock issued for stock options and incentive compensation
 $
 27.4
 $
 185.6
 $
 308.0

 Cash used for total share repurchases (excluding excise tax)
 $
 267.3
 $
 389.0
 $
 458.0

 Total shares repurchased under pre-approved share repurchase programs
 1.0
 —
 0.9

 (1) In February 2023 and 2022, the Company entered into a Stock Purchase Agreement with Hershey Trust Company, as trustee for the School Trust, pursuant to which the Company purchased 1,000,000 shares in 2023 and 2022 of the Company's Common Stock from the School Trust at a price equal to $239.91 per share, for a total purchase price of $239.9 million in 2023. In 2022 the Company purchased the common stock at a price equal to $203.35 per share, for a total purchase price of $203.4 million. As a result of the 2023 share repurchase, our July 2018 share repurchase authorization program was completed, and approximately $370.1 million remains available for repurchases under our May 2021 share repurchase authorization.
 (2) In July 2018, our Board of Directors approved a $500 million share repurchase authorization. In May 2021, our Board of Directors approved an additional $500 million share repurchase authorization. As a result of the February 2023 Stock Purchase Agreement with Hershey Trust Company, as trustee for the School Trust, the July 2018 share repurchase authorization was completed and as of December 31, 2023, approximately $370.1 million remained available for repurchases under our May 2021 share repurchase authorization. In December 2023, our Board of Directors approved an additional $500 million share repurchase authorization. This program is to commence after the existing 2021 authorization is completed and is to be utilized at management's discretion. These share repurchase programs do not have an expiration date. We expect 2024 share repurchases to be in line with our traditional buyback strategy.
 • Proceeds from the exercise of stock options, including tax benefits. In 2023 we received $26.0 million from employee exercises of stock options and paid $35.0 million of employee taxes withheld from share-based awards. In 2022 we received $34.2 million from employee exercises of stock options and paid $35.5 million of employee taxes withheld from share-based awards. In 2021 we received $33.2 million from employee exercises of stock options, net of employee taxes withheld from share-based awards. Variances are driven primarily by the number of shares exercised and the share price at the date of grant.

 The Hershey Company | 2023 Form 10-K | Page 36

 Financial Condition
 At December 31, 2023, our cash and cash equivalents totaled $401.9 million. At December 31, 2022, our cash and cash equivalents totaled $463.9 million. Our cash and cash equivalents at the end of 2023 decreased $62.0 million compared to the 2022 year-end balance as a result of the net uses of cash outlined in the previous discussion.
 Approximately 80% of the balance of our cash and cash equivalents at December 31, 2023 was held by subsidiaries domiciled outside of the United States. A majority of this balance is distributable to the United States without material tax implications, such as withholding tax. We intend to continue to reinvest the remainder of the earnings outside of the United States for which there would be a material tax implication to distributing for the foreseeable future and, therefore, have not recognized additional tax expense on these earnings. We believe that our existing sources of liquidity are adequate to meet anticipated funding needs at comparable risk-based interest rates for the foreseeable future. Acquisition spending and/or share repurchases could potentially increase our debt. Operating cash flow and access to capital markets are expected to satisfy our various short- and long-term cash flow requirements, including acquisitions and capital expenditures.
 We maintain debt levels we consider prudent based on our cash flow, interest coverage ratio and percentage of debt to capital. We use debt financing to lower our overall cost of capital which increases our return on stockholders' equity. Our total short- and long-term debt was $4.8 billion at December 31, 2023 and December 31, 2022. Our total debt remained consistent in 2023 primarily due to the repayment of $250 million of 2.625% Notes and $500 million of 3.375% Notes due upon their maturity in May 2023 offset by the issuance of $350 million of 4.250% Notes due in May 2028 and $400 million of 4.500% Notes due in May 2033.
 As a source of short-term financing, we maintain a $1.35 billion unsecured revolving credit facility with the option to increase borrowings by an additional $500 million with the consent of the lenders. As of December 31, 2023, the termination date of this agreement is April 26, 2028, however, we may extend the termination date for up to two additional one-year periods upon notice to the administrative agent under the facility. We may use these funds for general corporate purposes, including commercial paper backstop and business acquisitions. As of December 31, 2023, we had $822 million of available capacity under the agreement. The unsecured revolving credit agreement contains certain financial and other covenants, customary representations, warranties and events of default. We were in compliance with all covenants as of December 31, 2023.
 In addition to the revolving credit facility, we maintain lines of credit in various currencies with domestic and international commercial banks. As of December 31, 2023, we had available capacity of $219 million under these lines of credit.
 Furthermore, we have a current shelf registration statement filed with the SEC that allows for the issuance of an indeterminate amount of debt securities. Proceeds from the debt issuances and any other offerings under the current registration statement may be used for general corporate requirements, including reducing existing borrowings, financing capital additions and funding contributions to our pension plans, future business acquisitions and working capital requirements.
 Our ability to obtain debt financing at comparable risk-based interest rates is partly a function of our existing cash-flow-to-debt and debt-to-capitalization levels as well as our current credit rating.
 We believe that our existing sources of liquidity are adequate to meet anticipated funding needs at comparable risk-based interest rates for the foreseeable future. Acquisition spending and/or share repurchases could potentially increase our debt. Operating cash flow and access to capital markets are expected to satisfy our various short- and long-term cash flow requirements, including acquisitions and capital expenditures.

 The Hershey Company | 2023 Form 10-K | Page 37

 Equity Structure
 We have two classes of stock outstanding – Common Stock and Class B Stock. Holders of the Common Stock and the Class B Stock generally vote together without regard to class on matters submitted to stockholders, including the election of directors. Holders of the Common Stock have 1 vote per share. Holders of the Class B Stock have 10 votes per share. Holders of the Common Stock, voting separately as a class, are entitled to elect one-sixth of our Board. With respect to dividend rights, holders of the Common Stock are entitled to cash dividends 10% higher than those declared and paid on the Class B Stock.
 Hershey Trust Company, as trustee for the trust established by Milton S. and Catherine S. Hershey that has as its sole beneficiary Milton Hershey School, maintains voting control over The Hershey Company. In addition, three representatives of Hershey Trust Company currently serve as members of the Company's Board. In performing their responsibilities on the Company's Board, these representatives may from time to time exercise influence with regard to the ongoing business decisions of our Board or management. Hershey Trust Company, as trustee for the Trust, in its role as controlling stockholder of the Company, has indicated it intends to retain its controlling interest in The Hershey Company. The Company's Board, and not the Hershey Trust Company board, is solely responsible and accountable for the Company's management and performance.
 Pennsylvania law requires that the Office of Attorney General be provided advance notice of any transaction that would result in Hershey Trust Company, as trustee for the Trust, no longer having voting control of the Company. The law provides specific statutory authority for the Attorney General to intercede and petition the court having jurisdiction over Hershey Trust Company, as trustee for the Trust, to stop such a transaction if the Attorney General can prove that the transaction is unnecessary for the future economic viability of the Company and is inconsistent with investment and management considerations under fiduciary obligations. This legislation makes it more difficult for a third party to acquire a majority of our outstanding voting stock and thereby may delay or prevent a change in control of the Company.
 Material Cash Requirements
 The following table summarizes our future material cash requirements as of December 31, 2023:

 Payments due by Period

 Total
 Less than 1 year
 1-3 years
 3-5 years
 More than 5 years

 Short-term debt (primarily U.S. commercial paper)
 $
 719.8
 $
 719.8
 $
 —
 $
 —
 $
 —

 Long-term notes (excluding finance lease obligations)
 4,043.6
 300.0
 1,100.0
 543.6
 2,100.0

 Interest expense (1)
 1,244.1
 122.0
 218.0
 162.7
 741.4

 Operating lease obligations (2)
 397.1
 44.7
 58.1
 51.1
 243.2

 Finance lease obligations (3)
 170.7
 10.2
 14.1
 8.5
 137.9

 Unconditional purchase obligations (4)
 2,891.8
 2,111.1
 631.2
 28.4
 121.1

 Total obligations
 $
 9,467.1
 $
 3,307.8
 $
 2,021.4
 $
 794.3
 $
 3,343.6

 (1) Includes the net interest payments on fixed rate debt associated with long-term notes.
 (2) Includes the minimum rental commitments (including imputed interest) under non-cancelable operating leases primarily for offices, retail stores, warehouses and distribution facilities.
 (3) Includes the minimum rental commitments (including imputed interest) under non-cancelable finance leases primarily for offices and warehouse facilities, as well as machinery and equipment and vehicles.
 (4) Purchase obligations consist primarily of fixed commitments for the purchase of raw materials to be utilized in the normal course of business. Amounts presented include fixed price forward contracts and unpriced contracts that were valued using market prices as of December 31, 2023. The amounts presented in the table do not include items already recorded in accounts payable or accrued liabilities at year-end 2023, nor does the table reflect cash flows we are likely to incur based on our plans, but are not obligated to incur. Such amounts are part of normal operations and are reflected in historical operating cash flow trends. We do not believe such purchase obligations will adversely affect our liquidity position.

 The Hershey Company | 2023 Form 10-K | Page 38

 In entering into contractual obligations, we have assumed the risk that might arise from the possible inability of counterparties to meet the terms of their contracts. We mitigate this risk by performing financial assessments prior to contract execution, conducting periodic evaluations of counterparty performance and maintaining a diverse portfolio of qualified counterparties. Our risk is limited to replacing the contracts at prevailing market rates. We do not expect any significant losses resulting from counterparty defaults.
 These obligations impact our liquidity and capital resource needs. To meet those cash requirements, we intend to use our existing cash and internally generated funds. To the extent necessary, we may also borrow under our existing unsecured revolving credit facility or under other short-term borrowings, and depending on market conditions and upon the significance of the cost of a particular Note maturity or acquisition to our then-available sources of funds, to obtain additional short- and long-term financing. We believe that cash provided from these sources will be adequate to meet our future short- and long-term cash requirements.
 Asset Retirement Obligations
 We have a number of facilities that contain varying amounts of asbestos in certain locations within the facilities. Our asbestos management program is compliant with current applicable regulations, which require that we handle or dispose of asbestos in a specified manner if such facilities undergo major renovations or are demolished. We do not have sufficient information to estimate the fair value of any asset retirement obligations related to these facilities. We cannot specify the settlement date or range of potential settlement dates and, therefore, sufficient information is not available to apply an expected present value technique. We expect to maintain the facilities with repairs and maintenance activities that would not involve or require the removal of significant quantities of asbestos.
 Income Tax Obligations
 Liabilities for unrecognized income tax benefits are excluded from the table above as we are unable to reasonably predict the ultimate amount or timing of a settlement of these potential liabilities. See Note 10 to the Consolidated Financial Statements for more information.
 Recent Accounting Pronouncements
 Information on recently adopted and issued accounting standards is included in Note 1 to the Consolidated Financial Statements.

 The Hershey Company | 2023 Form 10-K | Page 39

 CRITICAL ACCOUNTING POLICIES AND ESTIMATES
 The preparation of financial statements requires management to use judgment and make estimates and assumptions. We believe that our most critical accounting policies and estimates relate to the following:

 • Accrued Liabilities for Trade Promotion Activities
 • Pension and Other Post-Retirement Benefits Plans
 • Business Acquisitions, Valuation and Impairment of Goodwill and Other Intangible Assets
 • Income Taxes

 Management has discussed the development, selection and disclosure of critical accounting policies and estimates with the Audit Committee of our Board. While we base estimates and assumptions on our knowledge of current events and actions we may undertake in the future, actual results may ultimately differ from these estimates and assumptions. Other significant accounting policies are outlined in Note 1 to the Consolidated Financial Statements.
 Accrued Liabilities for Trade Promotion Activities
 We promote our products with advertising, trade promotions and consumer incentives. These programs include, but are not limited to, discounts, coupons, rebates, in-store display incentives and volume-based incentives. We expense advertising costs and other direct marketing expenses as incurred. We recognize the costs of trade promotion and consumer incentive activities as a reduction to net sales along with a corresponding accrued liability based on estimates at the time of revenue recognition. These estimates are based on our analysis of the programs offered, historical trends, expectations regarding customer and consumer participation, sales and payment trends and our experience with payment patterns associated with similar programs offered in the past. The estimated costs of these programs are reasonably likely to change in future periods due to changes in trends with regard to customer and consumer participation, particularly for new programs and for programs related to the introduction of new products. Differences between estimated expense and actual program performance are recognized as a change in estimate in a subsequent period and are normally not significant. During 2023, 2022, and 2021, actual annual promotional costs have not deviated from the estimated amount by more than 3%. Our trade promotion and consumer incentive accrued liabilities totaled $194.0 million and $215.7 million at December 31, 2023 and 2022, respectively.
 Pension and Other Post-Retirement Benefits Plans
 We sponsor various defined benefit pension plans. The primary plans were The Hershey Company Retirement Plan ("Retirement Plan") and the Hershey Company Retirement Plan for Hourly Employees ("Hourly Plan"). These are cash balance plans that provide pension benefits for most U.S. employees hired prior to January 1, 2007. Effective December 31, 2023, the Hourly Plan merged into the Retirement Plan and the name was changed to The Hershey Retirement Plan for Salaried and Hourly Employees. We also sponsor two primary other post-employment benefit ("OPEB") plans, consisting of a health care plan and life insurance plan for retirees. The health care plan is contributory, with participants' contributions adjusted annually, and the life insurance plan is non-contributory.
 For accounting purposes, the defined benefit pension and OPEB plans require assumptions to estimate the projected and accumulated benefit obligations, including the following variables: discount rate; expected salary increases; certain employee-related factors, such as turnover, retirement age and mortality; expected return on assets; and health care cost trend rates. These and other assumptions affect the annual expense and obligations recognized for the underlying plans. Our assumptions reflect our historical experiences and management's best judgment regarding future expectations. Our related accounting policies, accounting balances and plan assumptions are discussed in Note 11 to the Consolidated Financial Statements.

 Pension Plans
 Changes in certain assumptions could significantly affect pension expense and benefit obligations, particularly the estimated long-term rate of return on plan assets and the discount rates used to calculate such obligations:

 • Long-term rate of return on plan assets. The expected long-term rate of return is evaluated on an annual basis. We consider a number of factors when setting assumptions with respect to the long-term rate of return, including current and expected asset allocation and historical and expected returns on the plan asset categories. Actual asset

 The Hershey Company | 2023 Form 10-K | Page 40

 allocations are regularly reviewed and periodically rebalanced to the targeted allocations when considered appropriate. Investment gains or losses represent the difference between the expected return estimated using the long-term rate of return and the actual return realized. For 2023, we increased the expected return on plan assets assumption to 6.7% from the 6.3% assumption used during 2022. The historical average return (compounded annually) over the 20 years prior to December 31, 2023 was approximately 6.7%.

 As of December 31, 2023, our plans had cumulative unrecognized investment and actuarial losses of approximately $181 million. We amortize the unrecognized net actuarial gains and losses in excess of the corridor amount, which is the greater of 10% of a respective plan's projected benefit obligation or the fair market value of plan assets. These unrecognized net losses may increase future pension expense if not offset by (i) actual investment returns that exceed the expected long-term rate of investment returns, (ii) other factors, including reduced pension liabilities arising from higher discount rates used to calculate pension obligations or (iii) other actuarial gains when actual plan experience is favorable as compared to the assumed experience. A 100 basis point decrease or increase in the long-term rate of return on pension assets would correspondingly increase or decrease annual net periodic pension benefit expense by approximately $7 million.

 • Discount rate. We utilize a full yield curve approach in the estimation of service and interest costs by applying the specific spot rates along the yield curve used in the determination of the benefit obligation to the relevant projected cash flows. This approach provides a more precise measurement of service and interest costs by improving the correlation between the projected cash flows to the corresponding spot rates along the yield curve. This approach does not affect the measurement of our pension and other post-retirement benefit liabilities but generally results in lower benefit expense in periods when the yield curve is upward sloping.
 A 100 basis point decrease (increase) in the weighted-average pension discount rate would increase (decrease) annual net periodic pension benefit expense by approximately $5 million and the December 31, 2023 pension liability would increase by approximately $57 million or decrease by approximately $49 million, respectively.
 Pension expense for defined benefit pension plans is expected to be approximately $13 million in 2024. Pension expense beyond 2024 will depend on future investment performance, our contributions to the pension trusts, changes in discount rates and various other factors related to the covered employees in the plans.
 Other Post-Employment Benefit Plans
 Changes in significant assumptions could affect consolidated expense and benefit obligations, particularly the discount rates used to calculate such obligations:
 • Discount rate. The determination of the discount rate used to calculate the benefit obligations of the OPEB plans is discussed in the pension plans section above. A 100 basis point decrease (increase) in the discount rate assumption for these plans would not be material to the OPEB plans' consolidated expense and the December 31, 2023 benefit liability would increase by approximately $9 million or decrease by approximately $8 million, respectively.
 Business Acquisitions, Valuation and Impairment of Goodwill and Other Intangible Assets
 We use the acquisition method of accounting for business acquisitions. Under the acquisition method, the results of operations of the acquired business have been included in the consolidated financial statements since the respective dates of the acquisitions. The assets acquired and liabilities assumed are recorded at their respective estimated fair values at the date of the acquisition. Any excess of the purchase price over the estimated fair values of the identifiable net assets acquired is recorded as goodwill. Significant judgment is often required in estimating the fair value of assets acquired, particularly intangible assets. As a result, we normally obtain the assistance of a third-party valuation specialist in estimating fair values of tangible and intangible assets. The fair value estimates are based on available historical information and on expectations and assumptions about the future, considering the perspective of marketplace participants. While management believes those expectations and assumptions are reasonable, they are inherently uncertain. Unanticipated market or macroeconomic events and circumstances may occur, which could affect the accuracy or validity of the estimates and assumptions.

 The Hershey Company | 2023 Form 10-K | Page 41

 Goodwill and indefinite-lived intangible assets are not amortized, but instead, are evaluated for impairment annually or more often if indicators of a potential impairment are present. Our annual impairment tests are conducted at the beginning of the fourth quarter.

 We test goodwill for impairment by performing either a qualitative or quantitative assessment. If we choose to perform a qualitative assessment, we evaluate economic, industry and company-specific factors in assessing the fair value of the related reporting unit. If we determine that it is more likely than not that the fair value of the reporting unit is less than its carrying value, a quantitative test is then performed. Otherwise, no further testing is required. For those reporting units tested using a quantitative approach, we compare the fair value of each reporting unit with the carrying amount of the reporting unit, including goodwill. If the estimated fair value of the reporting unit is less than the carrying amount of the reporting unit, impairment is indicated, requiring recognition of a goodwill impairment charge for the differential (up to the carrying value of goodwill). We test individual indefinite-lived intangible assets by comparing the estimated fair values with the book values of each asset.

 We determine the fair value of our reporting units and indefinite-lived intangible assets using an income approach. Under the income approach, we calculate the fair value of our reporting units and indefinite-lived intangible assets based on the present value of estimated future cash flows. Considerable management judgment is necessary to evaluate the impact of operating and macroeconomic changes and to estimate the future cash flows used to measure fair value. Our estimates of future cash flows consider past performance, current and anticipated market conditions and internal projections and operating plans which incorporate estimates for sales growth and profitability, and cash flows associated with taxes and capital spending. Additional assumptions include forecasted growth rates, estimated discount rates, which may be risk-adjusted for the operating market of the reporting unit, and estimated royalty rates that would be charged for comparable branded licenses. We believe such assumptions also reflect current and anticipated market conditions and are consistent with those that would be used by other marketplace participants for similar valuation purposes. Such assumptions are subject to change due to changing economic and competitive conditions.

 We also have intangible assets, consisting primarily of certain trademarks, customer-related intangible assets and patents obtained through business acquisitions, that are expected to have determinable useful lives. The costs of finite-lived intangible assets are amortized to expense over their estimated lives. Our estimates of the useful lives of finite-lived intangible assets consider judgments regarding the future effects of obsolescence, demand, competition and other economic factors. We conduct impairment tests when events or changes in circumstances indicate that the carrying value of these finite-lived assets may not be recoverable. Undiscounted cash flow analyses are used to determine if an impairment exists. If an impairment is determined to exist, the loss is calculated based on the estimated fair value of the assets.

 Results of Impairment Tests

 At December 31, 2023, the net book value of our goodwill totaled $2.7 billion. As it relates to our 2023 annual testing performed at the beginning of the fourth quarter, we tested all of our reporting units using a quantitative assessment. Based on our testing, all of our reporting units had an excess fair value well over their respective carrying values. There were no other events or circumstances that would indicate that impairment may exist. We had no goodwill impairment charges in 2023, 2022 or 2021.

 Income Taxes
 We base our deferred income taxes, accrued income taxes and provision for income taxes upon income, statutory tax rates, the legal structure of our Company, interpretation of tax laws and tax planning opportunities available to us in the various jurisdictions in which we operate. We file income tax returns in the U.S. federal jurisdiction and various state and foreign jurisdictions. We are regularly audited by federal, state and foreign tax authorities; a number of years may elapse before an uncertain tax position, for which we have unrecognized tax benefits, is audited and finally resolved. From time to time, these audits result in assessments of additional tax. We maintain reserves for such assessments.
 We apply a more-likely-than-not threshold to the recognition and derecognition of uncertain tax positions. Accordingly, we recognize the amount of tax benefit that has a greater than 50% likelihood of being ultimately

 The Hershey Company | 2023 Form 10-K | Page 42

 realized upon settlement. Future changes in judgments and estimates related to the expected ultimate resolution of uncertain tax positions will affect income in the quarter of such change. While it is often difficult to predict the final outcome or the timing of resolution of any particular uncertain tax position, we believe that our unrecognized tax benefits reflect the most likely outcome. Accrued interest and penalties related to unrecognized tax benefits are included in income tax expense. We adjust these unrecognized tax benefits, as well as the related interest, in light of changing facts and circumstances, such as receiving audit assessments or clearing of an item for which a reserve has been established. Settlement of any particular position could require the use of cash. Favorable resolution would be recognized as a reduction to our effective income tax rate in the period of resolution.
 We believe it is more likely than not that the results of future operations will generate sufficient taxable income to realize the deferred tax assets, net of valuation allowances. Our valuation allowances are primarily related to U.S. capital loss carryforwards and various foreign jurisdictions' net operating loss carryforwards and other deferred tax assets for which we do not expect to realize a benefit. Refer to Note 10 to the Consolidated Financial Statements for further discussion of our deferred tax assets and liabilities.

 Item 7A. QUANTITATIVE AND QUALITATIVE DISCLOSURES ABOUT MARKET RISK
 We use certain derivative instruments to manage our interest rate, foreign currency exchange rate and commodity price risks. We monitor and manage these exposures as part of our overall risk management program.
 We enter into interest rate swap agreements and foreign currency forward exchange contracts for periods consistent with related underlying exposures. We enter into commodities futures and options contracts and other derivative instruments for varying periods. These commodity derivative instruments are intended to be, and are effective as, economic hedges of market price risks associated with anticipated raw material purchases, energy requirements and transportation costs. We do not hold or issue derivative instruments for trading purposes and are not a party to any instruments with leverage or prepayment features.
 In entering into these contracts, we have assumed the risk that might arise from the possible inability of counterparties to meet the terms of their contracts. We mitigate this risk by entering into exchange-traded contracts with collateral posting requirements and/or by performing financial assessments prior to contract execution, conducting periodic evaluations of counterparty performance and maintaining a diverse portfolio of qualified counterparties. We do not expect any significant losses from counterparty defaults.
 Refer to Note 1 and Note 5 to the Consolidated Financial Statements for further discussion of these derivative instruments and our hedging policies.
 Interest Rate Risk
 The total amount of short-term debt, net of cash, amounted to net debt of $318 million and net debt of $230 million, respectively, at December 31, 2023 and 2022. A hypothetical 100 basis point increase in interest rates applied to this variable-rate short-term debt as of December 31, 2023 would have changed interest expense by approximately $3.1 million for 2023 and $4.5 million for 2022.
 We consider our current risk related to market fluctuations in interest rates on our remaining debt portfolio, excluding fixed-rate debt converted to variable rates with fixed-to-floating instruments, to be minimal since this debt is largely long-term and fixed-rate in nature. Generally, the fair market value of fixed-rate debt will increase as interest rates fall and decrease as interest rates rise. A 100 basis point increase in market interest rates would decrease the fair value of our fixed-rate long-term debt at December 31, 2023 and December 31, 2022 by approximately $203 million and $187 million, respectively. However, since we currently have no plans to repurchase our outstanding fixed-rate instruments before their maturities, the impact of market interest rate fluctuations on our long-term debt does not affect our results of operations or financial position.

 The Hershey Company | 2023 Form 10-K | Page 43

 Foreign Currency Exchange Rate Risk
 We are exposed to currency fluctuations related to manufacturing or selling products in currencies other than the U.S. dollar. We may enter into foreign currency forward exchange contracts to reduce fluctuations in our long or short currency positions relating primarily to purchase commitments or forecasted purchases for equipment, raw materials and finished goods denominated in foreign currencies. We also may hedge payment of forecasted intercompany transactions with our subsidiaries outside of the United States. We generally hedge foreign currency price risks for periods from 3 to 12 months.
 A summary of foreign currency forward exchange contracts and the corresponding amounts at contracted forward rates is as follows:

 2023
 2022

 Contract
Amount
 Primary
Currencies
 Contract
Amount
 Primary
Currencies

 Foreign currency forward exchange contracts to purchase foreign currencies
 $
 88.8
 Euros
Malaysian ringgit
British pound
 $
 58.3
 Euros
Malaysian ringgit

 Foreign currency forward exchange contracts to sell foreign currencies
 $
 155.3
 Canadian dollars
Brazilian reals
Japanese yen
 $
 119.6
 Canadian dollars
Brazilian reals
Japanese yen
Mexican pesos

 The fair value of foreign currency forward exchange contracts represents the difference between the contracted and current market foreign currency exchange rates at the end of the period. We estimate the fair value of foreign currency forward exchange contracts on a quarterly basis by obtaining market quotes of spot and forward rates for contracts with similar terms, adjusted where necessary for maturity differences. At December 31, 2023 and 2022, the net fair value of these instruments was an asset of $0.7 million and an asset of $3.9 million, respectively. In addition, assuming an unfavorable 10% change in year-end foreign currency exchange rates, the fair value of these instruments would have declined by $20.2 million and $18.4 million, respectively, generally offset by a reduction in foreign exchange associated with our transactional activities.

 Commodities—Price Risk Management and Futures Contracts
 Our most significant raw material requirements include cocoa products, sugar, corn products, dairy products, wheat, peanuts and almonds. The cost of cocoa products and prices for related futures contracts and costs for certain other raw materials historically have been subject to wide fluctuations attributable to a variety of factors. These factors include:

 • Commodity market fluctuations;
 • Currency exchange rates;
 • Imbalances between supply and demand;
 • Rising levels of inflation and interest rates related to domestic and global economic conditions or supply chain issues;
 • The effects of climate change and extreme weather on crop yield and quality;
 • Speculative influences;
 • Trade agreements among producing and consuming nations;
 • Supplier compliance with commitments;
 • Import/export requirements for raw materials and finished goods;
 • Political unrest in producing countries;
 • Introduction of living income premiums or similar requirements;
 • Changes in governmental agricultural programs and energy policies; and
 • Other events beyond our control such as the impacts on the business or supply chain arising from the ongoing conflict between Russia and Ukraine.

 The Hershey Company | 2023 Form 10-K | Page 44

 We use futures and options contracts and other commodity derivative instruments in combination with forward purchasing of cocoa products, sugar, corn products, certain dairy products, wheat products, natural gas and diesel fuel primarily to mitigate price volatility and provide visibility to future costs within our supply chain. Currently, active futures contracts are not available for use in pricing our other major raw material requirements, primarily peanuts and almonds. We attempt to minimize the effect of future raw material and energy price fluctuations by using derivatives and forward purchasing to cover future manufacturing requirements generally for 3 to 24 months. However, dairy futures liquidity is not as developed as many of the other commodity futures markets and, therefore, it can be difficult to hedge dairy costs for extended periods of time. We use diesel fuel futures to minimize price fluctuations associated with our transportation costs. Our commodity procurement practices are intended to mitigate price volatility and provide visibility to future costs, but also may potentially limit our ability to benefit from possible price decreases. Our costs for major raw materials will not necessarily reflect market price fluctuations because of our forward purchasing and hedging practices.
 Cocoa Products

 During 2023, average cocoa futures contract prices increased 31.9% compared with 2022 and traded higher every month from January to December from $1.19 and $1.90 per pound, based on the Intercontinental Exchange futures contract. The production forecast for the 2023 – 2024 season is down significantly in Ghana and Ivory Coast by over 20% combined, due to a combination of inclement weather, lower inputs and marginally increased farmer prices versus inflation. Despite higher cocoa prices to consumers, consumption remained consistent, leading to predictions of a large deficit, the third consecutive one by some accounts. The table below shows annual average cocoa futures prices and the highest and lowest monthly averages for each of the calendar years indicated. The prices reflect the monthly averages of the quotations at noon of the three active futures trading contracts closest to maturity on the Intercontinental Exchange.

 Cocoa Futures Contract Prices
(dollars per pound)

 2023
 2022
 2021
 2020
 2019

 Annual Average
 $
 1.49
 $
 1.13
 $
 1.14
 $
 1.11
 $
 1.03

 High
 1.90
 1.22
 1.27
 1.29
 1.14

 Low
 1.19
 1.06
 1.04
 1.00
 0.90

 Source: International Cocoa Organization Quarterly Bulletin of Cocoa Statistics
 Our costs for cocoa products will not necessarily reflect market price fluctuations because of our forward purchasing and hedging practices, premiums and discounts reflective of varying delivery times, and supply and demand for our specific varieties and grades of cocoa liquor, cocoa butter and cocoa powder. As a result, the average futures contract prices are not necessarily indicative of our average costs.
 Sugar
 The price of sugar is subject to price supports under U.S. farm legislation, which establishes import quotas and duties to support the price of sugar. As a result, sugar prices paid by users in the U.S. are currently higher than prices on the world sugar market. The U.S. delivered east coast refined sugar prices traded in a range from $0.62 to $0.68 per pound during 2023. Prices were historically high throughout 2023 due to lack of imports by the U.S. government resulting in an extremely tight domestic raw sugar market and continued strong demand which resulted in a scarcity market for much of the year.
 Corn Products
 We use corn futures to price our corn sweetener product requirements. A record crop from both Brazil and the U.S. in 2023 drove prices down throughout the year. Corn prices traded in the range from $4.74 to $6.83 per bushel during 2023. Corn sweetener prices remained elevated due to tight capacity utilization throughout the industry.

 The Hershey Company | 2023 Form 10-K | Page 45

 Dairy Products
 During 2023 prices for fluid dairy milk ranged from a low of $0.176 per pound to a high of $0.214 per pound, on a Class IV milk basis. Fluid dairy milk prices were lower than 2022, driven by increases in global milk production linked to improved farmer margins, and exacerbated by a decline in U.S. dairy ingredient exports.
 Wheat Products
 In 2023 we continued utilizing soft and hard wheat futures as a risk management tool for our flour purchasing. For the second year in a row, the conflict between Russia and Ukraine, in addition to poor U.S. weather, continued to result in volatility in the wheat market and impacted global availability of supplies. Despite annual volatility, U.S. wheat remains uncompetitive in the world market, anchoring prices to their historical 5-year averages. Hard wheat prices traded in the range of $6.20 to $8.94 per bushel during 2023, while soft wheat prices traded in the range of $5.78 to $7.86 per bushel during 2023.
 Peanuts and Almonds
 Peanut prices in the U.S. ranged from a low of $0.59 per pound to a high of $0.71 per pound during 2023. Prices increased in 2023 due to higher export demand in the latter half of the year and a smaller peanut crop. Almond prices traded in the range of $1.75 per pound to $2.15 per pound during 2023. Prices increased towards the end of 2023, driven by smaller than expected crop and lower availability of small sized almonds.
 Changes in the Value of Futures Contracts
 We make or receive cash transfers to or from commodity futures brokers on a daily basis reflecting changes in the value of futures contracts on the Intercontinental Exchange or various other exchanges. These changes in value represent unrealized gains and losses. The cash transfers offset higher or lower cash requirements for the payment of future invoice prices of raw materials, energy requirements and transportation costs.
 Commodity Sensitivity Analysis
 Our open commodity derivative contracts had a notional value of $94.9 million as of December 31, 2023 and $243.0 million as of December 31, 2022. At the end of 2023, the potential change in fair value of commodity derivative instruments, assuming a 10% decrease in the underlying commodity price, would have increased our net unrealized losses in 2023 by $5.4 million, generally offset by a reduction in the cost of the underlying commodity purchases.

 The Hershey Company | 2023 Form 10-K | Page 46

 Item 8. FINANCIAL STATEMENTS AND SUPPLEMENTARY DATA

 INDEX TO CONSOLIDATED FINANCIAL STATEMENTS

 Report of Independent Registered Public Accounting Firm (PCAOB ID: 42)

 Report of Independent Registered Public Accounting Firm on Internal Control Over Financial Reporting

 Consolidated Statements of Income for the years ended December 31, 2023, 2022 and 2021

 Consolidated Statements of Comprehensive Income for the years ended December 31, 2023, 2022 and 2021

 Consolidated Balance Sheets as of December 31, 2023 and 2022

 Consolidated Statements of Cash Flows for the years ended December 31, 2023, 2022 and 2021

 Consolidated Statements of Stockholders' Equity for the years ended December 31, 2023, 2022 and 2021

 Notes to Consolidated Financial Statements

 Note 1 - Summary of Significant Accounting Policies

 Note 2 - Business Acquisitions and Divestitures

 Note 3 - Goodwill and Intangible Assets

 Note 4 - Short and Long-Term Debt

 Note 5 - Derivative Instruments

 Note 6 - Fair Value Measurements

 Note 7 - Leases

 Note 8 - Investments in Unconsolidated Affiliates

 Note 9 - Business Realignment Activities

 Note 10 - Income Taxes

 Note 11 - Pension and Other Post-Retirement Benefit Plans

 Note 12 - Stock Compensation Plans

 Note 13 - Segment Information

 Note 14 - Equity and Treasury Stock Activity

 Note 15 - Commitments and Contingencies

 Note 16 - Earnings Per Share

 Note 17 - Other (Income) Expense, Net

 Note 18 - Related Party Transactions

 Note 19 - Supplemental Balance Sheet Information

 The Hershey Company | 2023 Form 10-K | Page 47

 REPORT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

 To the Stockholders and the Board of Directors of The Hershey Company
 Opinion on the Financial Statements

 We have audited the accompanying consolidated balance sheets of The Hershey Company (the Company) as of December 31, 2023 and 2022, the related consolidated statements of income, comprehensive income, cash flows, and stockholders' equity for each of the three years in the period ended December 31, 2023, and the related notes and financial statement schedule listed in the Index at Item 15(a)(2) (collectively referred to as the "consolidated financial statements"). In our opinion, the consolidated financial statements present fairly, in all material respects, the financial position of the Company at December 31, 2023 and 2022, and the results of its operations and its cash flows for each of the three years in the period ended December 31, 2023, in conformity with U.S. generally accepted accounting principles.

 We also have audited, in accordance with the standards of the Public Company Accounting Oversight Board (United States) (PCAOB), the Company's internal control over financial reporting as of December 31, 2023, based on criteria established in Internal Control–Integrated Framework issued by the Committee of Sponsoring Organizations of the Treadway Commission (2013 framework), and our report dated February 20, 2024 expressed an unqualified opinion thereon.

 Basis for Opinion

 These financial statements are the responsibility of the Company's management. Our responsibility is to express an opinion on the Company's financial statements based on our audits. We are a public accounting firm registered with the PCAOB and are required to be independent with respect to the Company in accordance with the U.S. federal securities laws and the applicable rules and regulations of the Securities and Exchange Commission and the PCAOB.

 We conducted our audits in accordance with the standards of the PCAOB. Those standards require that we plan and perform the audit to obtain reasonable assurance about whether the financial statements are free of material misstatement, whether due to error or fraud. Our audits included performing procedures to assess the risks of material misstatement of the financial statements, whether due to error or fraud, and performing procedures that respond to those risks. Such procedures included examining, on a test basis, evidence regarding the amounts and disclosures in the financial statements. Our audits also included evaluating the accounting principles used and significant estimates made by management, as well as evaluating the overall presentation of the financial statements. We believe that our audits provide a reasonable basis for our opinion.

 Critical Audit Matter

 The critical audit matter communicated below is a matter arising from the current period audit of the financial statements that was communicated or required to be communicated to the audit committee and that: (1) relates to accounts or disclosures that are material to the financial statements and (2) involved our especially challenging, subjective or complex judgments. The communication of the critical audit matter does not alter in any way our opinion on the consolidated financial statements, taken as a whole, and we are not, by communicating the critical audit matter below, providing a separate opinion on the critical audit matter or on the accounts or disclosures to which it relates.

 The Hershey Company | 2023 Form 10-K | Page 48

 Valuation of Accrued Liabilities for Trade Promotion Activities

 Description of the Matter
 The unsettled portion of the Company's obligation for trade promotion activities at December 31, 2023 was $194.0 million. As discussed in Note 1 of the consolidated financial statements, the Company promotes its products through programs such as, but not limited to, discounts, coupons, rebates, in-store display incentives, and volume-based incentives. The Company recognizes the estimated costs of these trade promotion activities as a component of variable consideration when determining the transaction price. The unsettled portion of the Company's obligation for trade promotion activities is included in accrued liabilities in the consolidated balance sheet.

 Auditing management's calculation of the unsettled portion of the Company's obligation for trade promotion activities was subjective and required judgment as a result of the nature of the required estimates and assumptions. In particular, the estimates required an analysis of the programs offered, expectations regarding customer and consumer participation, and experience with historical payment patterns.

 How We Addressed the Matter in Our Audit
 We obtained an understanding, evaluated the design, and tested the operating effectiveness of the controls related to the Company's calculation of the accrued liabilities for trade promotion activities. For example, we tested controls over management's review of the completeness of the promotional activities as well as the significant assumptions and the data inputs utilized in the calculations.

 To test the unsettled portion of the Company's obligation for trade promotion activities, we performed audit procedures that included, among others, assessing (1) the expected value estimation methodology used by management, (2) whether all material trade promotion activities were properly included in management's estimate, and (3) the assumptions discussed above and the underlying data used in its analyses. Specifically, when evaluating the assumptions, we compared them to historical trends, third party data, and assumptions used in prior periods, and inspected management's retrospective review of actual trade promotion activities compared to previous estimates. We also performed sensitivity analyses of assumptions to evaluate the changes in the estimate that would result from changes in the assumptions.

 /s/ Ernst & Young LLP

 We have served as the Company's auditor since 2016.

 Philadelphia, Pennsylvania

.

 The Hershey Company | 2023 Form 10-K | Page 49

 REPORT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

 To the Stockholders and the Board of Directors of The Hershey Company

 Opinion on Internal Control Over Financial Reporting

 We have audited The Hershey Company's internal control over financial reporting as of December 31, 2023, based on criteria established in Internal Control–Integrated Framework issued by the Committee of Sponsoring Organizations of the Treadway Commission (2013 framework) (the COSO criteria). In our opinion, The Hershey Company (the Company) maintained, in all material respects, effective internal control over financial reporting as of December 31, 2023, based on the COSO criteria.

 As indicated in the accompanying Management's Annual Report on Internal Control over Financial Reporting, management's assessment of and conclusion on the effectiveness of internal control over financial reporting did not include the internal controls of the acquisition of certain assets that provide additional manufacturing capacity from Weaver Popcorn Manufacturing, Inc. ("Weaver") on May 31, 2023, which is included in the 2023 consolidated financial statements of the Company and constituted 1.4% of total assets as of December 31, 2023. Our audit of internal control over financial reporting of the Company also did not include an evaluation of the internal control over financial reporting of Weaver.

 We also have audited, in accordance with the standards of the Public Company Accounting Oversight Board (United States) (PCAOB), the consolidated balance sheets of the Company as of December 31, 2023 and 2022, the related consolidated statements of income, comprehensive income, cash flows, and stockholders' equity for each of the three years in the period ended December 31, 2023, and the related notes and financial statement schedule listed in the Index at Item 15(a)(2) and our report dated February 20, 2024 expressed an unqualified opinion thereon.

 Basis for Opinion

 The Company's management is responsible for maintaining effective internal control over financial reporting and for its assessment of the effectiveness of internal control over financial reporting included in the accompanying Management's Annual Report on Internal Control over Financial Reporting. Our responsibility is to express an opinion on the Company's internal control over financial reporting based on our audit. We are a public accounting firm registered with the PCAOB and are required to be independent with respect to the Company in accordance with the U.S. federal securities laws and the applicable rules and regulations of the Securities and Exchange Commission and the PCAOB.

 We conducted our audit in accordance with the standards of the PCAOB. Those standards require that we plan and perform the audit to obtain reasonable assurance about whether effective internal control over financial reporting was maintained in all material respects.

 Our audit included obtaining an understanding of internal control over financial reporting, assessing the risk that a material weakness exists, testing and evaluating the design and operating effectiveness of internal control based on the assessed risk, and performing such other procedures as we considered necessary in the circumstances. We believe that our audit provides a reasonable basis for our opinion.

 Definition and Limitations of Internal Control Over Financial Reporting

 A company's internal control over financial reporting is a process designed to provide reasonable assurance regarding the reliability of financial reporting and the preparation of financial statements for external purposes in accordance with generally accepted accounting principles. A company's internal control over financial reporting includes those policies and procedures that (1) pertain to the maintenance of records that, in reasonable detail, accurately and fairly reflect the transactions and dispositions of the assets of the company; (2) provide reasonable assurance that transactions are recorded as necessary to permit preparation of financial statements in accordance with generally accepted accounting principles, and that receipts and expenditures of the company are being made only in accordance with authorizations of management and directors of the company; and (3) provide reasonable assurance regarding prevention or timely detection of unauthorized acquisition, use, or disposition of the company's assets that could have a material effect on the financial statements.

 The Hershey Company | 2023 Form 10-K | Page 50

 Because of its inherent limitations, internal control over financial reporting may not prevent or detect misstatements. Also, projections of any evaluation of effectiveness to future periods are subject to the risk that controls may become inadequate because of changes in conditions, or that the degree of compliance with the policies or procedures may deteriorate.

 /s/ Ernst & Young LLP

 Philadelphia, Pennsylvania

 The Hershey Company | 2023 Form 10-K | Page 51

 CONSOLIDATED STATEMENTS OF INCOME
 (in thousands, except per share amounts)

 2023
 2022
 2021

 $
 11,164,992
 $
 10,419,294
 $
 8,971,337

 Cost of sales
 6,167,176
 5,920,509
 4,922,739

 Gross profit
 4,997,816
 4,498,785
 4,048,598

 Selling, marketing and administrative expense
 2,436,508
 2,236,009
 2,001,351

 Business realignment costs
 1,989
 3,525

 Operating profit

 2,560,867
 2,260,787
 2,043,722

 151,785
 137,557
 127,417

 Other (income) expense, net
 237,218
 206,159
 119,081

 Income before income taxes
 2,171,864
 1,917,071
 1,797,224

 Provision for income taxes
 310,077
 272,254
 314,405

 Net income including noncontrolling interest
 1,482,819

 Less: Net gain attributable to noncontrolling interest
 —
 —
 5,307

 Net income attributable to The Hershey Company

 $
 $
 $
 1,477,512

 Net income per share—basic:

 Common stock
 $
 9.31
 $
 8.22
 $
 7.34

 Class B common stock
 $
 8.52
 $
 7.47
 $
 6.68

 Net income per share—diluted:

 Common stock
 $
 9.06
 $
 7.96
 $
 7.11

 Class B common stock
 $
 8.50
 $
 7.45
 $
 6.66

 Dividends paid per share:

 Common stock
 $
 4.456
 $
 3.874
 $
 3.410

 Class B common stock
 $
 4.050
 $
 3.522
 $
 3.100

 The Hershey Company | 2023 Form 10-K | Page 52

 CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME
 (in thousands)

 2023
 2022
 2021

 Pre-Tax Amount
 Tax (Expense) Benefit
 After-Tax Amount
 Pre-Tax Amount
 Tax (Expense) Benefit
 After-Tax Amount
 Pre-Tax Amount
 Tax (Expense) Benefit
 After-Tax Amount

 Net income including noncontrolling interest
 $
 $
 $
 1,482,819

 Other comprehensive income (loss), net of tax:

 Foreign currency translation adjustments:

 Foreign currency translation gains (losses) during period
 $
 22,659
 $
 —
 22,659
 $
 ( 10,340)
 $
 —
 ( 10,340)
 $
 ( 1,500)
 $
 —
 ( 1,500)

 Reclassification to earnings due to the sale of businesses
 —
 —
 —
 —
 —
 —
 5,249
 —
 5,249

 Pension and post-retirement benefit plans:

 Net actuarial (loss) gain
 ( 39,454)
 9,191
 ( 30,263)
 ( 32,970)
 7,481
 ( 25,489)
 67,728
 ( 13,929)
 53,799

 Reclassification to earnings
 28,612
 ( 6,895)
 21,717
 31,009
 ( 7,392)
 23,617
 32,092
 ( 8,067)
 24,025

 Cash flow hedges:

 (Losses) gains on cash flow hedging derivatives
 ( 30)
 2,056
 ( 74)
 1,982
 ( 1,551)
 ( 2,989)
 ( 4,540)

 Reclassification to earnings
 10,866
 ( 3,648)
 7,218
 10,200
 ( 3,088)
 7,112
 18,117
 ( 1,034)
 17,083

 Total other comprehensive income (loss), net of tax
 $
 23,637
 $
 ( 1,382)
 22,255
 $
 ( 45)
 $
 ( 3,073)
 ( 3,118)
 $
 120,135
 $
 ( 26,019)
 94,116

 Total comprehensive income including noncontrolling interest
 $
 1,884,042
 $
 1,641,699
 $
 1,576,935

 Comprehensive gain attributable to noncontrolling interest
 —
 —
 10,556

 Comprehensive income attributable to The Hershey Company
 $
 1,884,042
 $
 1,641,699
 $
 1,566,379

 The Hershey Company | 2023 Form 10-K | Page 53

 CONSOLIDATED BALANCE SHEETS
 (in thousands, except share data)

 2023
 2022

 ASSETS

 Current assets:

 Cash and cash equivalents
 $
 401,902
 $
 463,889

 Accounts receivable—trade, net
 823,617
 711,203

 Inventories
 1,340,996
 1,173,119

 Prepaid expenses and other
 345,588
 272,195

 Total current assets
 2,912,103
 2,620,406

 3,309,678
 2,769,702

 2,696,050
 2,606,956

 Other intangibles
 1,879,229
 1,966,269

 Other non-current assets
 1,061,427
 944,989

 44,454
 40,498

 Total assets
 $
 11,902,941
 $
 10,948,820

 LIABILITIES AND STOCKHOLDERS' EQUITY

 Current liabilities:

 Accounts payable
 $
 1,086,183
 $
 970,558

 Accrued liabilities
 867,815
 832,518

 Accrued income taxes
 29,457
 6,710

 Short-term debt
 719,839
 693,790

 Current portion of long-term debt
 305,058
 753,578

 Total current liabilities
 3,008,352
 3,257,154

 Long-term debt
 3,789,132
 3,343,977

 Other long-term liabilities
 660,673
 719,742

 345,698
 328,403

 Total liabilities
 7,803,855
 7,649,276

 Stockholders' equity:

 The Hershey Company stockholders' equity

 Preferred stock, shares issued: none in 2023 and 2022

 —
 —

 Common stock, shares issued: 166,939,511 in 2023 and 163,439,248 in 2022

 166,939
 163,439

 Class B common stock, shares issued: 54,613,514 in 2023 and 58,113,777 in 2022

 54,614
 58,114

 Additional paid-in capital
 1,345,580
 1,296,572

 Retained earnings
 4,562,263
 3,589,781

 Treasury—common stock shares, at cost: 17,160,099 in 2023 and 16,588,308 in 2022

 ( 1,800,232)
 ( 1,556,029)

 Accumulated other comprehensive loss
 ( 230,078)
 ( 252,333)

 Total stockholders' equity
 4,099,086
 3,299,544

 Total liabilities and stockholders' equity
 $
 11,902,941
 $
 10,948,820

 The Hershey Company | 2023 Form 10-K | Page 54

 CONSOLIDATED STATEMENTS OF CASH FLOWS
 (in thousands)

 2023
 2022
 2021

 Operating Activities

 Net income including noncontrolling interest
 $
 $
 $
 1,482,819

 Adjustments to reconcile net income to net cash provided by operating activities:

 Depreciation and amortization
 419,815
 378,959
 315,002

 Stock-based compensation expense
 81,021
 65,991
 66,711

 16,233
 36,889
 13,374

 Write-down of equity investments
 210,484
 188,286
 113,756

 Other
 103,287
 120,818
 96,016

 Changes in assets and liabilities, net of business acquisitions and divestitures:

 Accounts receivable—trade, net
 ( 102,080)
 ( 38,165)
 ( 14,642)

 Inventories
 ( 157,153)
 ( 186,963)
 21,457

 Prepaid expenses and other current assets
 ( 22,444)
 ( 14,507)
 8,619

 Accounts payable and accrued liabilities
 50,234
 216,479
 39,732

 Accrued income taxes
 ( 32,481)
 5,005
 ( 29,682)

 Contributions to pension and other benefit plans
 ( 27,581)
 ( 78,547)
 ( 51,100)

 Other assets and liabilities
 ( 77,932)
 ( 11,225)
 20,822

 Net cash provided by operating activities
 2,323,190
 2,327,837
 2,082,884

 Investing Activities

 Capital additions (including software)
 ( 771,109)
 ( 519,481)
 ( 495,877)

 Equity investments in tax credit qualifying partnerships
 ( 256,815)
 ( 275,534)
 ( 128,417)

 Business acquisitions, net of cash and cash equivalents acquired
 ( 165,818)
 —
 ( 1,601,073)

 Other investing activities
 ( 4,934)
 7,639
 2,539

 Net cash used in investing activities
 ( 1,198,676)
 ( 787,376)
 ( 2,222,828)

 Financing Activities

 Net increase (decrease) in short-term debt
 26,049
 ( 245,633)
 869,030

 Long-term borrowings, net of debt issuance costs
 744,092
 —
 —

 Repayment of long-term debt and finance leases
 ( 755,414)
 ( 4,741)
 ( 439,444)

 Cash dividends paid
 ( 889,071)
 ( 775,030)
 ( 685,987)

 Repurchase of common stock
 ( 264,913)
 ( 388,964)
 ( 457,946)

 Exercise of stock options
 26,015
 34,158
 49,821

 Taxes withheld and paid on employee stock awards
 ( 35,009)
 ( 35,515)
 ( 16,610)

 Net cash used in financing activities
 ( 1,148,251)
 ( 1,415,725)
 ( 681,136)

 Effect of exchange rate changes on cash and cash equivalents
 ( 38,250)
 9,887
 ( 5,075)

 (Decrease) increase in cash and cash equivalents, including cash classified as held for sale
 ( 61,987)
 134,623
 ( 826,155)

 Less: Decrease in cash and cash equivalents classified as held for sale
 —
 —
 11,434

 Net (decrease) increase in cash and cash equivalents
 ( 61,987)
 134,623
 ( 814,721)

 Cash and cash equivalents, beginning of period
 463,889
 329,266
 1,143,987

 Cash and cash equivalents, end of period
 $
 401,902
 $
 463,889
 $
 329,266

 Supplemental Disclosure

 Interest paid
 $
 160,729
 $
 131,757
 $
 127,726

 Income taxes paid
 303,942
 221,321
 275,171

 The Hershey Company | 2023 Form 10-K | Page 55

 CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY
 (in thousands)

 Preferred
Stock
 Common
Stock
 Class B
Common
Stock
 Additional
Paid-in
Capital
 Retained
Earnings
 Treasury
Common
Stock
 Accumulated Other
Comprehensive
Income (Loss)
 Noncontrolling
Interests in
Subsidiaries
 Total
Stockholders'
Equity

 Balance, January 1, 2021

 $
 —
 $
 160,939
 $
 $
 1,191,200
 $
 1,928,673
 $
 ( 768,992)
 $
 ( 338,082)
 $
 3,531
 $
 2,237,883

 Net income
 1,477,512
 5,307
 1,482,819

 Other comprehensive income
 88,867
 5,249
 94,116

 Dividends (including dividend equivalents):

 Common Stock, $ 3.410 per share

 ( 498,346)
 ( 498,346)

 Class B Common Stock, $ 3.100 per share

 ( 187,903)
 ( 187,903)

 Stock-based compensation
 67,482
 67,482

 Exercise of stock options and incentive-based transactions
 1,649
 31,562
 33,211

 Repurchase of common stock
 ( 457,946)
 ( 457,946)

 Divestiture of noncontrolling interest
 ( 1,436)
 ( 1,436)

 Distributions to joint venture partner
 ( 8,750)
 ( 8,750)

 Other
 ( 3,901)
 ( 3,901)

 Balance, December 31, 2021

 —
 160,939
 1,260,331
 2,719,936
 ( 1,195,376)
 ( 249,215)
 —
 2,757,229

 Net income
 —

 Other comprehensive loss
 ( 3,118)
 —
 ( 3,118)

 Dividends (including dividend equivalents):

 Common Stock, $ 3.874 per share

 ( 567,839)
 ( 567,839)

 Class B Common Stock, $ 3.522 per share

 ( 207,133)
 ( 207,133)

 Conversion of Class B Common Stock into Common Stock
 2,500
 ( 2,500)
 —

 Stock-based compensation
 65,909
 65,909

 Exercise of stock options and incentive-based transactions
 ( 29,668)
 28,311
 ( 1,357)

 Repurchase of common stock
 ( 388,964)
 ( 388,964)

 Balance, December 31, 2022

 —
 163,439
 58,114
 1,296,572
 3,589,781
 ( 1,556,029)
 ( 252,333)
 —
 3,299,544

 Net income
 —

 Other comprehensive income
 22,255
 —
 22,255

 Dividends (including dividend equivalents):

 Common Stock, $ 4.456 per share

 ( 663,410)
 ( 663,410)

 Class B Common Stock, $ 4.050 per share

 ( 225,895)
 ( 225,895)

 Conversion of Class B Common Stock into Common Stock
 3,500
 ( 3,500)
 —

 Stock-based compensation
 81,130
 81,130

 Exercise of stock options and incentive-based transactions
 ( 32,122)
 23,128
 ( 8,994)

 Repurchase of common stock (including excise tax)
 ( 267,331)
 ( 267,331)

 Balance, December 31, 2023

 $
 —
 $
 166,939
 $
 54,614
 $
 1,345,580
 $
 4,562,263
 $
 ( 1,800,232)
 $
 ( 230,078)
 $
 —
 $
 4,099,086

 The Hershey Company | 2023 Form 10-K | Page 56

 NOTES TO CONSOLIDATED FINANCIAL STATEMENTS

 1. SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES
 Description of Business
 The Hershey Company together with its wholly-owned subsidiaries and entities in which it has a controlling interest, (the "Company," "Hershey," "we" or "us") is a global confectionery leader known for its branded portfolio of chocolate, sweets, mints and other great tasting snacks. The Company has more than 90 brands worldwide including such iconic brand names as Hershey's, Reese's, Kisses, Jolly Rancher and Ice Breakers, which are marketed, sold and distributed in approximately 80 countries worldwide. Hershey's structure is designed to ensure continued focus on North America, coupled with an emphasis on profitable growth in our focus international markets. The Company currently operates through three segments that are aligned with its management structure and the key markets it serves: (i) North America Confectionery, (ii) North America Salty Snacks and (iii) International. For additional information on our segment presentation, see Note 13.
 Basis of Presentation
 Our consolidated financial statements include the accounts of The Hershey Company and its majority-owned or controlled subsidiaries. Intercompany transactions and balances have been eliminated. We have a controlling financial interest if we own a majority of the outstanding voting common stock and minority shareholders do not have substantive participating rights, we have significant control through contractual or economic interests in which we are the primary beneficiary or we have the power to direct the activities that most significantly impact the entity's economic performance. We use the equity method of accounting when we have a 20% to 50% interest in other companies and exercise significant influence. In addition, we use the equity method of accounting for our investments in partnership entities which make equity investments in projects eligible to receive federal historic and energy tax credits. See Note 10 for additional information on our equity investments in partnership entities qualifying for tax credits. Other investments that are not controlled, and over which we do not have the ability to exercise significant influence, are accounted for at cost, less impairments. Both equity method and cost, less impairment investments are included as Other non-current assets in the Consolidated Balance Sheets. For additional information on our investments in unconsolidated affiliates, see Note 8.

 Use of Estimates
 The preparation of financial statements in conformity with accounting principles generally accepted in the United States of America ("GAAP") requires management to make estimates and assumptions that affect the amounts reported in the consolidated financial statements and accompanying disclosures. Our significant estimates and assumptions include, among others, pension and other post-retirement benefit plan assumptions, valuation assumptions of goodwill and other intangible assets, useful lives of long-lived assets, marketing and trade promotion accruals and income taxes. These estimates and assumptions are based on management's best judgment. Management evaluates its estimates and assumptions on an ongoing basis using historical experience and other factors, including the current economic environment, and the effects of any revisions are reflected in the consolidated financial statements in the period that they are determined. As future events and their effects cannot be determined with precision, actual results could differ significantly from these estimates.
 Revenue Recognition
 The majority of our revenue contracts represent a single performance obligation related to the fulfillment of customer orders for the purchase of our products, including chocolate, sweets, mints and other grocery and snack offerings. Net sales reflect the transaction prices for these contracts based on our selling list price which is then reduced by estimated costs for trade promotional programs, consumer incentives, and allowances and discounts associated with aged or potentially unsaleable products. We recognize revenue at the point in time that control of the ordered product(s) is transferred to the customer, which is typically upon delivery to the customer or other customer-designated delivery point. Amounts billed and due from our customers are classified as accounts receivables on the balance sheet and require payment on a short-term basis.
 Our trade promotional programs and consumer incentives are used to promote our products and include, but are not limited to, discounts, coupons, rebates, in-store display incentives, and volume-based incentives. The estimated costs

 The Hershey Company | 2023 Form 10-K | Page 57

 associated with these programs and incentives are based upon our analysis of the programs offered, expectations regarding customer and consumer participation, historical sales and payment trends, and our experience with payment patterns associated with similar programs offered in the past. The estimated costs of these programs are reasonably likely to change in future periods due to changes in trends with regard to customer and consumer participation, particularly for new programs and for programs related to the introduction of new products. Differences between estimated expense and actual program performance are recognized as a change in estimate in a subsequent period and are normally not significant. During 2023, 2022 and 2021, actual promotional costs have not deviated from the estimated amount by more than 3 %. The Company's unsettled portion remaining in accrued liabilities at year-end for these activities was $ 194,032 and $ 215,688 at December 31, 2023 and 2022, respectively.
 We also recognize a minor amount of royalty income (less than 1% of our consolidated net sales) from sales-based licensing arrangements, pursuant to which revenue is recognized as the third-party licensee sales occur. Shipping and handling costs incurred to deliver product to the customer are recorded within cost of sales. Sales, value add and other taxes we collect concurrent with revenue producing activities are excluded from revenue.
 The majority of our products are confectionery or confectionery-based and, therefore, exhibit similar economic characteristics, as they are based on similar ingredients and are marketed and sold through the same channels to the same customers. In connection with our recent acquisitions, we have expanded our portfolio of salty snacking products, which also exhibit similar economic characteristics to our confectionery products and are sold through the same channels to the same customers. See Note 13 for revenues reported by geographic segment, which is consistent with how we organize and manage our operations, as well as product line net sales information.
 In 2023, 2022 and 2021, approximately 28 %, 28 % and 30 %, respectively, of our consolidated net sales were made to McLane Company, Inc., one of the largest wholesale distributors in the United States to convenience stores, drug stores, wholesale clubs and mass merchandisers and the primary distributor of our products to Wal-Mart Stores, Inc.
 Cost of Sales
 Cost of sales represents costs directly related to the manufacture and distribution of our products. Primary costs include raw materials, packaging, direct labor, overhead, shipping and handling, warehousing and the depreciation of manufacturing, warehousing and distribution facilities. Manufacturing overhead and related expenses include salaries, wages, employee benefits, utilities, maintenance and property taxes.
 Selling, Marketing and Administrative Expense
 Selling, marketing and administrative expense ("SM&A") represents costs incurred in generating revenues and in managing our business. Such costs include advertising and other marketing expenses, selling expenses, research and development costs, administrative and other indirect overhead costs, amortization of capitalized software and intangible assets and depreciation of administrative facilities. Research and development costs, charged to expense as incurred, totaled $ 50,030 in 2023, $ 46,943 in 2022 and $ 40,107 in 2021. Advertising expense is also charged to expense as incurred and totaled $ 604,853 in 2023, $ 517,677 in 2022 and $ 511,798 in 2021. There was no prepaid advertising expense as of December 31, 2023. Prepaid advertising expense was $ 241 as of December 31, 2022.
 Cash Equivalents
 Cash equivalents consist of highly liquid debt instruments, time deposits and money market funds with original maturities of three months or less. The fair value of cash equivalents approximates the carrying amount.
 Accounts Receivable—Trade
 In the normal course of business, we extend credit to customers that satisfy pre-defined credit criteria, based upon the results of our recurring financial account reviews and our evaluation of current and projected economic conditions. Our primary concentration of credit risk is associated with McLane Company, Inc., one customer served principally by our North America Confectionery segment. As of December 31, 2023, McLane Company, Inc. accounted for approximately 24 % of our total accounts receivable. No other customer accounted for more than 10% of our year-end accounts receivable. We believe that we have little concentration of credit risk associated with the remainder of our customer base. Accounts receivable-trade in the Consolidated Balance Sheets is presented net of allowances for bad debts and anticipated discounts of $ 31,663 and $ 26,001 at December 31, 2023 and 2022, respectively.

 The Hershey Company | 2023 Form 10-K | Page 58

 Inventories
 Inventories are valued at the lower of cost or net realizable value, adjusted for the value of inventory that is estimated to be excess, obsolete or otherwise unsaleable. As of December 31, 2023, approximately 55 % of our inventories, representing the majority of our United States ("U.S.") inventories, were valued under the last-in, first-out ("LIFO") method. For the remainder of our inventories in the U.S. and inventories for our international businesses, cost is determined by either first-in, first-out ("FIFO") or average cost. LIFO cost of inventories valued using the LIFO method was $ 741,040 as of December 31, 2023 and $ 621,614 as of December 31, 2022. The adjustment to LIFO, as shown in Note 19, approximates the excess of replacement cost over the stated LIFO inventory value. The net impact of LIFO acquisitions and liquidations was not material to 2023, 2022 or 2021.
 Property, Plant and Equipment
 Property, plant and equipment is stated at cost and depreciated on a straight-line basis over the estimated useful lives of the assets, as follows: 3 to 15 years for machinery and equipment; and 25 to 40 years for buildings and related improvements. At December 31, 2023 and December 31, 2022, property, plant and equipment included assets under finance lease arrangements with net book values totaling $ 69,863 and $ 72,160, respectively. Total depreciation expense for the years ended December 31, 2023, 2022 and 2021 was $ 265,604, $ 253,582 and $ 230,638, respectively, and included depreciation on assets recorded under finance lease arrangements. Maintenance and repairs are expensed as incurred. We capitalize applicable interest charges incurred during the construction of new facilities and production lines and amortize these costs over the assets' estimated useful lives.
 We review long-lived assets for impairment whenever events or changes in circumstances indicate that the carrying amount of such assets may not be recoverable. We measure the recoverability of assets to be held and used by a comparison of the carrying amount of long-lived assets to future undiscounted net cash flows expected to be generated. If these assets are considered to be impaired, we measure impairment as the amount by which the carrying amount of the assets exceeds the fair value of the assets. We report assets held for sale or disposal at the lower of the carrying amount or fair value less cost to sell.
 We assess asset retirement obligations on a periodic basis and recognize the fair value of a liability for an asset retirement obligation in the period in which it is incurred if a reasonable estimate of fair value can be made. We capitalize associated asset retirement costs as part of the carrying amount of the long-lived asset.
 Computer Software
 We capitalize costs associated with software developed or obtained for internal use when both the preliminary project stage is completed and it is probable the software being developed will be completed and placed in service. Capitalized costs include only (i) external direct costs of materials and services consumed in developing or obtaining internal-use software, (ii) payroll and other related costs for employees who are directly associated with and who devote time to the internal-use software project and (iii) interest costs incurred, when material, while developing internal-use software. We cease capitalization of such costs no later than the point at which the project is substantially complete and ready for its intended purpose.
 The unamortized amount of capitalized software totaled $ 360,205 and $ 320,034 at December 31, 2023 and 2022, respectively. We amortize software costs using the straight-line method over the expected life of the software, generally 3 to 7 years. Accumulated amortization of capitalized software was $ 395,410 and $ 350,620 as of 2023 and 2022, respectively. Such amounts are recorded within other assets in the Consolidated Balance Sheets.
 We review the carrying value of software and development costs for impairment in accordance with our policy pertaining to the impairment of long-lived assets.
 Goodwill and Other Intangible Assets
 Goodwill and indefinite-lived intangible assets are not amortized, but are evaluated for impairment annually or more often if indicators of a potential impairment are present. Our annual impairment tests are conducted at the beginning of the fourth quarter. We test goodwill for impairment by performing either a qualitative or quantitative assessment. If we choose to perform a qualitative assessment, we evaluate economic, industry and company-specific factors in assessing the fair value of the related reporting unit. If we determine that it is more likely than not that the fair value of the reporting unit is less than its carrying value, a quantitative test is then performed. Otherwise, no further testing is

 The Hershey Company | 2023 Form 10-K | Page 59

 required. For those reporting units tested using a quantitative approach, we compare the fair value of each reporting unit with the carrying amount of the reporting unit, including goodwill. If the estimated fair value of the reporting unit is less than the carrying amount of the reporting unit, impairment is indicated, requiring recognition of a goodwill impairment charge for the differential (up to the carrying value of goodwill). We test individual indefinite-lived intangible assets by comparing the estimated fair values with the book values of each asset.
 We determine the fair value of our reporting units and indefinite-lived intangible assets using an income approach. Under the income approach, we calculate the fair value of our reporting units and indefinite-lived intangible assets based on the present value of estimated future cash flows. Considerable management judgment is necessary to evaluate the impact of operating and macroeconomic changes and to estimate the future cash flows used to measure fair value. Our estimates of future cash flows consider past performance, current and anticipated market conditions and internal projections and operating plans which incorporate estimates for sales growth and profitability, and cash flows associated with taxes and capital spending. Additional assumptions include forecasted growth rates, estimated discount rates, which may be risk-adjusted for the operating market of the reporting unit, and estimated royalty rates that would be charged for comparable branded licenses. We believe such assumptions also reflect current and anticipated market conditions and are consistent with those that would be used by other marketplace participants for similar valuation purposes. Such assumptions are subject to change due to changing economic and competitive conditions.
 The cost of intangible assets with finite useful lives is amortized on a straight-line basis. Our finite-lived intangible assets consist primarily of certain trademarks, customer-related intangible assets and patents obtained through business acquisitions. The weighted-average amortization period for our finite-lived intangible assets is approximately 28 years, which is primarily driven by recently acquired trademarks. If certain events or changes in operating conditions indicate that the carrying value of these assets, or related asset groups, may not be recoverable, we perform an impairment assessment and may adjust the remaining useful lives. See Note 3 for additional information regarding the results of impairment tests.
 Supplier Finance Program Obligations
 During 2020, we entered into an agreement with two third-party financial institutions to facilitate a supplier finance program which allows qualifying suppliers to sell their receivables from the Company to the financial institution. These participating suppliers negotiate their outstanding receivable arrangements directly with the financial institution, and our rights and obligations to our suppliers are not impacted. We have no economic interest in a supplier's decision to enter into these agreements. Once a qualifying supplier elects to participate in the supplier finance program and reaches an agreement with a financial institution, they elect which individual Company invoices they sell to the financial institution. However, all Company payments to participating suppliers are paid to the financial institution on the invoice due date, regardless of whether the individual invoice is sold by the supplier to the financial institution. The financial institution pays the supplier on the invoice due date for any invoices that were not previously sold under the supplier finance program. Our obligations to our suppliers, including amounts due and scheduled payment terms, are not impacted by our suppliers' decisions to sell amounts under these arrangements. The payment of these obligations is included in cash provided by operating activities in the Consolidated Statements of Cash Flows. The rollforward of the Company's outstanding obligations confirmed as valid under its supplier finance program, which are included in Accounts Payable in the Consolidated Balance Sheets, for year ended December 31, 2023 are as follows:

 2023

 Supplier finance program obligations outstanding at beginning of the year
 $
 105,293

 Invoice amounts added during the year
 585,872

 Invoice amounts paid during the year
 ( 541,904)

 Supplier finance program obligations outstanding at end of the year
 $
 149,261

 The Hershey Company | 2023 Form 10-K | Page 60

 Currency Translation
 The financial statements of our foreign entities with functional currencies other than the U.S. dollar are translated into U.S. dollars, with the resulting translation adjustments recorded as a component of other comprehensive income (loss). Assets and liabilities are translated into U.S. dollars using the exchange rates in effect at the balance sheet date, while income and expense items are translated using the average exchange rates during the period.

 Derivative Instruments
 We use derivative instruments principally to offset exposure to market risks arising from changes in commodity prices, foreign currency exchange rates and interest rates. See Note 5 for additional information on our risk management strategy and the types of instruments we use.
 Derivative instruments are recognized on the Consolidated Balance Sheets at their fair values. When we become party to a derivative instrument and intend to apply hedge accounting, we designate the instrument for financial reporting purposes as a cash flow or fair value hedge. The accounting for changes in fair value (gains or losses) of a derivative instrument depends on whether we have designated it and it qualified as part of a hedging relationship, as noted below:
 • Changes in the fair value of a derivative that is designated as a cash flow hedge are recorded in accumulated other comprehensive income ("AOCI") to the extent effective and reclassified into earnings in the same period or periods during which the transaction hedged by that derivative also affects earnings.
 • Changes in the fair value of a derivative that is designated as a fair value hedge, along with the offsetting loss or gain on the hedged asset or liability that is attributable to the risk being hedged, are recorded in earnings, thereby reflecting in earnings the net extent to which the hedge is not effective in achieving offsetting changes in fair value.
 • Changes in the fair value of a derivative not designated as a hedging instrument are recognized in earnings in cost of sales or SM&A, consistent with the related exposure.
 For derivatives designated as hedges, we assess, both at the hedge's inception and on an ongoing basis, whether they are highly effective in offsetting changes in fair values or cash flows of hedged items. The ineffective portion, if any, is recorded directly in earnings. In addition, if we determine that a derivative is not highly effective as a hedge or that it has ceased to be a highly effective hedge, we discontinue hedge accounting prospectively.
 We do not hold or issue derivative instruments for trading or speculative purposes and are not a party to any instruments with leverage or prepayment features.
 Cash flows related to the derivative instruments we use to manage interest, commodity or other currency exposures are classified as operating activities.
 Recent Accounting Pronouncements
 Recently Adopted Accounting Pronouncements
 In March 2020, the Financial Accounting Standards Board ("FASB") issued Accounting Standards Update ("ASU") No. 2020-04, Reference Rate Reform (Topic 848): Facilitation of the Effects of Reference Rate Reform on Financial Reporting. The ASU is intended to provide temporary optional expedients and exceptions to the GAAP guidance on contract modifications and hedge accounting to ease the financial reporting burdens related to the expected market transition from the London Interbank Offered Rate (LIBOR) and other interbank offered rates to alternative reference rates. Entities may apply this ASU upon issuance through December 31, 2022 on a prospective basis. We early adopted the provisions of this ASU in the first quarter of 2022. Adoption of the new standard did not have a material impact on our consolidated financial statements.
 In September 2022, the FASB issued ASU No. 2022-04, Liabilities—Supplier Finance Programs (Subtopic 405-50):
 Disclosure of Supplier Finance Program Obligations. This ASU requires a buyer in a supplier finance program to disclose qualitative and quantitative information about the program including the program's nature, activity during the period, changes from period to period and potential magnitude. ASU 2022-04 is effective for annual periods beginning after December 15, 2022 and interim periods within those annual periods. A rollforward of obligations during the annual period, including the amount of obligations confirmed and obligations subsequently paid, is effective for annual periods beginning after December 15, 2023 with early adoption permitted. This ASU should be applied

 The Hershey Company | 2023 Form 10-K | Page 61

 retrospectively to each period in which a balance sheet is presented, except for the amendment on rollforward information, which should be applied prospectively. We early adopted provisions of this ASU in the fourth quarter of 2022, with the exception of the amendment on rollforward information, which we adopted in the fourth quarter of 2023. Adoption of the new standard did not have a material impact on our consolidated financial statements.
 In October 2021, the FASB issued ASU No. 2021-08, Business Combinations (Topic 805): Accounting for Contract Assets and Contract Liabilities from Contracts with Customers. This ASU requires an acquirer to recognize and measure contract assets and contract liabilities acquired in a business combination in accordance with Revenue from Contracts with Customers (Topic 606) rather than adjust them to fair value at the acquisition date. ASU 2021-08 is effective for annual periods beginning after December 15, 2022 and interim periods within those annual periods. This ASU should be applied prospectively to business combinations occurring on or after the date of adoption. As a result, we adopted the provisions of this ASU in the first quarter of 2023. This new standard was not applicable to our May 2023 acquisition of Weaver Popcorn Manufacturing, Inc. ("Weaver") due to no contract assets or liabilities (as discussed in Note 2); however, will be applied in relevant future acquisitions.
 Recently Issued Accounting Pronouncements Not Yet Adopted
 In March 2023, the FASB issued ASU No. 2023-02, Investments - Equity Method and Joint Ventures (Topic 323): Accounting for Investments in tax credit structures using the proportional amortization method. This ASU allows entities to elect the proportional amortization method for all tax equity investments, regardless of how the tax credits are received as long as certain criteria are met. This ASU may be applied in a modified retrospective or retrospective basis and an entity must evaluate the investments in which it still expects to receive tax credits or other income tax benefits as of the beginning of the earliest period presented. ASU 2023-02 is effective for annual periods beginning after December 15, 2023 and interim periods within those annual periods. We are currently evaluating the impact of the new standard on our consolidated financial statements and related disclosures.
 In November 2023, the FASB issued ASU No. 2023-07, Segment Reporting (Topic 280): Improvements to Reportable Segment Disclosures. This ASU requires disclosure of significant segment expenses that are regularly provided to the chief operating decision maker ("CODM"), an amount for other segment items with a description of the composition, and disclosure of the title and position of the CODM. ASU 2023-07 is effective for annual periods beginning after December 15, 2023 and interim periods within fiscal years beginning after December 15, 2024. Early adoption is permitted and the update should be applied retrospectively to each period presented in the financial statements. We are currently evaluating the impact of the new standard on our consolidated financial statements and related disclosures. As a result, we intend to adopt the provisions of this ASU in the fourth quarter of 2024.
 In December 2023, the FASB issued ASU No. 2023-09, Income Taxes (Topic 740): Improvements to Income Tax Disclosures. This ASU requires public business entities on an annual basis to disclose specific categories in a tabular rate reconciliation and provide additional information for reconciling items that meet a five percent quantitative threshold. Additionally, the ASU requires all entities to disclose the amount of income taxes paid disaggregated by federal, state, and foreign taxes, as well as individual jurisdictions where income taxes paid are equal to or greater than five percent of total income taxes paid. ASU 2023-09 is effective for annual periods beginning after December 15, 2024. Early adoption is permitted and the updated should be applied on a prospective basis, with a retrospective application permitted in the financial statements. We are currently evaluating the impact of the new standard on our consolidated financial statements and related disclosures. As a result, we intend to adopt the provisions of this ASU in the fourth quarter of 2025.
 No other new accounting pronouncement issued or effective during the fiscal year had or is expected to have a material impact on our consolidated financial statements or disclosures.

 The Hershey Company | 2023 Form 10-K | Page 62

 2. BUSINESS ACQUISITIONS AND DIVESTITURES
 Acquisitions of businesses are accounted for as business combinations and, accordingly, the results of operations of the businesses acquired have been included in the consolidated financial statements since the respective dates of the acquisitions. The purchase price for each acquisition is allocated to the assets acquired and liabilities assumed.
 In conjunction with acquisitions noted below, we used various valuation techniques to determine fair value of the assets acquired, with the primary techniques being discounted cash flow analysis, relief-from-royalty, a form of the multi-period excess earnings and the with-and-without valuation approaches, which use significant unobservable inputs, or Level 3 inputs, as defined by the fair value hierarchy. Inputs to these valuation approaches require significant judgment including: (i) forecasted sales, growth rates and customer attrition rates, (ii) forecasted operating margins, (iii) royalty rates and discount rates used to present value future cash flows, (iv) the amount of synergies expected from the acquisition, (v) the economic useful life of assets and (vi) the evaluation of historical tax positions. In certain acquisitions, historical data is limited; therefore, we base our estimates and assumptions on budgets, business plans, economic projections, anticipated future cash flows and marketplace data.

 2023 Activity
 Manufacturing Capacity
 On May 31, 2023, we completed the acquisition of certain assets that provide additional manufacturing capacity from Weaver, a leader in the production and co-packing of microwave popcorn and ready-to-eat popcorn, and former co-manufacturer of the Company's SkinnyPop brand. The cash consideration paid for Weaver totaled $ 165,818 and consisted of cash on hand and short-term borrowings. Acquisition-related costs for the Weaver acquisition were immaterial.
 The acquisition has been accounted for as a business combination and, accordingly, Weaver has been included within the North America Salty Snacks segment from the date of acquisition. The purchase consideration was allocated to assets acquired and liabilities assumed based on their respective fair values and consisted of $ 85,231 to goodwill, $ 79,136 to property, plant and equipment, net and $ 1,451 to other net assets acquired. The purchase price allocation has been finalized as of the fourth quarter of 2023 and did not include measurement period adjustments.
 Goodwill was determined as the excess of the purchase price over the fair value of the net assets acquired. The goodwill derived from this acquisition is deductible for tax purposes and reflects the value of leveraging our supply chain capabilities to accelerate growth and access to our portfolio of salty snacks products.
 2021 Activity
 Pretzels Inc.
 On December 14, 2021, we completed the acquisition of Pretzels Inc. ("Pretzels"), previously a privately held company that manufactures and sells pretzels and other salty snacks for other branded products and private labels in the United States. Pretzels is an industry leader in the pretzel category with a product portfolio that includes filled, gluten free and seasoned pretzels, as well as extruded snacks that complements Hershey's snacks portfolio. Based in Bluffton, Indiana, Pretzels operates three manufacturing locations in Indiana and Kansas. Pretzels provides Hershey with deep pretzel category and product expertise and the manufacturing capabilities to support brand growth and future pretzel innovation. The cash consideration paid for Pretzels totaled $ 304,334 and consisted of cash on hand and short-term borrowings. Acquisition-related costs for the Pretzels acquisition were immaterial.

 The Hershey Company | 2023 Form 10-K | Page 63

 The acquisition has been accounted for as a business combination and, accordingly, Pretzels has been included within the North America Salty Snacks segment from the date of acquisition. The purchase consideration was allocated to assets acquired and liabilities assumed based on their respective fair values as follows:

 $
 166,191

 Other intangible assets
 26,100

 Current assets acquired
 30,835

 100,716

 Other non-current assets, primarily operating lease ROU assets
 111,787

 Current liabilities acquired
 ( 22,713)

 Other long-term liabilities, primarily operating lease liabilities
 ( 109,355)

 Net assets acquired
 $
 304,334

 The purchase price allocation presented above has been finalized as of the third quarter of 2022 and includes an immaterial amount of measurement period adjustments. The measurement period adjustments to the initial allocation were based on more detailed information obtained about the specific assets acquired and liabilities assumed, specifically, post-closing adjustments to the working capital acquired including certain holdbacks.
 Goodwill was determined as the excess of the purchase price over the fair value of the net assets acquired (including the identifiable intangible assets). A portion of goodwill derived from this acquisition is deductible for tax purposes and reflects the value of leveraging our brand building expertise, supply chain capabilities and retail relationships to accelerate growth and access to the portfolio of Pretzels' products.
 Other intangible assets include trademarks valued at $ 5,700 and customer relationships valued at $ 20,400. Trademarks were assigned an estimated useful life of five years and customer relationships were assigned an estimated useful life of 19 years.

 Dot's Pretzels, LLC

 On December 13, 2021, we completed the acquisition of Dot's Pretzels, LLC ("Dot's"), previously a privately held company that produces and sells pretzels and other snack food products to retailers and distributors in the United States, with Dot's Homestyle Pretzels snacks as its primary product, which complements Hershey's snacks portfolio. The cash consideration paid for Dot's totaled $ 891,169 and consisted of cash on hand and short-term borrowings. Acquisition-related costs for the Dot's acquisition were immaterial.

 The acquisition has been accounted for as a business combination and, accordingly, Dot's has been included within the North America Salty Snacks segment from the date of acquisition. The purchase consideration was allocated to assets acquired and liabilities assumed based on their respective fair values as follows:

 $
 284,427

 Other intangible assets
 543,100

 Current assets acquired
 51,121

 40,266

 Other non-current assets
 2,201

 Other liabilities assumed, primarily current liabilities
 ( 29,946)

 Net assets acquired
 $
 891,169

 The purchase price allocation presented above has been finalized as of the third quarter of 2022 and includes an immaterial amount of measurement period adjustments. The measurement period adjustments to the initial allocation were based on more detailed information obtained about the specific assets acquired and liabilities assumed, specifically, the refinement of certain assumptions in the value of customer relationships based on an analysis of

 The Hershey Company | 2023 Form 10-K | Page 64

 historical customer-specific data and post-closing adjustments to the working capital acquired including certain holdbacks.
 Goodwill was determined as the excess of the purchase price over the fair value of the net assets acquired (including the identifiable intangible assets). The goodwill derived from this acquisition is deductible for tax purposes and reflects the value of leveraging our brand building expertise, supply chain capabilities and retail relationships to accelerate growth and access to the portfolio of Dot's products.
 Other intangible assets include trademarks valued at $ 336,600 and customer relationships valued at $ 206,500. Trademarks were assigned an estimated useful life of 33 years and customer relationships were assigned estimated useful life of 18 years.
 Lily's Sweets, LLC
 On June 25, 2021, we completed the acquisition of Lily's Sweets, LLC ("Lily's"), previously a privately held company that sells a line of sugar-free and low-sugar confectionery foods to retailers and distributors in the United States and Canada. Lily's products include dark and milk chocolate style bars, baking chips, peanut butter cups and other confection products that complement Hershey's confectionery and confectionery-based portfolio. The cash consideration paid for Lily's totaled $ 422,210 and the Company may be required to pay additional cash consideration if certain defined targets related to net sales and gross margin are exceeded during the period from the closing date through December 31, 2021. As of the acquisition date, the estimated fair value of the contingent consideration obligation was classified as a liability of $ 5,000 and was determined using a scenario-based analysis on forecasted future results. Based on financial results through December 31, 2021, the fair value was reduced during the fourth quarter of 2021 to $ 1,250, with the adjustment to fair value recorded in the SM&A expense caption within the Consolidated Statements of Income. We paid this contingent consideration during the second quarter of 2022. Acquisition-related costs for the Lily's acquisition were immaterial.

 The acquisition has been accounted for as a business combination and, accordingly, Lily's has been included within the North America Confectionery segment from the date of acquisition. The purchase consideration, inclusive of the acquisition date fair value of the contingent consideration, was allocated to assets acquired and liabilities assumed based on their respective fair values as follows:

 $
 175,826

 Other intangible assets
 235,800

 Other assets acquired, primarily current assets
 33,092

 Other liabilities assumed, primarily current liabilities
 ( 9,620)

 ( 7,888)

 Net assets acquired
 $
 427,210

 The purchase price allocation presented above has been finalized as of the fourth quarter of 2021 and includes an immaterial amount of measurement period adjustments. The measurement period adjustments to the initial allocation were based on more detailed information obtained about the specific assets acquired and liabilities assumed.

 Goodwill was determined as the excess of the purchase price over the fair value of the net assets acquired (including the identifiable intangible assets). The majority of goodwill derived from this acquisition is expected to be deductible for tax purposes and reflects the value of leveraging our brand building expertise, supply chain capabilities and retail relationships to accelerate growth and access to the portfolio of Lily's products.

 Other intangible assets include trademarks valued at $ 151,600 and customer relationships valued at $ 84,200. Trademarks were assigned an estimated useful life of 33 years and customer relationships were assigned estimated useful lives ranging from 17 to 18 years.

 The Hershey Company | 2023 Form 10-K | Page 65

 Lotte Shanghai Foods Co., Ltd.

 In January 2021, we completed the divestiture of Lotte Shanghai Foods Co., Ltd. ("LSFC"), which was previously included within the International segment results in our consolidated financial statements. Total proceeds from the divestiture and the impact on our consolidated financial statements were immaterial and were recorded in the SM&A expense caption within the Consolidated Statements of Income.

 3. GOODWILL AND INTANGIBLE ASSETS
 The changes in the carrying value of goodwill by segment for the years ended December 31, 2023 and 2022 are as follows:

 Total

 $
 2,030,979
 $
 589,798
 $
 374,745
 $
 2,995,522

 Accumulated impairment loss
 ( 4,973)
 —
 ( 357,375)
 ( 362,348)

 Balance at January 1, 2022

 2,026,006
 589,798
 17,370
 2,633,174

 Measurement period adjustments
 —
 ( 18,028)
 —
 ( 18,028)

 Foreign currency translation
 ( 7,576)
 —
 ( 614)
 ( 8,190)

 Balance at December 31, 2022

 2,018,430
 571,770
 16,756
 2,606,956

 Acquired during the period (see Note 2)

 —
 85,231
 —
 85,231

 Foreign currency translation
 2,401
 —
 1,462
 3,863

 Balance at December 31, 2023

 $
 2,020,831
 $
 657,001
 $
 18,218
 $
 2,696,050

 We had no goodwill impairment charges in 2023, 2022 or 2021.
 The following table provides the gross carrying amount and accumulated amortization for each major class of intangible asset:

 2023
 2022

 Gross Carrying Amount
 Accumulated Amortization
 Gross Carrying Amount
 Accumulated Amortization

 Intangible assets subject to amortization:

 Trademarks

 $
 1,703,029
 $
 ( 249,947)
 $
 1,701,932
 $
 ( 190,045)

 Customer-related

 513,910
 ( 123,282)
 513,188
 ( 93,495)

 Patents

 8,233
 ( 8,233)
 8,053
 ( 8,053)

 Total

 2,225,172
 ( 381,462)
 2,223,173
 ( 291,593)

 Intangible assets not subject to amortization:

 Trademarks

 35,519
 34,689

 Total other intangible assets

 $
 1,879,229
 $
 1,966,269

 Total amortization expense for the years ended December 31, 2023, 2022 and 2021 was $ 88,771, $ 79,690 and $ 52,124, respectively.
 Amortization expense for the next five years, based on current intangible asset balances, is estimated to be as follows:

 Year ending December 31,
 2024
 2025
 2026
 2027
 2028

 Amortization expense
 $
 78,276
 $
 78,276
 $
 78,276
 $
 77,136
 $
 77,136

 The Hershey Company | 2023 Form 10-K | Page 66

 4. SHORT AND LONG-TERM DEBT
 Short-term Debt
 As a source of short-term financing, we utilize cash on hand and commercial paper or bank loans with an original maturity of three months or less. We maintain a $ 1.35 billion unsecured revolving credit facility with the option to increase borrowings by an additional $ 500 million with the consent of the lenders. This facility is scheduled to expire on April 26, 2028; however, we may extend the termination date for up to two additional one-year periods upon notice to the administrative agent under the facility.
 The unsecured committed revolving credit agreement contains a financial covenant whereby the ratio of (a) pre-tax income from operations from the most recent four fiscal quarters to (b) consolidated interest expense for the most recent four fiscal quarters may not be less than 2.0 to 1.0 at the end of each fiscal quarter. The credit agreement also contains customary representations, warranties and events of default. Payment of outstanding advances may be accelerated, at the option of the lenders, should we default in our obligation under the credit agreement. As of December 31, 2023, we are in compliance with all affirmative and negative covenants and the financial covenant pertaining to our credit agreement. There were no significant compensating balance agreements that legally restricted these funds.
 In addition to the revolving credit facility, we maintain lines of credit with domestic and international commercial banks. Our credit limit in various currencies was $ 411,553 at December 31, 2023 and $ 313,195 at December 31, 2022. These lines permit us to borrow at the respective banks' prime commercial interest rates, or lower. Commitment fees relating to our revolving credit facility and lines of credit are not material. Short-term debt consisted of the following:

 December 31, 2023
 December 31, 2022

 Short-term foreign bank borrowings against lines of credit
 $
 192,278
 $
 135,555

 U.S. commercial paper
 527,561
 558,235

 Total short-term debt
 $
 719,839
 $
 693,790

 Weighted average interest rate on outstanding commercial paper
 5.4
 %
 4.3
 %

 The maximum amount of short-term borrowings outstanding during 2023 and 2022 was $ 859,773 and $ 937,593, respectively. The weighted-average interest rate on short-term borrowings outstanding was 5.8 % as of December 31, 2023 and 4.4 % as of December 31, 2022.

 The Hershey Company | 2023 Form 10-K | Page 67

 Long-term Debt
 Long-term debt consisted of the following:

 Maturity Date
 2023
 2022

 2.625 % Notes (1)

 May 1, 2023
 —
 250,000

 3.375 % Notes (1)

 May 15, 2023
 —
 500,000

 2.050 % Notes

 November 15, 2024

 0.900 % Notes

 June 1, 2025

 3.200 % Notes

 August 21, 2025

 2.300 % Notes

 August 15, 2026
 500,000
 500,000

 7.200 % Debentures

 August 15, 2027
 193,639
 193,639

 4.250 % Notes (2)

 May 4, 2028
 —

 2.450 % Notes

 November 15, 2029

 1.700 % Notes

 June 1, 2030

 4.500 % Notes (2)

 May 4, 2033
 400,000
 —

 3.375 % Notes

 August 15, 2046

 3.125 % Notes

 November 15, 2049
 400,000
 400,000

 2.650 % Notes

 June 1, 2050

 Finance lease obligations (see Note 7)

 76,385
 73,479

 Net impact of interest rate swaps, debt issuance costs and unamortized debt discounts
 ( 25,834)
 ( 19,563)

 Total long-term debt
 4,094,190
 4,097,555

 Less—current portion
 305,058
 753,578

 Long-term portion
 $
 3,789,132
 $
 3,343,977

 (1) In May 2023, we repaid $ 250,000 of 2.625 % Notes and $ 500,000 of 3.375 % Notes due upon their maturity.
 (2) During the second quarter of 2023, we issued $ 350,000 of 4.250 % Notes due in May 2028 and $ 400,000 of 4.500 % Notes due in May 2033 (the "2023 Notes"). Proceeds from the issuance of the 2023 Notes, net of discounts and issuance costs, totaled $ 744,092. The 2023 Notes were issued under a shelf registration on Form S-3 filed in May 2021 that registered an indeterminate amount of debt securities.
 Aggregate annual maturities of our long-term Notes (excluding finance lease obligations and net impact of interest rate swaps, debt issuance costs and unamortized debt discounts) are as follows for the years ending December 31:

 2024
 $

 2025
 600,000

 2026
 500,000

 2027
 193,639

 2028

 Thereafter
 2,100,000

 Our debt is principally unsecured and of equal priority. None of our debt is convertible into our Common Stock.

 The Hershey Company | 2023 Form 10-K | Page 68

 Interest Expense
 Net interest expense consists of the following:

 2023
 2022
 2021

 Interest expense
 $
 176,066
 $
 148,226
 $
 139,156

 Capitalized interest

 ( 14,555)
 ( 8,131)
 ( 9,310)

 Interest expense

 161,511
 140,095
 129,846

 Interest income
 ( 9,726)
 ( 2,538)
 ( 2,429)

 $
 151,785
 $
 137,557
 $
 127,417

 5. DERIVATIVE INSTRUMENTS
 We are exposed to market risks arising principally from changes in foreign currency exchange rates, interest rates and commodity prices. We use certain derivative instruments to manage these risks. These include interest rate swaps to manage interest rate risk, foreign currency forward exchange contracts to manage foreign currency exchange rate risk, and commodities futures and options contracts to manage commodity market price risk exposures.
 In entering into these contracts, we have assumed the risk that might arise from the possible inability of counterparties to meet the terms of their contracts. We mitigate this risk by entering into exchanged-traded contracts with collateral posting requirements and/or by performing financial assessments prior to contract execution, conducting periodic evaluations of counterparty performance and maintaining a diverse portfolio of qualified counterparties. We do not expect any significant losses from counterparty defaults.
 Commodity Price Risk
 We enter into commodities futures and options contracts and other commodity derivative instruments to reduce the effect of future price fluctuations associated with the purchase of raw materials, energy requirements and transportation services. We generally hedge commodity price risks for 3 - to 24 -month periods. Our open commodity derivative contracts had a notional value of $ 94,917 as of December 31, 2023 and $ 243,009 as of December 31, 2022.
 Derivatives used to manage commodity price risk are not designated for hedge accounting treatment. Therefore, the changes in fair value of these derivatives are recorded as incurred within cost of sales. As discussed in Note 13, we define our segment income to exclude gains and losses on commodity derivatives until the related inventory is sold, at which time the related gains and losses are reflected within segment income. This enables us to continue to align the derivative gains and losses with the underlying economic exposure being hedged and thereby eliminate the mark-to-market volatility within our reported segment income.
 Foreign Exchange Price Risk
 We are exposed to foreign currency exchange rate risk related to our international operations, including non-functional currency intercompany debt and other non-functional currency transactions of certain subsidiaries. Principal currencies hedged include the euro, Canadian dollar, Japanese yen, British pound, Brazilian real, Malaysian ringgit, Mexican peso and Swiss franc. We typically utilize foreign currency forward exchange contracts to hedge these exposures for periods ranging from 3 to 12 months. The contracts are either designated as cash flow hedges or are undesignated. The net notional amount of foreign exchange contracts accounted for as cash flow hedges was $ 80,068 at December 31, 2023 and $ 59,448 at December 31, 2022. The effective portion of the changes in fair value on these contracts is recorded in other comprehensive income and reclassified into earnings in the same period in which the hedged transactions affect earnings. The net notional amount of foreign exchange contracts that are not designated as accounting hedges was $ 13,665 at December 31, 2023 and $ 1,843 at December 31, 2022. The change in fair value on these instruments is recorded directly in cost of sales or selling, marketing and administrative expense, depending on the nature of the underlying exposure.

 The Hershey Company | 2023 Form 10-K | Page 69

 Interest Rate Risk
 In order to manage interest rate exposure, from time to time, we enter into interest rate swap agreements to protect against unfavorable interest rate changes relating to forecasted debt transactions. These swaps, which are settled upon issuance of the related debt, are designated as cash flow hedges and the gains and losses that are deferred in other comprehensive income are being recognized as an adjustment to interest expense over the same period that the hedged interest payments affect earnings.
 Equity Price Risk
 We are exposed to market price changes in certain broad market indices related to our deferred compensation obligations to our employees. To mitigate this risk, we use equity swap contracts to hedge the portion of the exposure that is linked to market-level equity returns. These contracts are not designated as hedges for accounting purposes and are entered into for periods of 3 to 12 months. The change in fair value of these derivatives is recorded in SM&A expense, together with the change in the related liabilities. The notional amount of the contracts outstanding at December 31, 2023 and 2022 was $ 22,867 and $ 18,803, respectively.
 The following table presents the classification of derivative assets and liabilities within the Consolidated Balance Sheets as of December 31, 2023 and 2022:

 2023
 2022

 Assets (1)
 Liabilities (1)
 Assets (1)
 Liabilities (1)

 Derivatives designated as cash flow hedging instruments:

 Foreign exchange contracts
 $
 1,219
 $
 1,670
 $
 3,921
 $

 Derivatives not designated as hedging instruments:

 Commodities futures and options (2)

 Deferred compensation derivatives
 2,343
 —
 1,222
 —

 Foreign exchange contracts
 1,123
 —
 —

 3,532
 2,153

 Total
 $
 4,751
 $
 2,349
 $
 6,074
 $

 (1)Derivatives assets are classified on our Consolidated Balance Sheets within prepaid expenses and other as well as other non-current assets. Derivative liabilities are classified on our Consolidated Balance Sheets within accrued liabilities and other long-term liabilities.
 (2) As of December 31, 2023, amounts reflected on a net basis in liabilities were assets of $ 29,881 and liabilities of $ 30,493, which are associated with cash transfers receivable or payable on commodities futures contracts reflecting the change in quoted market prices on the last trading day for the period. The comparable amounts reflected on a net basis in assets at December 31, 2022 were assets of $ 25,308 and liabilities of $ 25,296. At December 31, 2023 and 2022, the remaining amount reflected in assets and liabilities related to the fair value of other non-exchange traded derivative instruments, respectively.

 The Hershey Company | 2023 Form 10-K | Page 70

 Income Statement Impact of Derivative Instruments
 The effect of derivative instruments on the Consolidated Statements of Income for the years ended December 31, 2023 and 2022 was as follows:

 Non-designated Hedges
 Cash Flow Hedges

 Gains (losses) recognized in income (a)
 Gains (losses) recognized in other comprehensive income ("OCI")
 Gains (losses) reclassified from AOCI into income (b)

 2023
 2022
 2023
 2022
 2023
 2022

 Commodities futures and options

 $
 ( 53,085)
 $
 44,569
 $
 —
 $
 —
 $
 —
 $
 —

 Foreign exchange contracts
 1,111
 ( 274)
 ( 4,860)
 2,056
 ( 1,150)

 Interest rate swap agreements

 —
 —
 5,814
 —
 ( 9,716)
 ( 10,836)

 Deferred compensation derivatives

 4,119
 ( 4,920)
 —
 —
 —
 —

 Total

 $
 ( 47,855)
 $
 39,375
 $
 $
 2,056
 $
 ( 10,866)
 $
 ( 10,200)

 (a)Gains (losses) recognized in income for non-designated commodities futures and options contracts were included in cost of sales. Gains (losses) recognized in income for non-designated foreign currency forward exchange contracts and deferred compensation derivatives were included in selling, marketing and administrative expenses.
 (b)Gains (losses) reclassified from AOCI into income for foreign currency forward exchange contracts were included in selling, marketing and administrative expenses. Losses reclassified from AOCI into income for interest rate swap agreements were included in interest expense.
 The amount of pretax net losses on derivative instruments, including interest rate swap agreements and foreign currency forward exchange contracts expected to be reclassified into earnings in the next 12 months was approximately $ 9,659 as of December 31, 2023. This amount is primarily associated with interest rate swap agreements.

 6. FAIR VALUE MEASUREMENTS
 Accounting guidance on fair value measurements requires that financial assets and liabilities be classified and disclosed in one of the following categories of the fair value hierarchy:

 Level 1 – Based on unadjusted quoted prices for identical assets or liabilities in an active market.

 Level 2 – Based on observable market-based inputs or unobservable inputs that are corroborated by market data.

 Level 3 – Based on unobservable inputs that reflect the entity's own assumptions about the assumptions that a market participant would use in pricing the asset or liability.

 We did no t have any Level 3 financial assets or liabilities, nor were there any transfers between levels during the periods presented.

 The Hershey Company | 2023 Form 10-K | Page 71

 The following table presents assets and liabilities that were measured at fair value in the Consolidated Balance Sheets on a recurring basis as of December 31, 2023 and 2022:

 Assets / Liabilities

 Level 1
 Level 2
 Level 3
 Total

 December 31, 2023:

 Derivative Instruments:

 Assets:

 Foreign exchange contracts (1)
 $
 —
 $
 2,342
 $
 —
 $
 2,342

 Deferred compensation derivatives (2)
 —
 2,343
 —
 2,343

 Commodities futures and options (3)
 —
 —

 Liabilities:

 Foreign exchange contracts (1)
 —
 1,670
 —
 1,670

 Commodities futures and options (3)
 —
 —

 December 31, 2022:

 Assets:

 Foreign exchange contracts (1)
 $
 —
 $
 4,167
 $
 —
 $
 4,167

 Deferred compensation derivatives (2)
 —
 1,222
 —
 1,222

 Commodities futures and options (3)
 —
 —

 Liabilities:

 Foreign exchange contracts (1)
 —
 —

 Commodities futures and options (3)
 —
 —

 (1)The fair value of foreign currency forward exchange contracts is the difference between the contract and current market foreign currency exchange rates at the end of the period. We estimate the fair value of foreign currency forward exchange contracts on a quarterly basis by obtaining market quotes of spot and forward rates for contracts with similar terms, adjusted where necessary for maturity differences.
 (2)The fair value of deferred compensation derivatives is based on quoted prices for market interest rates and a broad market equity index.
 (3)The fair value of commodities futures and options contracts is based on quoted market prices.
 Other Financial Instruments
 The carrying amounts of cash and cash equivalents, accounts receivable, accounts payable and short-term debt approximated fair values as of December 31, 2023 and December 31, 2022 because of the relatively short maturity of these instruments.
 The estimated fair value of our long-term debt is based on quoted market prices for similar debt issuances and is, therefore, classified as Level 2 within the valuation hierarchy. The fair values and carrying values of long-term debt, including the current portion, were as follows:

 Fair Value
 Carrying Value

 At December 31,
 2023
 2022
 2023
 2022

 Current portion of long-term debt
 $
 297,842
 $
 749,345
 $
 305,058
 $
 753,578

 Long-term debt
 3,413,411
 2,854,165
 3,789,132
 3,343,977

 Total
 $
 3,711,253
 $
 3,603,510
 $
 4,094,190
 $
 4,097,555

 The Hershey Company | 2023 Form 10-K | Page 72

 Other Fair Value Measurements
 In addition to assets and liabilities that are recorded at fair value on a recurring basis, GAAP requires that, under certain circumstances, we also record assets and liabilities at fair value on a nonrecurring basis.
 2023 Activity
 In connection with the acquisition of Weaver during 2023, as discussed in Note 2, we used various valuation techniques to determine fair value, with the primary technique being the cost approach to value personal property, which uses significant unobservable inputs, or Level 3 inputs, as defined by the fair value hierarchy.
 2021 Activity
 In connection with the acquisitions of Lily's, Dot's and Pretzels during 2021, as discussed in Note 2, we used various valuation techniques to determine fair value, with the primary techniques being discounted cash flow analysis and the relief-from-royalty, a form of the multi-period excess earnings, which use significant unobservable inputs, or Level 3 inputs, as defined by the fair value hierarchy.

 7. LEASES
 We lease office and retail space, warehouse and distribution facilities, land, vehicles, and equipment. We determine if an agreement is or contains a lease at inception. Leases with an initial term of 12 months or less are not recorded on the balance sheet.
 ROU assets represent our right to use an underlying asset for the lease term and lease liabilities represent our obligation to make lease payments arising from the lease. ROU assets and liabilities are based on the estimated present value of lease payments over the lease term and are recognized at the lease commencement date.
 As most of our leases do not provide an implicit rate, we use our estimated incremental borrowing rate in determining the present value of lease payments. The estimated incremental borrowing rate is derived from information available at the lease commencement date.
 Our lease terms may include options to extend or terminate the lease when it is reasonably certain that we will exercise that option. A limited number of our lease agreements include rental payments adjusted periodically for inflation. Our lease agreements generally do not contain residual value guarantees or material restrictive covenants.
 For real estate, equipment and vehicles that support selling, marketing and general administrative activities the Company accounts for the lease and non-lease components as a single lease component. These asset categories comprise the majority of our leases. The lease and non-lease components of real estate and equipment leases supporting production activities are not accounted for as a single lease component. Consideration for such contracts is allocated to the lease component and non-lease components based upon relative standalone prices either observable or estimated if observable prices are not readily available.
 The components of lease expense were as follows:

 Lease expense
 Classification
 2023
 2022

 Operating lease cost
 Cost of sales or SM&A (1)
 $
 48,577
 $
 48,988

 Finance lease cost:

 Amortization of ROU assets
 Depreciation and amortization (1)
 8,140
 7,043

 Interest on lease liabilities
 4,593
 4,192

 Net lease cost (2)
 $
 61,310
 $
 60,223

 (1)Supply chain-related amounts were included in cost of sales.
 (2)Net lease cost does not include short-term leases, variable lease costs or sublease income, all of which are immaterial.

 The Hershey Company | 2023 Form 10-K | Page 73

 Information regarding our lease terms and discount rates were as follows:

 2023
 2022

 Weighted-average remaining lease term (years)

 Operating leases
 14.4
 15.0

 Finance leases
 25.9
 27.7

 Weighted-average discount rate

 Operating leases
 3.5
 %
 3.2
 %

 Finance leases
 6.2
 %
 6.1
 %

 Supplemental balance sheet information related to leases were as follows:

 Leases
 Classification
 2023
 2022

 Assets

 Operating lease ROU assets
 Other non-current assets
 $
 307,976
 $
 326,472

 Finance lease ROU assets, at cost
 Property, plant and equipment, gross
 89,335
 86,703

 Accumulated amortization
 Accumulated depreciation
 ( 19,472)
 ( 14,543)

 Finance lease ROU assets, net
 69,863
 72,160

 Total leased assets
 $
 377,839
 $
 398,632

 Liabilities

 Current

 Operating
 Accrued liabilities
 $
 34,494
 $
 31,787

 Finance
 Current portion of long-term debt
 5,900
 4,285

 Non-current

 Operating
 Other long-term liabilities
 277,089
 294,849

 Finance
 Long-term debt
 70,485
 69,194

 Total lease liabilities
 $
 387,968
 $
 400,115

 The Hershey Company | 2023 Form 10-K | Page 74

 The maturity of our lease liabilities as of December 31, 2023 were as follows:

 Operating leases
 Finance leases
 Total

 2024
 $
 44,708
 $
 10,240
 $
 54,948

 2025
 31,395
 8,651
 40,046

 2026
 26,669
 5,442
 32,111

 2027
 26,063
 4,288
 30,351

 2028
 25,064
 4,189
 29,253

 Thereafter
 243,161
 137,877
 381,038

 Total lease payments
 397,060
 170,687
 567,747

 Less: Imputed interest
 85,477
 94,302
 179,779

 Total lease liabilities
 $
 311,583
 $
 76,385
 $
 387,968

 Supplemental cash flow and other information related to leases were as follows:

 2023
 2022

 Cash paid for amounts included in the measurement of lease liabilities:

 Operating cash flows from operating leases
 $
 45,176
 $
 45,179

 Operating cash flows from finance leases
 $
 4,593
 $
 4,192

 Financing cash flows from finance leases
 $
 5,381
 $
 4,717

 ROU assets obtained in exchange for lease liabilities:

 Operating leases
 $
 18,469
 $
 13,998

 Finance leases
 $
 7,448
 $
 9,617

 8. INVESTMENTS IN UNCONSOLIDATED AFFILIATES
 We invest in partnerships that make equity investments in projects eligible to receive federal historic and renewable energy tax credits. The tax credits, when realized, are recognized as a reduction of tax expense under the flow-through method, at which time the corresponding equity investment is written-down to reflect the remaining value of the future benefits to be realized. The equity investment write-down is reflected within other (income) expense, net in the Consolidated Statements of Income (see Note 17).

 Additionally, we acquire ownership interests in emerging snacking businesses and startup companies, which vary in method of accounting based on our percentage of ownership and ability to exercise significant influence over decisions relating to operating and financial affairs. These investments afford the Company the rights to distribute brands that the Company does not own to third-party customers primarily in North America. Net sales and expenses of our equity method investees are not consolidated into our financial statements; rather, our proportionate share of earnings or losses are recorded on a net basis within other (income) expense, net in the Consolidated Statements of Income.

 Both equity method investments and cost, less impairment, investments are reported within other non-current assets in our Consolidated Balance Sheets. We regularly review our investments and adjust accordingly for capital contributions, dividends received and other-than-temporary impairments. Total investments in unconsolidated affiliates was $ 207,177 and $ 133,029 as of December 31, 2023 and December 31, 2022, respectively.

 The Hershey Company | 2023 Form 10-K | Page 75

 9. BUSINESS REALIGNMENT ACTIVITIES
 We periodically undertake business realignment activities designed to increase our efficiency and focus our business in support of our key growth strategies. Costs associated with business realignment activities are classified in our Consolidated Statements of Income as follows:

 2023
 2022
 2021

 Cost of sales
 $
 $
 $
 5,220

 Selling, marketing and administrative expense
 2,472
 2,425
 7,854

 Business realignment costs
 1,989
 3,525

 Costs associated with business realignment activities
 $
 3,440
 $
 4,417
 $
 16,599

 Costs recorded by program in 2023, 2022 and 2021 related to these activities were as follows:

 2023
 2022
 2021

 International Optimization Program:

 Severance and employee benefit costs
 $
 $
 2,001
 $
 3,982

 Other program costs
 2,999
 2,416
 12,617

 Total
 $
 3,440
 $
 4,417
 $
 16,599

 Amounts classified as liabilities qualifying as exit and disposal costs primarily represent employee-related and certain third-party service provider charges; however, such amounts at December 31, 2023 are not significant and are expected to be paid within the next 12 months.
 Advancing Agility & Automation Initiative
 On February 2, 2024, the Board of Directors of the Company approved a multi-year productivity initiative ("Advancing Agility & Automation" or "AAA") to improve supply chain and manufacturing-related spend, optimize selling, general and administrative expenses, leverage new technology and business models to further simplify and automate processes, and generate long-term savings.
 The Company estimates that the AAA Initiative will result in total pre-tax costs of $ 200,000 to $ 250,000 from inception through 2026. This estimate primarily includes program office execution and third-party costs supporting the design and implementation of the new organizational structure of $ 100,000 to $ 120,000, as well as implementation and technology capability costs of $ 55,000 to $ 70,000. Additionally, we expect to incur employee severance and related separation benefits of $ 45,000 to $ 60,000 as we facilitate workforce reductions and reallocate resources to further drive the Company's strategic priorities. The cash portion of the total cost is estimated to be $ 175,000 to $ 225,000. At the conclusion of the program in 2026, ongoing annual savings are expected to be approximately $ 300,000.
 2020 International Optimization Program
 In the fourth quarter of 2020, we commenced a program ("International Optimization Program") to streamline resources and investments in select international markets, including the optimization of our China operating model that will improve our operational efficiency and provide for a strong, sustainable and simplified base going forward.
 The International Optimization Program was originally expected to total pre-tax costs of $ 50,000 to $ 75,000, with cash costs in the range of $ 40,000 to $ 65,000, primarily related to workforce reductions of approximately 350 positions outside of the United States, costs to consolidate and relocate production, and third-party costs incurred to execute these activities. The costs and related benefits of the International Optimization Program relate to the International segment. However, segment operating results do not include these business realignment expenses because we evaluate segment performance excluding such costs. This program was completed in 2023.

 The Hershey Company | 2023 Form 10-K | Page 76

 For the year ended December 31, 2023 and 2022, we recognized total costs associated with the International Optimization Program of $ 3,440 and $ 4,417. These charges predominantly included third-party charges in support of our initiative to transform our China operating model, as well as severance and employee benefit costs. Since inception, we have incurred pre-tax charges to execute the program totaling $ 53,799.

 10. INCOME TAXES
 The components of income before income taxes were as follows:

 2023
 2022
 2021

 Domestic

 $
 1,832,771
 $
 1,816,622
 $
 1,775,361

 Foreign
 339,093
 100,449
 21,863

 Income before income taxes

 $
 2,171,864
 $
 1,917,071
 $
 1,797,224

 The components of our provision for income taxes were as follows:

 2023
 2022
 2021

 Current:

 Federal
 $
 141,753
 $
 121,968
 $
 161,402

 State
 83,802
 85,741
 60,979

 Foreign
 68,289
 27,656
 78,650

 293,844
 235,365
 301,031

 Deferred:

 Federal
 28,191
 34,848
 26,726

 State
 ( 9,531)
 3,393
 8,253

 Foreign
 ( 2,427)
 ( 1,352)
 ( 21,605)

 16,233
 36,889
 13,374

 Total provision for income taxes
 $
 310,077
 $
 272,254
 $
 314,405

 The Hershey Company | 2023 Form 10-K | Page 77

 Deferred taxes reflect temporary differences between the tax basis and financial statement carrying value of assets and liabilities. The significant temporary differences that comprised the deferred tax assets and liabilities are as follows:

 2023
 2022

 Deferred tax assets:

 Post-retirement benefit obligations

 $
 24,969
 $
 40,100

 Accrued expenses and other reserves

 85,601
 78,523

 Stock-based compensation

 21,656
 19,847

 Derivative instruments

 12,268
 3,983

 Lease liabilities

 90,405
 91,099

 Accrued trade promotion reserves

 18,796
 23,082

 Net operating loss carryforwards

 110,342
 130,944

 Capital loss carryforwards
 —
 1,999

 Other
 83,011
 52,802

 Gross deferred tax assets
 447,048
 442,379

 Valuation allowance
 ( 114,149)
 ( 137,531)

 Total deferred tax assets
 332,899
 304,848

 Deferred tax liabilities:

 271,465
 247,964

 Acquired intangibles
 228,711
 193,160

 Lease ROU assets
 71,150
 72,602

 Inventories
 13,250
 28,573

 Pension
 10,001
 11,038

 Other
 39,566
 39,416

 Total deferred tax liabilities
 634,143
 592,753

 Net deferred tax liabilities
 $
 ( 301,244)
 $
 ( 287,905)

 Included in:

 Non-current deferred tax assets, net
 $
 44,454
 $
 40,498

 Non-current deferred tax liabilities, net
 ( 345,698)
 ( 328,403)

 Net deferred tax liabilities
 $
 ( 301,244)
 $
 ( 287,905)

 Changes in deferred taxes were primarily due to acquired intangibles and accelerated tax depreciation on property, plant and equipment.
 The valuation allowances as of December 31, 2023 and 2022 were primarily related to various foreign jurisdictions' net operating loss carryforwards and other deferred tax assets that we do not expect to realize.

 The Hershey Company | 2023 Form 10-K | Page 78

 The following table reconciles the federal statutory income tax rate with our effective income tax rate:

 2023
 2022
 2021

 Federal statutory income tax rate
 21.0
 %
 21.0
 %
 21.0
 %

 Increase (reduction) resulting from:

 State income taxes, net of Federal income tax benefits
 2.8
 3.2
 2.8

 Foreign rate differences
 ( 1.0)
 ( 0.1)
 ( 0.2)

 Historic and solar tax credits
 ( 9.5)
 ( 9.9)
 ( 6.2)

 Tax contingencies
 1.1
 0.4
 1.7

 Stock compensation
 ( 0.5)
 ( 0.7)
 ( 0.5)

 Other, net
 0.4
 0.3
 ( 1.1)

 Effective income tax rate
 14.3
 %
 14.2
 %
 17.5
 %

 A reconciliation of the beginning and ending amount of unrecognized tax benefits is as follows:

 2023
 2022

 Balance at beginning of year

 $
 148,345
 $
 143,305

 Additions for tax positions taken during prior years

 11,567
 17,987

 Reductions for tax positions taken during prior years

 ( 26)
 ( 9,310)

 Additions for tax positions taken during the current year

 6,194
 4,112

 Settlements

 ( 9,838)
 —

 Expiration of statutes of limitations

 ( 6,617)
 ( 7,749)

 Balance at end of year

 $
 149,625
 $
 148,345

 The total amount of unrecognized tax benefits that, if recognized, would affect the effective tax rate was $ 122,706 as of December 31, 2023 and $ 120,699 as of December 31, 2022.
 We report accrued interest and penalties related to unrecognized tax benefits in income tax expense. We recognized a net tax expense of $ 12,027, $ 4,862 and $ 8,924 in 2023, 2022 and 2021, respectively, for interest and penalties. Accrued net interest and penalties were $ 37,355 as of December 31, 2023 and $ 25,328 as of December 31, 2022.
 The Company and its subsidiaries file tax returns in the United States, including various state and local returns, and in other foreign jurisdictions. We are routinely audited by taxing authorities in our filing jurisdictions, and a number of these disputes are currently underway, including multi-year controversies at various stages of review, negotiation and litigation in Mexico, Canada, Switzerland and the United States. The outcome of tax audits cannot be predicted with certainty, including the timing of resolution or potential settlements. If any issues addressed in our tax audits are resolved in a manner not consistent with management's expectations, we could be required to adjust our provision for income taxes in the period such resolution occurs. Based on our current assessments, we believe adequate provision has been made for all income tax uncertainties.
 We reasonably expect reductions in the liability for unrecognized tax benefits of approximately $ 51,355 within the next 12 months because of the expiration of statutes of limitations and settlements of tax audits.
 As of December 31, 2023, we had approximately $ 656,389 of undistributed earnings of our international subsidiaries. We continue to reinvest the remainder of the earnings outside of the United States for which there would be a material tax implication to distributing, such as withholding tax, for the foreseeable future and, therefore, have not recognized additional tax expense on these earnings beyond the one-time U.S. repatriation tax due under the 2017 Tax Cuts and Jobs Act.

 The Hershey Company | 2023 Form 10-K | Page 79

 Investments in Partnerships Qualifying for Tax Credits
 We invest in partnerships which make equity investments in projects eligible to receive federal historic and energy tax credits. The investments are accounted for under the equity method and reported within other non-current assets in our Consolidated Balance Sheets. The tax credits, when realized, are recognized as a reduction of tax expense under the flow-through method, at which time the corresponding equity investment is written-down to reflect the remaining value of the future benefits to be realized. For the years ended December 31, 2023, 2022 and 2021 we recognized investment tax credits and related outside basis difference benefits totaling $ 251,827, $ 228,819 and $ 136,243, respectively, and we wrote-down the equity investment by $ 210,484, $ 188,286 and $ 113,756, respectively, to reflect the realization of these benefits. The equity investment write-down is reflected within other (income) expense, net in the Consolidated Statements of Income (see Note 17).
 Inflation Reduction Act
 On August 16, 2022, the Inflation Reduction Act ("IRA") was signed into law. The IRA enacted a 15% corporate minimum tax on certain corporations and an excise tax on share repurchases after December 31, 2022, and created and extended certain energy-related tax credits and incentives. For the year ended December 31, 2023, the tax-related provisions of the IRA did not have a material impact on our consolidated financial statements, including our annual effective tax rate, or on our liquidity.

 11. PENSION AND OTHER POST-RETIREMENT BENEFIT PLANS
 We sponsor a number of defined benefit pension plans. The primary plans were The Hershey Company Retirement Plan ("Retirement Plan") and the Hershey Company Retirement Plan for Hourly Employees ("Hourly Plan"). These are cash balance plans that provide pension benefits for most U.S. employees hired prior to January 1, 2007. Effective December 31, 2023, the Hourly Plan merged into the Retirement Plan and the name was changed to The Hershey Retirement Plan for Salaried and Hourly Employees. We also sponsor two post-retirement benefit plans: health care and life insurance. The health care plan is contributory, with participants' contributions adjusted annually. The life insurance plan is non-contributory.

 The Hershey Company | 2023 Form 10-K | Page 80

 Obligations and Funded Status
 A summary of the changes in benefit obligations, plan assets and funded status of these plans is as follows:

 2023
 2022
 2023
 2022

 Change in benefit obligation

 Projected benefit obligation at beginning of year
 $
 830,285
 $
 1,076,180
 $
 164,889
 $
 211,490

 Service cost
 14,991
 17,500

 Interest cost
 41,205
 30,491
 7,171
 4,603

 Actuarial (gain) loss
 23,187
 ( 184,775)
 38,789
 ( 28,145)

 Curtailment
 —
 —
 ( 740)
 —

 Settlement
 ( 66,132)
 ( 82,907)
 ( 88,689)
 —

 Currency translation and other
 2,466
 ( 3,268)
 ( 324)
 ( 613)

 Benefits paid
 ( 23,967)
 ( 22,936)
 ( 21,006)
 ( 22,748)

 Projected benefit obligation at end of year
 822,035
 830,285
 100,311
 164,889

 Change in plan assets

 Fair value of plan assets at beginning of year
 848,432
 1,098,191
 —
 —

 Actual return on plan assets
 70,096
 ( 196,969)
 —
 —

 Employer contributions
 6,576
 55,799
 21,006
 22,748

 Settlement
 ( 66,132)
 ( 82,907)
 ( 88,689)
 —

 Annuity purchase
 —
 —
 88,689
 —

 Currency translation and other
 1,838
 ( 2,746)
 —
 —

 Benefits paid
 ( 23,967)
 ( 22,936)
 ( 21,006)
 ( 22,748)

 Fair value of plan assets at end of year
 836,843
 848,432
 —
 —

 Funded status at end of year

 $
 14,808
 $
 18,147
 $
 ( 100,311)
 $
 ( 164,889)

 Amounts recognized in the Consolidated Balance Sheets:

 Other assets
 $
 48,506
 $
 53,495
 $
 —
 $
 —

 Accrued liabilities
 ( 4,749)
 ( 7,652)
 ( 9,593)
 ( 17,715)

 Other long-term liabilities
 ( 28,949)
 ( 27,696)
 ( 90,718)
 ( 147,174)

 Total
 $
 14,808
 $
 18,147
 $
 ( 100,311)
 $
 ( 164,889)

 Amounts recognized in Accumulated Other Comprehensive Income (Loss), net of tax:

 Actuarial net (loss) gain
 $
 ( 129,184)
 $
 ( 150,378)
 $
 ( 7,704)
 $
 19,689

 Net prior service credit
 8,561
 12,435
 —

 Net amounts recognized in AOCI
 $
 ( 120,623)
 $
 ( 137,943)
 $
 ( 7,177)
 $
 19,689

 The projected benefit obligation during 2023 was impacted by actuarial loss of $ 23,187 which was mainly the result of the discount rate assumption decreasing from 5.5 % at December 31, 2022 to 5.1 % at December 31, 2023. The accumulated benefit obligation for all defined benefit pension plans was $ 789,257 as of December 31, 2023 and $ 799,635 as of December 31, 2022.

 The Hershey Company | 2023 Form 10-K | Page 81

 Plans with accumulated benefit obligations in excess of plan assets were as follows:

 2023
 2022

 Projected benefit obligation

 $
 40,278
 $
 36,669

 Accumulated benefit obligation
 33,812
 32,167

 Fair value of plan assets

 6,695
 3,606

 Plans with projected benefit obligations in excess of plan assets were as follows:

 2023
 2022

 Projected benefit obligation

 $
 84,416
 $
 79,932

 Accumulated benefit obligation
 71,046
 68,665

 Fair value of plan assets

 50,718
 44,584

 Net Periodic Benefit Cost
 The components of net periodic benefit cost were as follows:

 2023
 2022
 2021
 2023
 2022
 2021

 Amounts recognized in net periodic benefit cost

 Service cost
 $
 14,991
 $
 17,500
 $
 21,361
 $
 $
 $
 1,879

 Interest cost
 41,205
 30,491
 18,320
 7,171
 4,603
 3,857

 Expected return on plan assets
 ( 48,978)
 ( 47,637)
 ( 49,091)
 —
 —
 —

 Amortization of prior service credit
 ( 5,658)
 ( 5,651)
 ( 6,142)
 ( 50)
 —
 —

 Amortization of net (gain) loss
 19,846
 16,060
 20,556
 ( 966)
 ( 92)
 1,593

 Curtailment credit
 —
 —
 —
 ( 740)
 —
 —

 Settlement loss
 15,254
 20,692
 16,085
 —
 —

 Total net periodic benefit cost
 $
 36,660
 $
 31,455
 $
 21,089
 $
 6,562
 $
 4,813
 $
 7,329

 Change in plan assets and benefit obligations recognized in AOCI, pre-tax

 Actuarial net (gain) loss
 $
 ( 32,720)
 $
 22,609
 $
 ( 80,047)
 $
 38,698
 $
 ( 26,212)
 $
 ( 16,374)

 Prior service cost (credit)
 5,670
 5,601
 6,447
 ( 736)
 —
 —

 Total recognized in other comprehensive (income) loss, pre-tax

 $
 ( 27,050)
 $
 28,210
 $
 ( 73,600)
 $
 37,962
 $
 ( 26,212)
 $
 ( 16,374)

 Net amounts recognized in periodic benefit cost and AOCI
 $
 9,610
 $
 59,665
 $
 ( 52,511)
 $
 44,524
 $
 ( 21,399)
 $
 ( 9,045)

 The non-service cost components of net periodic benefit cost relating to pension and other post-retirement benefit plans is reflected within other (income) expense, net in the Consolidated Statements of Income (see Note 17).

 The Hershey Company | 2023 Form 10-K | Page 82

 Assumptions
 The weighted-average assumptions used in computing the year end benefit obligations were as follows:

 2023
 2022
 2023
 2022

 Discount rate

 5.1
 %
 5.5
 %
 5.2
 %
 5.5
 %

 Rate of increase in compensation levels

 3.6
 %
 3.4
 %
 4.0
 %
 4.0
 %

 Interest crediting rate

 4.8
 %
 4.7
 %
 N/A
 N/A

 The weighted-average assumptions used in computing net periodic benefit cost were as follows:

 2023
 2022
 2021
 2023
 2022
 2021

 Discount rate

 5.5
 %
 2.7
 %
 2.3
 %
 5.5
 %
 2.9
 %
 2.5
 %

 Expected long-term return on plan assets
 6.2
 %
 4.9
 %
 4.8
 %
 N/A
 N/A
 N/A

 Rate of compensation increase

 3.4
 %
 3.5
 %
 3.5
 %
 N/A
 N/A
 N/A

 The Company's discount rate assumption is determined by developing a yield curve based on high quality corporate bonds with maturities matching the plans' expected benefit payment streams. The plans' expected cash flows are then discounted by the resulting year-by-year spot rates. We base the asset return assumption on current and expected asset allocations, as well as historical and expected returns on the plan asset categories.

 We utilize a full yield curve approach in the estimation of service and interest costs by applying the specific spot rates along the yield curve used in the determination of the benefit obligation to the relevant projected cash flows. This approach provides a more precise measurement of service and interest costs by improving the correlation between the projected cash flows to the corresponding spot rates along the yield curve. This approach does not affect the measurement of our pension and other post-retirement benefit liabilities, but generally results in lower benefit expense in periods when the yield curve is upward sloping.

 For purposes of measuring our post-retirement benefit obligation at December 31, 2023, we assumed a 6.4 % annual rate of increase in the per capita cost of covered health care benefits for 2024, grading down to 5.0 % by 2030. For purposes of measuring our post-retirement benefit obligation at December 31, 2022, we assumed a 6.7 % annual rate of increase in the per capita cost of covered health care benefits for 2023, grading down to 5.0 % by 2030.
 The valuations and assumptions reflect adoption of the Society of Actuaries updated Pri-2012 mortality tables with MP-2021 generational projection scales, which we adopted as of December 31, 2021. The Society of Actuaries did not update the Pri-2012 mortality tables in 2022 or 2023. Adoption of the updated scales did not have a significant impact on our current pension obligations or net period benefit cost since our primary plans are cash balance plans and most participants take lump-sum settlements upon retirement.
 Plan Assets
 We broadly diversify our pension plan assets across public equity, fixed income, diversified credit strategies and diversified alternative strategies asset classes. Our target asset allocation for our major domestic pension plans as of December 31, 2023 was as follows:

 Asset Class
 Target Asset Allocation

 Cash

 1 %

 Equity securities

 27 %

 Fixed income securities

 48 %

 Alternative investments, including real estate, listed infrastructure and other

 24 %

 The Hershey Company | 2023 Form 10-K | Page 83

 As of December 31, 2023, actual allocations were consistent with the targets and within our allowable ranges. We expect the level of volatility in pension plan asset returns to be in line with the overall volatility of the markets within each asset class.
 The following table sets forth by level, within the fair value hierarchy (as defined in Note 6), pension plan assets at their fair values as of December 31, 2023:

 Quoted prices in active
markets of identical assets
(Level 1)
 Significant other observable inputs
(Level 2)
 Significant other unobservable inputs
(Level 3)
 Investments Using NAV as a Practical Expedient
(1)

Total

 Cash and cash equivalents
 $
 $
 42,202
 $
 —
 $
 $
 43,711

 Equity securities:

 International all-cap
 —
 —
 —

 Global all-cap (a)
 —
 —
 —
 209,245
 209,245

 Fixed income securities:

 U.S. government/agency
 —
 —
 —
 186,095
 186,095

 Corporate bonds (b)
 —
 —
 —
 60,293
 60,293

 International government/corporate bonds (c)
 —
 —
 —
 29,254
 29,254

 Diversified credit (d)
 —
 —
 —
 123,081
 123,081

 Alternative investments:

 Global diversified assets (e)
 —
 —
 —
 68,856
 68,856

 Real assets fund (f)
 —
 —
 —
 115,913
 115,913

 Total pension plan assets
 $
 $
 42,202
 $
 —
 $
 793,732
 $
 836,843

 The following table sets forth by level, within the fair value hierarchy, pension plan assets at their fair values as of December 31, 2022:

 Quoted prices in active
markets of identical assets
(Level 1)
 Significant other observable inputs
(Level 2)
 Significant other unobservable inputs
(Level 3)
 Investments Using NAV as a Practical Expedient
(1)
 Total

 Cash and cash equivalents

 $
 $
 29,595
 $
 —
 $
 $
 30,488

 Equity securities:

 Global all-cap (a)

 —
 —
 —
 206,636
 206,636

 Fixed income securities:

 U.S. government/agency

 —
 —
 —
 173,122
 173,122

 Corporate bonds (b)

 —
 —
 —
 58,646
 58,646

 International government/corporate bonds (c)

 —
 —
 —
 26,489
 26,489

 Diversified credit (d)
 —
 —
 —
 109,926
 109,926

 Alternative investments:

 Global diversified assets (e)

 —
 —
 —
 95,243
 95,243

 Real assets fund (f)
 —
 —
 —
 147,882
 147,882

 Total pension plan assets

 $
 $
 29,595
 $
 —
 $
 818,510
 $
 848,432

 The Hershey Company | 2023 Form 10-K | Page 84

 (1)Certain investments that are measured at fair value using the net asset value per share (or its equivalent) practical expedient have not been categorized in the fair value hierarchy but are included to reconcile to the amounts presented in our Obligations and Funded Status table.

 (a)
 This category comprises equity funds that primarily track the MSCI World Index or MSCI All Country World Index.

 (b)
 This category comprises fixed income funds primarily invested in investment grade and high yield bonds.

 (c)
 This category comprises fixed income funds primarily invested in Canadian and other international bonds.

 (d)
 This category comprises fixed income funds primarily invested in high yield bonds, loans, securitized debt and emerging market debt.

 (e)
 This category comprises diversified funds invested across alternative asset classes.

 (f)
 This category comprises funds primarily invested in publicly traded real estate securities, publicly listed infrastructure securities and real estate debt.

 The fair value of the Level 1 assets was based on quoted prices in active markets for the identical assets. The fair value of the Level 2 assets was determined by management based on an assessment of valuations provided by asset management entities and was calculated by aggregating market prices for all underlying securities.
 Investment objectives for our domestic plan assets are:

 • To ensure high correlation between the value of plan assets and liabilities;
 • To maintain careful control of the risk level within each asset class; and
 • To focus on a long-term return objective.

 We believe that there are no significant concentrations of risk within our plan assets as of December 31, 2023. We comply with the rules and regulations promulgated under the Employee Retirement Income Security Act of 1974 ("ERISA") and we prohibit investments and investment strategies not allowed by ERISA. We do not permit direct purchases of our Company's securities or the use of derivatives for the purpose of speculation. We invest the assets of non-domestic plans in compliance with laws and regulations applicable to those plans.
 Cash Flows and Plan Termination
 Our policy is to fund domestic pension liabilities in accordance with the limits imposed by the ERISA, federal income tax laws and the funding requirements of the Pension Protection Act of 2006. We fund non-domestic pension liabilities in accordance with laws and regulations applicable to those plans.
 We made total contributions to the pension plans of $ 6,576 during 2023. In 2022, we made total contributions of $ 55,799 to the pension plans. For 2024, minimum funding requirements for our pension plans are approximately $ 1,943.
 Total benefit payments expected to be paid to plan participants, including pension benefits funded from the plans and other benefits funded from Company assets, are as follows:

 Expected Benefit Payments

 2024
 2025
 2026
 2027
 2028
 2029-2033

 $
 113,052
 $
 89,810
 $
 93,596
 $
 75,694
 $
 74,212
 $
 312,386

 9,589
 9,107
 8,619
 8,050
 7,461
 32,107

 The Hershey Company | 2023 Form 10-K | Page 85

 Annuitization of Other Post Employment Benefits
 On August 21, 2023, the Hershey Employee Benefits Committee approved the purchase of an irrevocable group annuity contract with an insurance company for eligible retirees of The Hershey Company Retiree Medical and Life Insurance Plan to cover their medical benefits. On August 31, 2023, we paid $ 88,689 for the irrevocable group annuity contract. As a result of this transaction, we remeasured the projected benefit obligation and recognized a $ 926 non-cash pre-tax settlement charge during the quarter ended October 1, 2023.
 Savings Plans
 The Company sponsors several defined contribution plans to provide retirement benefits to employees. Contributions to The Hershey Company 401(k) Plan and similar plans for non-domestic employees are based on a portion of eligible pay up to a defined maximum. All matching contributions were made in cash. Expense associated with the defined contribution plans was $ 67,763 in 2023, $ 61,477 in 2022 and $ 58,883 in 2021.

 12. STOCK COMPENSATION PLANS
 Share-based grants for compensation and incentive purposes are made pursuant to the Equity and Incentive Compensation Plan ("EICP"). The EICP provides for grants of one or more of the following stock-based compensation awards to employees, non-employee directors and certain service providers upon whom the successful conduct of our business is dependent:

 • Non-qualified stock options ("stock options");
 • Performance stock units ("PSUs") and performance stock;
 • Stock appreciation rights;
 • Restricted stock units ("RSUs") and restricted stock; and
 • Other stock-based awards.

 As of December 31, 2023, 68.5 million shares were authorized and approved by our stockholders for grants under the EICP. The EICP also provides for the deferral of stock-based compensation awards by participants if approved by the Compensation and Human Capital Committee of our Board and if in accordance with an applicable deferred compensation plan of the Company. Currently, the Compensation and Human Capital Committee has authorized the deferral of PSU and RSU awards by certain eligible employees under the Company's Deferred Compensation Plan. Our Board has authorized our non-employee directors to defer any portion of their cash retainer, committee chair fees and RSUs awarded that they elect to convert into deferred stock units under our Directors' Compensation Plan.
 At the time stock options are exercised or PSUs and RSUs become payable, Common Stock is issued from our accumulated treasury shares. Dividend equivalents are credited on RSUs on the same date and at the same rate as dividends paid on our Common Stock. Dividend equivalents are charged to retained earnings and included in accrued liabilities until paid.
 Awards to employees eligible for retirement prior to the award becoming fully vested are amortized to expense over the period through the date that the employee first becomes eligible to retire and is no longer required to provide service to earn the award. In addition, historical data is used to estimate forfeiture rates and record share-based compensation expense only for those awards that are expected to vest.
 For the periods presented, compensation expense for all types of stock-based compensation programs and the related income tax benefit recognized were as follows:

 2023
 2022
 2021

 Pre-tax compensation expense

 $
 81,021
 $
 65,991
 $
 66,711

 Related income tax benefit
 11,910
 9,635
 11,608

 Compensation expenses for stock compensation plans are primarily included in SM&A expense. As of December 31, 2023, total stock-based compensation expense related to non-vested awards not yet recognized was $ 91,479 and the weighted-average period over which this amount is expected to be recognized was approximately 1.8 years.

 The Hershey Company | 2023 Form 10-K | Page 86

 Stock Options
 The exercise price of each stock option awarded under the EICP equals the closing price of our Common Stock on the New York Stock Exchange on the date of grant. Each stock option has a maximum term of 10 years. Grants of stock options provide for pro-rated vesting, typically over a four-year period. Expense for stock options is based on grant date fair value and recognized on a straight-line method over the vesting period, net of estimated forfeitures.
 A summary of activity relating to grants of stock options for the year ended December 31, 2023 is as follows:
 Stock Options
 Shares
 Weighted-Average
Exercise Price (per share)
 Weighted-Average Remaining
Contractual Term
 Aggregate Intrinsic Value

 Outstanding at beginning of the period

 976,634
 $ 104.36
 3.8 years

 Granted
 5,215
 $ 240.90

 Exercised

 ( 255,148)
 $ 103.41

 Forfeited
 —
 $ 0.00

 Expired
 —
 $ 0.00

 Outstanding as of December 31, 2023

 726,701
 $ 105.67
 3.3 years
 $
 59,044

 Options exercisable as of December 31, 2023

 700,646
 $ 103.12
 3.1 years
 $
 58,394

 The weighted-average fair value of options granted was $ 57.65, $ 37.28 and $ 24.12 per share in 2023, 2022 and 2021, respectively. The fair value was estimated on the date of grant using a Black-Scholes option-pricing model and the following weighted-average assumptions:
 2023
 2022
 2021

 Dividend yields

 1.7
 %
 1.9
 %
 2.2
 %

 Expected volatility
 20.9
 %
 21.1
 %
 21.8
 %

 Risk-free interest rates

 4.1
 %
 1.9
 %
 1.0
 %

 Expected term in years
 6.3
 6.3
 6.3

 •"Dividend yields" means the sum of dividends declared for the four most recent quarterly periods, divided by the average price of our Common Stock for the comparable periods;
 •"Expected volatility" means the historical volatility of our Common Stock over the expected term of each grant;
 •"Risk-free interest rates" means the U.S. Treasury yield curve rate in effect at the time of grant for periods within the contractual life of the stock option; and
 •"Expected term" means the period of time that stock options granted are expected to be outstanding based on historical data.
 The total intrinsic value of options exercised was $ 35,474, $ 40,882 and $ 38,645 in 2023, 2022 and 2021, respectively.
 As of December 31, 2023, there was $ 832 of total unrecognized compensation expense related to non-vested stock option awards granted under the EICP, which we expect to recognize over a weighted-average period of 0.8 years.

 The Hershey Company | 2023 Form 10-K | Page 87

 The following table summarizes information about stock options outstanding as of December 31, 2023:

 Options Outstanding
 Options Exercisable

 Range of Exercise Prices
 Number Outstanding as of 12/31/23
 Weighted-Average Remaining Contractual Life in Years
 Weighted-Average Exercise Price
 Number Exercisable as of 12/31/23
 Weighted-Average Exercise Price

 $ 60.68 - $ 99.90

 388,522
 3.4
 $ 96.78
 388,522
 $ 96.78

 $ 99.91 - $ 107.95

 210,214
 2.2
 $ 107.09
 210,214
 $ 107.09

 $ 107.96 - $ 240.90

 127,965
 4.7
 $ 130.31
 101,910
 $ 119.09

 $ 60.68 - $ 240.90

 726,701
 3.3
 $ 105.67
 700,646
 $ 103.12

 Performance Stock Units and Restricted Stock Units
 Under the EICP, we grant PSUs to selected executives and other key employees. Vesting is contingent upon the achievement of certain performance objectives. We grant PSUs over 3 -year performance cycles. If we meet targets for financial measures at the end of the applicable 3 -year performance cycle, we award a resulting number of shares of our Common Stock to the participants. The number of shares may be increased to the maximum or reduced to the minimum threshold based on the results of these performance metrics in accordance with the terms established at the time of the award.
 For PSUs granted, the target award is a combination of a market-based total shareholder return and performance-based components. For market-based condition components, market volatility and other factors are taken into consideration in determining the grant date fair value and the related compensation expense is recognized regardless of whether the market condition is satisfied, provided that the requisite service has been provided. For performance-based condition components, we estimate the probability that the performance conditions will be achieved each quarter and adjust compensation expenses accordingly. The performance scores of PSUs granted in 2023, 2022, and 2021 can range from 0 % to 250 % of the targeted amounts.
 We recognize the compensation expense associated with PSUs ratably over the 3 -year term. Compensation expense is based on the grant date fair value because the grants can only be settled in shares of our Common Stock. The grant date fair value of PSUs is determined based on the Monte Carlo simulation model for the market-based total shareholder return component and the closing market price of the Company's Common Stock on the date of grant for performance-based components.
 In 2023, 2022 and 2021, we awarded RSUs to certain executive officers and other key employees under the EICP. We also awarded RSUs quarterly to non-employee directors.
 We recognize the compensation expense associated with employee RSUs over a specified award vesting period based on the grant date fair value of our Common Stock. We recognize expense for employee RSUs based on the straight-line method. The compensation expense associated with non-employee director RSUs is recognized ratably over the vesting period, net of estimated forfeitures.

 The Hershey Company | 2023 Form 10-K | Page 88

 A summary of activity relating to grants of PSUs and RSUs for the period ended December 31, 2023 is as follows:

 Performance Stock Units and Restricted Stock Units
 Number of units
 Weighted-average grant date fair value for equity awards (per unit)

 Outstanding at beginning of year

 1,141,679
 $ 181.91

 Granted

 341,374
 $ 241.41

 Performance assumption change (1)
 24,325
 $( 88.67)

 Vested

 ( 443,502)
 $ 173.02

 Forfeited

 ( 24,185)
 $ 207.81

 Outstanding at end of year

 1,039,691
 $ 198.31

 (1)Reflects the net number of PSUs above and below target levels based on the performance metrics.
 The following table sets forth information about the fair value of the PSUs and RSUs granted for potential future distribution to employees and non-employee directors. In addition, the table provides assumptions used to determine the fair value of the market-based total shareholder return component using the Monte Carlo simulation model on the date of grant.
 2023
 2022
 2021

 Units granted

 341,374
 313,285
 404,517

 Weighted-average fair value at date of grant

 $
 241.41
 $
 211.85
 $
 154.83

 Monte Carlo simulation assumptions:

 Estimated values

 $
 118.90
 $
 100.41
 $
 66.44

 Dividend yields

 1.7
 %
 1.8
 %
 2.2
 %

 Expected volatility

 19.2
 %
 25.3
 %
 26.4
 %

 •"Estimated values" means the fair value for the market-based total shareholder return component of each PSU at the date of grant using a Monte Carlo simulation model;
 •"Dividend yields" means the sum of dividends declared for the four most recently quarterly periods, divided by the average price of our Common Stock for the comparable periods;
 •"Expected volatility" means the historical volatility of our Common Stock over the expected term of each grant.

 The fair value of shares vested totaled $ 106,243, $ 105,668 and $ 52,008 in 2023, 2022 and 2021, respectively.
 Deferred PSUs, deferred RSUs and deferred stock units representing directors' fees totaled 257,942 units as of December 31, 2023. Each unit is equivalent to one share of the Company's Common Stock.

 The Hershey Company | 2023 Form 10-K | Page 89

 13. SEGMENT INFORMATION

 The Company reports its operations through three segments: (i) North America Confectionery, (ii) North America Salty Snacks and (iii) International. This organizational structure aligns with how our CODM manages our business, including resource allocation and performance assessment, and further aligns with our product categories and the key markets we serve.
 • North America Confectionery – This segment is responsible for our traditional chocolate and non-chocolate confectionery market position in the United States and Canada. This includes our business in chocolate and non-chocolate confectionery, gum and refreshment products, protein bars, spreads, snack bites and mixes, as well as pantry and food service lines. This segment also includes our retail operations, including Hershey's Chocolate World stores in Hershey, Pennsylvania; New York, New York; Las Vegas, Nevada; Niagara Falls (Ontario) and Singapore, as well as operations associated with licensing the use of certain of the Company's trademarks and products to third parties around the world.
 • North America Salty Snacks – This segment is responsible for our salty snacking products in the United States. This includes ready-to-eat popcorn, baked and trans fat free snacks, pretzels and other snacks.
 • International – International is a combination of all other operating segments that are not individually material, including those geographic regions where we operate outside of North America. We currently have operations and manufacture product in Mexico, Brazil, India and Malaysia, primarily for consumers in these regions, and also distribute and sell confectionery products in export markets of Asia, Latin America, Middle East, Europe, Africa and other regions.
 For segment reporting purposes, we use "segment income" to evaluate segment performance and allocate resources. Segment income excludes unallocated general corporate administrative expenses, unallocated mark-to-market gains and losses on commodity derivatives, business realignment and impairment charges, acquisition-related costs and other unusual gains or losses that are not part of our measurement of segment performance. These items of our operating income are managed centrally at the corporate level and are excluded from the measure of segment income reviewed by the CODM as well the measure of segment performance used for incentive compensation purposes.
 Accounting policies associated with our operating segments are generally the same as those described in Note 1.
 As discussed in Note 5, derivatives used to manage commodity price risk are not designated for hedge accounting treatment. These derivatives are recognized at fair market value with the resulting realized and unrealized (gains) losses recognized in unallocated derivative (gains) losses outside of the reporting segment results until the related inventory is sold, at which time the related gains and losses are reallocated to segment income. This enables us to align the derivative gains and losses with the underlying economic exposure being hedged and thereby eliminate the mark-to-market volatility within our reported segment income.
 Certain manufacturing, warehousing, distribution and other activities supporting our global operations are integrated to maximize efficiency and productivity. As a result, assets and capital expenditures are not managed on a segment basis and are not included in the information reported to the CODM for the purpose of evaluating performance or allocating resources. We disclose depreciation and amortization that is generated by segment-specific assets, since these amounts are included within the measure of segment income reported to the CODM.

 The Hershey Company | 2023 Form 10-K | Page 90

 Our segment net sales and earnings were as follows:

 2023
 2022
 2021

 Net sales:

 $
 9,123,139
 $
 8,536,480
 $
 7,682,416

 1,092,689
 1,029,405
 555,424

 949,164
 853,409
 733,497

 Total
 $
 11,164,992
 $
 10,419,294
 $
 8,971,337

 Segment income:

 $
 3,117,044
 $
 2,811,066
 $
 2,475,873

 158,333
 159,935
 100,777

 148,259
 107,927
 74,170

 Total segment income
 3,423,636
 3,078,928
 2,650,820

 Unallocated corporate expense (1)
 800,390
 735,542
 614,875

 Unallocated mark-to-market losses (gains) on commodity derivatives
 58,939
 78,182
 ( 24,376)

 Costs associated with business realignment activities (see Note 9)

 3,440
 4,417
 16,599

 Operating profit
 2,560,867
 2,260,787
 2,043,722

 Interest expense, net (see Note 4)

 151,785
 137,557
 127,417

 Other (income) expense, net (see Note 17)

 237,218
 206,159
 119,081

 Income before income taxes
 $
 2,171,864
 $
 1,917,071
 $
 1,797,224

 (1)Includes centrally-managed (a) corporate functional costs relating to legal, treasury, finance, and human resources, (b) expenses associated with the oversight and administration of our global operations, including warehousing, distribution and manufacturing, information systems and global shared services, (c) non-cash stock-based compensation expense, (d) acquisition-related costs and (e) other gains or losses that are not integral to segment performance.

 Activity within the unallocated mark-to-market losses (gains) on commodity derivatives is as follows:

 2023
 2022
 2021

 Net losses (gains) on mark-to-market valuation of commodity derivative positions recognized in income
 $
 53,085
 $
 ( 44,569)
 $
 ( 85,402)

 Net gains on commodity derivative positions reclassified from unallocated to segment income
 5,854
 122,751
 61,026

 Net losses (gains) on mark-to-market valuation of commodity derivative positions recognized in unallocated derivative losses (gains)
 $
 58,939
 $
 78,182
 $
 ( 24,376)

 As of December 31, 2023, the cumulative amount of mark-to-market gains on commodity derivatives that have been recognized in our consolidated cost of sales and not yet allocated to reportable segments was $ 50,207. Based on our forecasts of the timing of the recognition of the underlying hedged items, we expect to reclassify net pretax gains on commodity derivatives of $ 39,333 to segment operating results in the next twelve months.

 The Hershey Company | 2023 Form 10-K | Page 91

 Depreciation and amortization expense included within segment income presented above is as follows:

 2023
 2022
 2021

 $
 238,786
 $
 228,399
 $
 213,113

 85,566
 68,600
 29,744

 23,699
 23,148
 22,754

 Corporate
 71,764
 58,812
 49,391

 Total
 $
 419,815
 $
 378,959
 $
 315,002

 Additional information regarding our net sales and long-lived assets disaggregated by geographical region is as follows:

 2023
 2022
 2021

 Net sales:

 $
 9,752,314
 $
 9,121,166
 $
 7,807,606

 Other

 1,412,678
 1,298,128
 1,163,731

 Total
 $
 11,164,992
 $
 10,419,294
 $
 8,971,337

 Long-lived assets:

 $
 2,732,787
 $
 2,272,811
 $
 2,099,786

 Other

 576,891
 496,891
 486,401

 Total
 $
 3,309,678
 $
 2,769,702
 $
 2,586,187

 14. EQUITY AND TREASURY STOCK ACTIVITY
 We had 1,055,000,000 authorized shares of capital stock as of December 31, 2023. Of this total, 900,000,000 shares were designated as Common Stock, 150,000,000 shares were designated as Class B Common Stock ("Class B Stock") and 5,000,000 shares were designated as Preferred Stock. Each class has a par value of one dollar per share.
 Holders of the Common Stock and the Class B Stock generally vote together without regard to class on matters submitted to stockholders, including the election of directors. The holders of Common Stock have 1 vote per share and the holders of Class B Common Stock have 10 votes per share. However, the Common Stock holders, voting separately as a class, are entitled to elect one-sixth of the Board. With respect to dividend rights, the Common Stock holders are entitled to cash dividends 10 % higher than those declared and paid on the Class B Common Stock.
 Class B Stock can be converted into Common Stock on a share-for-share basis at any time. During 2023 and 2022, 3,500,000 shares and 2,500,000 shares, respectively, of Class B Common Stock were converted to Common Stock by Hershey Trust Company, as trustee for the Milton Hershey School Trust (the "School Trust"). During 2021, no shares of Class B Stock were converted into Common Stock.

 The Hershey Company | 2023 Form 10-K | Page 92

 Changes in the outstanding shares of Common Stock for the past three years were as follows:

 2023
 2022
 2021

 Shares issued
 221,553,025
 221,553,025
 221,553,025

 Treasury shares at beginning of year
 ( 16,588,308)
 ( 15,444,011)
 ( 13,325,898)

 Stock repurchases:

 Shares repurchased in the open market under pre-approved share repurchase programs
 —
 —
 ( 871,144)

 Milton Hershey School Trust repurchase
 ( 1,000,000)
 ( 1,000,000)
 —

 Shares repurchased in the open market to replace Treasury Stock issued for stock options and incentive compensation
 ( 127,609)
 ( 824,701)
 ( 2,005,500)

 Stock issuances:

 Shares issued for stock options and incentive compensation
 555,818
 680,404
 758,531

 Treasury shares at end of year
 ( 17,160,099)
 ( 16,588,308)
 ( 15,444,011)

 Net shares outstanding at end of year
 204,392,926
 204,964,717
 206,109,014

 On August 16, 2022, the IRA was signed into law, which enacted a 1% excise tax on share repurchases beginning after December 31, 2022. As of December 31, 2023, Hershey's excise tax associated with net share repurchases is $ 2.4 million. A corresponding liability for excise tax associated with net share repurchases is classified on our Consolidated Balance Sheets within accrued liabilities.
 In July 2018, our Board of Directors approved a $ 500 million share repurchase authorization to repurchase shares of our Common Stock. In May 2021, our Board of Directors approved an additional $ 500 million share repurchase authorization. As a result of the February 2023 Stock Purchase Agreement with Hershey Trust Company, as trustee for the School Trust, the July 2018 share repurchase authorization was completed and as of December 31, 2023, approximately $ 370 million remains available for repurchases under our May 2021 share repurchase authorization. In December 2023, our Board of Directors approved an additional $ 500 million share repurchase authorization. This program is to commence after the existing 2021 authorization is completed and is to be utilized at management's discretion. We are authorized to purchase our outstanding shares in open market and privately negotiated transactions. The program has no expiration date and acquired shares of Common Stock will be held as treasury shares. Purchases under approved share repurchase authorizations are in addition to our practice of buying back shares sufficient to offset those issued under incentive compensation plans.
 Hershey Trust Company
 Hershey Trust Company, as trustee for the School Trust and as direct owner of investment shares, held 2,105,749 shares of our Common Stock as of December 31, 2023. As trustee for the School Trust, Hershey Trust Company held 54,612,012 shares of the Class B Common Stock as of December 31, 2023, and was entitled to cast approximately 79 % of all of the votes entitled to be cast on matters requiring the vote of both classes of our common stock voting together. Hershey Trust Company, as trustee for the School Trust, or any successor trustee, or Milton Hershey School, as appropriate, must approve any issuance of shares of Common Stock or other action that would result in it not continuing to have voting control of our Company.
 Stock Purchase Agreements
 In February 2023, the Company entered into a Stock Purchase Agreement with Hershey Trust Company, as trustee for the School Trust, pursuant to which the Company purchased 1,000,000 shares of the Company's Common Stock from the School Trust at a price equal to $ 239.91 per share, for a total purchase price of $ 239,910. As a result of this repurchase, our July 2018 share repurchase authorization program was completed in February 2023.

 In February 2022, the Company entered into a Stock Purchase Agreement with Hershey Trust Company, as trustee for the School Trust, pursuant to which the Company purchased 1,000,000 shares of the Company's Common Stock from the School Trust at a price equal to $ 203.35 per share, for a total purchase price of $ 203,350.

 The Hershey Company | 2023 Form 10-K | Page 93

 15. COMMITMENTS AND CONTINGENCIES
 Purchase obligations
 We enter into certain obligations for the purchase of raw materials. These obligations are primarily in the form of forward contracts for the purchase of raw materials from third-party brokers and dealers. These contracts minimize the effect of future price fluctuations by fixing the price of part or all of these purchase obligations. Total obligations consisted of fixed price contracts for the purchase of commodities and unpriced contracts that were valued using market prices as of December 31, 2023.
 The cost of commodities associated with the unpriced contracts is variable as market prices change over future periods. We mitigate the variability of these costs to the extent that we have entered into commodities futures contracts or other commodity derivative instruments to hedge our costs for those periods. Increases or decreases in market prices are offset by gains or losses on commodities futures contracts or other commodity derivative instruments. Taking delivery of and making payments for the specific commodities for use in the manufacture of finished goods satisfies our obligations under the forward purchase contracts. For each of the three years in the period ended December 31, 2023, we satisfied these obligations by taking delivery of and making payment for the specific commodities.
 As of December 31, 2023, we had entered into agreements for the purchase of raw materials with various suppliers. Subject to meeting our quality standards, the purchase obligations covered by these agreements were as follows as of December 31, 2023:

 in millions
 2024
 2025
 2026
 2027
 2028

 Purchase obligations
 $
 2,111.1
 $
 614.8
 $
 16.4
 $
 14.2
 $
 14.2

 Environmental contingencies
 We have a number of facilities that contain varying amounts of asbestos in certain locations within the facilities. Our asbestos management program is compliant with current applicable regulations, which require that we handle or dispose of asbestos in a special manner if such facilities undergo major renovations or are demolished. We do not have sufficient information to estimate the fair value of any asset retirement obligations related to these facilities. We cannot specify the settlement date or range of potential settlement dates and, therefore, sufficient information is not available to apply an expected present value technique. We expect to maintain the facilities with repairs and maintenance activities that would not involve or require the removal of significant quantities of asbestos.
 Legal contingencies
 The Company is subject to certain legal proceedings and claims arising out of the ordinary course of our business, which cover a wide range of matters including trade regulation, product liability, advertising, contracts, environmental issues, patent and trademark matters, labor and employment matters, human and workplace rights matters and tax. While it is not feasible to predict or determine the outcome of such proceedings and claims with certainty, in our opinion these matters, both individually and in the aggregate, are not expected to have a material effect on our financial condition, results of operations or cash flows.
 Collective Bargaining
 As of December 31, 2023, the Company employed approximately 18,650 full-time and 1,855 part-time employees worldwide. Collective bargaining agreements covered approximately 6,295 employees, or approximately 31 % of the Company's employees worldwide. During 2024, agreements will be negotiated for certain employees at five facilities, four of which are outside of the United States, comprising approximately 72 % of total employees under collective bargaining agreements. We currently expect that we will be able to renegotiate such agreements on satisfactory terms when they expire.

 The Hershey Company | 2023 Form 10-K | Page 94

 16. EARNINGS PER SHARE
 We compute basic earnings per share for Common Stock and Class B common stock using the two-class method. The Class B common stock is convertible into Common Stock on a share-for-share basis at any time. The computation of diluted earnings per share for Common Stock assumes the conversion of Class B common stock using the if-converted method, while the diluted earnings per share of Class B common stock does not assume the conversion of those shares.
 We compute basic and diluted earnings per share based on the weighted-average number of shares of Common Stock and Class B common stock outstanding as follows:
 2023
 2022
 2021

 Common Stock
 Class B Common Stock
 Common Stock
 Class B Common Stock
 Common Stock
 Class B Common Stock

 Basic earnings per share:

 Numerator:

 Allocation of distributed earnings (cash dividends paid)
 $
 663,176
 $
 225,895
 $
 567,897
 $
 207,133
 $
 498,084
 $
 187,903

 Allocation of undistributed earnings

 728,175
 244,541
 637,438
 232,349
 574,772
 216,753

 Total earnings—basic
 $
 1,391,351
 $
 470,436
 $
 1,205,335
 $
 439,482
 $
 1,072,856
 $
 404,656

 Denominator (shares in thousands):

 Total weighted-average shares—basic
 149,499
 55,239
 146,713
 58,822
 146,120

 Earnings Per Share—basic
 $
 9.31
 $
 8.52
 $
 8.22
 $
 7.47
 $
 7.34
 $
 6.68

 Diluted earnings per share:

 Numerator:

 Allocation of total earnings used in basic computation
 $
 1,391,351
 $
 470,436
 $
 1,205,335
 $
 439,482
 $
 1,072,856
 $
 404,656

 Reallocation of total earnings as a result of conversion of Class B common stock to Common stock
 470,436
 —
 439,482
 —
 404,656
 —

 Reallocation of undistributed earnings
 —
 ( 987)
 —
 ( 1,201)
 —
 ( 1,098)

 Total earnings—diluted
 $
 $
 469,449
 $
 $
 438,281
 $
 1,477,512
 $
 403,558

 Denominator (shares in thousands):

 Number of shares used in basic computation
 149,499
 55,239
 146,713
 58,822
 146,120

 Weighted-average effect of dilutive securities:

 Conversion of Class B common stock to Common shares outstanding
 55,239
 —
 58,822
 —
 —

 Employee stock options
 —
 —
 —

 Performance and restricted stock units
 —
 —
 —

 Total weighted-average shares—diluted
 205,547
 55,239
 206,575
 58,822
 207,758

 Earnings Per Share—diluted
 $
 9.06
 $
 8.50
 $
 7.96
 $
 7.45
 $
 7.11
 $
 6.66

 The earnings per share calculations for the years ended December 31, 2023, 2022 and 2021 excluded 15, 5 and 43 stock options (in thousands), respectively, that would have been antidilutive.

 The Hershey Company | 2023 Form 10-K | Page 95

 17. OTHER (INCOME) EXPENSE, NET
 Other (income) expense, net reports certain gains and losses associated with activities not directly related to our core operations. A summary of the components of other (income) expense, net is as follows:

 2023
 2022
 2021

 Write-down of equity investments in partnerships qualifying for historic and renewable energy tax credits (see Note 8)

 $
 210,484
 $
 188,286
 $
 113,756

 Non-service cost components of net periodic benefit cost relating to pension and other post-retirement benefit plans (see Note 11)

 28,010
 18,466
 5,177

 Other (income) expense, net
 ( 1,276)
 ( 593)

 Total

 $
 237,218
 $
 206,159
 $
 119,081

 18. RELATED PARTY TRANSACTIONS
 Hershey Trust Company, as trustee for the trust established by Milton S. and Catherine S. Hershey that has as its sole beneficiary the School Trust, maintains voting control over The Hershey Company.
 In any given year, we may engage in certain transactions with Hershey Trust Company, Milton Hershey School, the Milton Hershey School Trust and companies owned by and/or affiliated with any of the foregoing. Most transactions with these related parties are immaterial and do not require disclosure, but certain transactions are more significant in nature and have been deemed material for disclosure.
 A summary of material related party transactions with Hershey Trust Company and/or its affiliates for the years ended December 31, 2023 and 2022 is noted below. There were no material related party transactions with Hershey Trust Company and/or its affiliates for the year ended December 31, 2021.
 Sale and Donation of Property, Plant and Equipment

 In May 2022, the Company entered into a Purchase and Sale Agreement (the "Purchase Agreement") with Hershey Trust Company, as trustee for the School Trust, pursuant to which the Company agreed to sell certain real and personal property consisting of approximately six acres of land located in Hershey, Pennsylvania, together with portions of a building located on the land. Additionally, in June 2022, the Company entered into a Donation Agreement with Hershey Trust Company, as trustee for The M.S. Hershey Foundation, pursuant to which the Company agreed to donate a portion of the building concurrently with the closing of the Purchase Agreement. The sale and donation transactions closed in June 2022. Total proceeds from the sale were approximately $ 6,300 (net of transaction and closing costs), resulting in a loss of $ 13,568, which was recorded in the SM&A expense caption within the Consolidated Statements of Income. The fair values of the disposed assets were supported by a proposed sales price submitted by a third-party buyer received prior to executing the Purchase Agreement.

 Stock Purchase Agreements
 In February 2023 and February 2022, the Company entered into Stock Purchase Agreements with Hershey Trust Company, as trustee for the School Trust, pursuant to which the Company purchased shares of its Common Stock from the School Trust (see Note 14).

 The Hershey Company | 2023 Form 10-K | Page 96

 19. SUPPLEMENTAL BALANCE SHEET INFORMATION
 The components of certain asset accounts included within our Consolidated Balance Sheets are as follows:

 2023
 2022

 Inventories:

 Raw materials
 $
 481,111
 $
 372,612

 Goods in process
 192,232
 137,298

 Finished goods
 948,974
 855,217

 Inventories at FIFO
 1,622,317
 1,365,127

 Adjustment to LIFO
 ( 281,321)
 ( 192,008)

 Total inventories
 $
 1,340,996
 $
 1,173,119

 Prepaid expenses and other:

 Prepaid expenses
 $
 227,567
 $
 143,888

 Other current assets
 118,021
 128,307

 Total prepaid expenses and other
 $
 345,588
 $
 272,195

 Property, plant and equipment:

 Land
 $
 180,751
 $
 155,963

 Buildings
 1,763,070
 1,545,053

 Machinery and equipment
 3,861,006
 3,592,251

 Construction in progress
 644,244
 416,220

 Property, plant and equipment, gross
 6,449,071
 5,709,487

 Accumulated depreciation
 ( 3,139,393)
 ( 2,939,785)

 $
 3,309,678
 $
 2,769,702

 Other non-current assets:

 Pension
 $
 48,506
 $
 53,495

 Capitalized software, net
 360,205
 320,034

 Operating lease ROU assets
 307,976
 326,472

 Investments in unconsolidated affiliates
 207,177
 133,029

 Other non-current assets
 137,563
 111,959

 Total other non-current assets
 $
 1,061,427
 $
 944,989

 The Hershey Company | 2023 Form 10-K | Page 97

 The components of certain liability and stockholders' equity accounts included within our Consolidated Balance Sheet accounts are as follows:

 2023
 2022

 Accounts Payable:

 Accounts Payable—trade
 $
 630,536
 $
 636,472

 Supplier finance program obligations
 149,261
 105,293

 Other
 306,386
 228,793

 Total accounts payable
 $
 1,086,183
 $
 970,558

 Accrued liabilities:

 Payroll, compensation and benefits
 $
 261,961
 $
 293,865

 Advertising, promotion and product allowances
 343,444
 337,024

 Operating lease liabilities
 34,494
 31,787

 Other
 227,916
 169,842

 Total accrued liabilities
 $
 867,815
 $
 832,518

 Other long-term liabilities:

 Post-retirement benefits liabilities
 $
 90,718
 $
 147,174

 Pension benefits liabilities
 28,949
 27,696

 Operating lease liabilities
 277,089
 294,849

 Other
 263,917
 250,023

 Total other long-term liabilities
 $
 660,673
 $
 719,742

 Accumulated other comprehensive loss:

 Foreign currency translation adjustments
 $
 ( 87,706)
 $
 ( 110,364)

 Pension and post-retirement benefit plans, net of tax
 ( 126,800)
 ( 118,254)

 Cash flow hedges, net of tax
 ( 15,572)
 ( 23,715)

 Total accumulated other comprehensive loss
 $
 ( 230,078)
 $
 ( 252,333)

 The Hershey Company | 2023 Form 10-K | Page 98

 Item 9. CHANGES IN AND DISAGREEMENTS WITH ACCOUNTANTS ON ACCOUNTING AND FINANCIAL DISCLOSURE
 None.

 Item 9A. CONTROLS AND PROCEDURES

 Evaluation of Disclosure Controls and Procedures
 The Company's management, with the participation of the Company's Chief Executive Officer and Chief Financial Officer, has evaluated the effectiveness of the Company's disclosure controls and procedures, as defined in Rules 13a-15(e) and 15d-15(e) of the Securities Exchange Act of 1934 (the "Exchange Act"), as of December 31, 2023. Based on that evaluation, the Company's Chief Executive Officer and Chief Financial Officer concluded that the Company's disclosure controls and procedures were effective as of December 31, 2023.

 Design and Evaluation of Disclosure Controls and Procedures
 Disclosure controls and procedures are controls and other procedures that are designed to ensure that information required to be disclosed in the Company's reports filed or submitted under the Exchange Act is recorded, processed, summarized and reported within the time periods specified in the Securities and Exchange Commission's rules and forms. Disclosure controls and procedures include, without limitation, controls and procedures designed to ensure that information required to be disclosed in the Company's reports filed under the Exchange Act is accumulated and communicated to management, including the Company's Chief Executive Officer and Chief Financial Officer, as appropriate, to allow timely decisions regarding required disclosure.

 Changes in Internal Control Over Financial Reporting
 Management's report on the Company's internal control over financial reporting appears on the following page. We are in the process of a multi-year implementation of a new global enterprise resource planning ("ERP") system, which replaces our existing operating and financial systems. The ERP system is designed to accurately maintain the Company's financial records, enhance operational functionality, and provide timely information to the Company's management team related to the operation of the business. During the third quarter of 2022, we completed the implementation of one operating segment that is included in our International segment. In July 2023, we completed the transition to the new ERP system as the consolidated book of record. During October 2023, we completed the implementation of our new ERP system in the North America Salty Snacks segment. We updated our internal controls to reflect changes to the financial reporting business processes impacted by the implementation. Additionally, the Company acquired certain assets that provide additional manufacturing capacity from Weaver Popcorn Manufacturing, Inc. ("Weaver") (May 2023). Other than the implementation of the new ERP system in North America Salty Snacks and the ongoing integration of the Weaver acquisition, there have been no changes to the Company's internal control over financial reporting during the fourth quarter of 2023 that have materially affected, or are reasonably likely to materially affect, the Company's internal control over financial reporting.

 Further, the final implementation phase will occur in 2024 for the remainder of the business. The implementation will result in changes to our internal controls over financial reporting. As implementation occurs, we will evaluate quarterly whether such changes materially affect our internal control over financial reporting.

 The Hershey Company | 2023 Form 10-K | Page 99

 MANAGEMENT'S ANNUAL REPORT ON INTERNAL CONTROL OVER FINANCIAL REPORTING
 The management of The Hershey Company is responsible for establishing and maintaining adequate internal control over financial reporting, as such term is defined in Exchange Act Rule 13a-15(f). The Company's internal control system was designed to provide reasonable assurance to the Company's management and Board of Directors regarding the preparation and fair presentation of published financial statements.
 All internal control systems, no matter how well designed, have inherent limitations. Therefore, even those systems determined to be effective can provide only reasonable assurance with respect to financial statement preparation and presentation.
 The Company's management, including the Company's Chief Executive Officer and Chief Financial Officer, assessed the effectiveness of the Company's internal control over financial reporting as of December 31, 2023. In making this assessment, the Company's management used the criteria set forth by the Committee of Sponsoring Organizations of the Treadway Commission (COSO) in Internal Control–Integrated Framework (2013 edition). Based on this assessment, management concluded that, as of December 31, 2023, the Company's internal control over financial reporting was effective based on those criteria.
 Management's assessment of and conclusion on the effectiveness of internal control over financial reporting did not include the internal controls of the acquisition of certain assets that provide additional manufacturing capacity from Weaver, which is included in the 2023 consolidated financial statements of the Company and constituted 1.4% of total assets as of December 31, 2023. This exclusion is in accordance with the guidance issued by the U.S. Securities and Exchange Commission that allows companies to exclude acquisitions from management's report on internal control over financial reporting for the first year after the acquisition.
 The Company's independent auditors have audited, and reported on, the Company's internal control over financial reporting as of December 31, 2023.

 Item 9B. OTHER INFORMATION
 Director and Executive Officer Trading
 A portion of our directors' and officers' compensation is in the form of equity awards and, from time to time, they may engage in open-market transactions with respect to their Company securities for diversification or other personal reasons. All such transactions in Company securities by directors and officers must comply with the Company's Insider Trading Policy, which requires that transactions be in accordance with applicable U.S. federal securities laws that prohibit trading while in possession of material nonpublic information. Rule 10b5-1 under the Exchange Act provides an affirmative defense that enables directors and officers to prearrange transactions in the Company's securities in a manner that avoids concerns about initiating transactions while in possession of material nonpublic information.
 The following table describes the contracts, instructions or written plans for the purchase or sale of securities adopted by our directors or officers (as defined in Rule 16a-1(f) under the Exchange Act) during the three months ended December 31, 2023, that are intended to satisfy the affirmative defense conditions of Rule 10b5-1(c). No other Rule 10b5-1 trading arrangements or "non-Rule 10b5–1 trading arrangements" (as defined by S-K Item 408(c)) were entered into or terminated by our directors or officers during such period.

 Name and Title
 Date of Adoption of 10b5-1 Plan
 Duration of 10b5-1 Plan(1)

 Aggregate Number of Securities to be Sold or Purchased

 Jennifer L. McCalman
 VP, Chief Accounting Officer

 11/3/2023
 2/24/2024
 Sell 453 shares

 (1) The plan duration is until the date listed in this column or such earlier date upon the completion of all trades under the plan (or the expiration of the orders relating to such trades without execution) or the occurrence of such other termination events as specified in the plan.

 Item 9C. DISCLOSURE REGARDING FOREIGN JURISDICTIONS THAT PREVENT INSPECTIONS
 None.

 The Hershey Company | 2023 Form 10-K | Page 100

 Item 10. DIRECTORS, EXECUTIVE OFFICERS AND CORPORATE GOVERNANCE.
 The information regarding executive officers of the Company required by Item 401 of SEC Regulation S-K is incorporated herein by reference from the disclosure included under the caption "Supplemental Item. Information About Out Executive Officers" at the end of Part I of this Annual Report on Form 10-K.
 The information required by Item 401 of SEC Regulation S-K concerning the directors and nominees for director of the Company, together with a discussion of the specific experience, qualifications, attributes and skills that led the Board to conclude that the director or nominee should serve as a director at this time, will be located in the Proxy Statement in the section entitled "Proposal No. 1 – Election of Directors," which information is incorporated herein by reference.
 Information regarding the identification of the Audit Committee as a separately-designated standing committee of the Board and information regarding the status of one or more members of the Audit Committee as an "audit committee financial expert" will be located in the Proxy Statement in the section entitled "Corporate Governance – Committees of the Board," which information is incorporated herein by reference.
 Information regarding our Code of Conduct applicable to our directors, officers and employees is located in Part I of this Annual Report on Form 10-K, under the heading "Available Information."
 To the extent disclosure of any delinquent form under Section 16(a) of the Securities Exchange Act of 1934 is made by the Company, such disclosure will be set forth in our Proxy Statement under the caption "Delinquent Section 16(a) Reports" and is incorporated herein by reference.

 Item 11. EXECUTIVE COMPENSATION.
 Information regarding the compensation of each of our named executive officers, including our Chief Executive Officer that is required by this Item 11 will be located in the Proxy Statement in the section entitled "Compensation Discussion & Analysis" and is incorporated herein by reference. Information regarding the compensation of our directors will be located in the Proxy Statement in the section entitled "Non-Employee Director Compensation," which information is incorporated herein by reference.
 The information required by Item 407(e)(4) of SEC Regulation S-K will be located in the Proxy Statement in the section entitled "Compensation Committee Interlocks and Insider Participation," which information is incorporated herein by reference.
 The information required by Item 407(e)(5) of SEC Regulation S-K will be located in the Proxy Statement in the section entitled "Compensation Committee Report," which information is incorporated herein by reference.

 Item 12. SECURITY OWNERSHIP OF CERTAIN BENEFICIAL OWNERS AND MANAGEMENT AND RELATED STOCKHOLDER MATTERS.
 Information concerning ownership of our voting securities by certain beneficial owners, individual nominees for director, the named executive officers, including persons serving as our Chief Executive Officer and Chief Financial Officer, and directors and executive officers as a group, will be located in the Proxy Statement in the section entitled "Share Ownership of Directors, Management and Certain Beneficial Owners," which information is incorporated herein by reference.
 Information regarding all of the Company's equity compensation plans will be located in the Proxy Statement in the section entitled "Compensation Committee Report – Equity Compensation Plan Information," which information is incorporated herein by reference.

 The Hershey Company | 2023 Form 10-K | Page 101

 Item 13. CERTAIN RELATIONSHIPS AND RELATED TRANSACTIONS, AND DIRECTOR INDEPENDENCE.
 Information regarding transactions with related persons will be located in the Proxy Statement in the section entitled "Certain Transactions and Relationships," which information is incorporated herein by reference. Information regarding director independence will be located in the Proxy Statement in the section entitled "Corporate Governance – Director Independence," which information is incorporated herein by reference.

 Item 14. PRINCIPAL ACCOUNTANT FEES AND SERVICES.
 Information regarding "Principal Accounting Fees and Services," including the policy regarding pre-approval of audit and non-audit services performed by our Company's independent auditors, will be located in the Proxy Statement in the section entitled "Information about Our Independent Auditors," which information is incorporated herein by reference.

 The Hershey Company | 2023 Form 10-K | Page 102

 Item 15. EXHIBITS AND FINANCIAL STATEMENT SCHEDULES
 Item 15(a)(1): Financial Statements
 The audited consolidated financial statements of The Hershey Company and its subsidiaries and the Report of Independent Registered Public Accounting Firm thereon, as required to be filed, are located under Item 8 of this Annual Report on Form 10-K.
 Item 15(a)(2): Financial Statement Schedule
 Schedule II—Valuation and Qualifying Accounts for The Hershey Company and its subsidiaries for the years ended December 31, 2023, 2022 and 2021 is filed as part of this Annual Report on Form 10-K as required by Item 15(c).
 We omitted other schedules because they are not applicable or the required information is set forth in the consolidated financial statements or notes thereto.
 Item 15(a)(3): Exhibits
 The following exhibits are filed as part of, or incorporated by reference into, this Annual Report on Form 10-K.

 EXHIBIT INDEX

 Exhibit Number
 Description

 3.1

 The Company's Restated Certificate of Incorporation, as amended, is incorporated by reference from Exhibit 3 to the Company's Quarterly Report on Form 10-Q for the quarter ended April 3, 2005.

 3.2

 The Company's By-laws, as amended and restated as of February 21, 2017, are incorporated by reference from Exhibit 3.2 to the Company's Annual Report on Form 10-K for the fiscal year ended December 31, 2018.

 4.1
 The Company has issued certain long-term debt instruments, no one class of which creates indebtedness exceeding 10% of the total assets of the Company and its subsidiaries on a consolidated basis. These classes consist of the following:

 1) 2.050% Notes due 2024

 2) 0.900% Notes due 2025

 3) 3.200% Notes due 2025

 4) 2.300% Notes due 2026

 5) 7.200% Debentures due 2027

 6) 4.250% Notes due 2028

 7) 2.450% Notes due 2029

 8) 1.700% Notes due 2030

 9) 4.500% Notes due 2033

 10) 3.375% Notes due 2046

 11) 3.125% Notes due 2049

 12) 2.650% Notes due 2050

 13) Other Obligations

 The Company undertakes to furnish copies of the agreements governing these debt instruments to the Securities and Exchange Commission upon its request.

 4.2

 The Company's Description of Common Stock and Class B Common Stock registered under Section 12 of the Exchange Act. *

 10.1(a)
 Kit Kat and Rolo License Agreement (the "License Agreement") between the Company and Rowntree Mackintosh Confectionery Limited is incorporated by reference from Exhibit 10(a) to the Company's Annual Report on Form 10-K for the fiscal year ended December 31, 1980.#

 The Hershey Company | 2023 Form 10-K | Page 103

 10.1(b)
 Amendment to the License Agreement is incorporated by reference from Exhibit 19 to the Company's Quarterly Report on Form 10-Q for the quarter ended July 3, 1988.#

 10.1(c)
 Assignment of the License Agreement by Rowntree Mackintosh Confectionery Limited to Soci t des Produits Nestl SA as of January 1, 1990 is incorporated by reference from Exhibit 19 to the Company's Annual Report on Form 10-K for the fiscal year ended December 31, 1990.#

 10.2
 Peter Paul/York Domestic Trademark & Technology License Agreement between the Company and Cadbury Schweppes Inc. (now Kraft Foods Ireland Intellectual Property Limited) dated August 25, 1988, is incorporated by reference from Exhibit 2(a) to the Company's Current Report on Form 8-K dated September 8, 1988.#

 10.3
 Cadbury Trademark & Technology License Agreement between the Company and Cadbury Limited (now Cadbury UK Limited) dated August 25, 1988, is incorporated by reference from Exhibit 2(a) to the Company's Current Report on Form 8-K dated September 8, 1988.#

 10.4(a)

 Trademark and Technology License Agreement between Huhtam ki (now Iconic IP Interests, LLC) and the Company dated December 30, 1996, is incorporated by reference from Exhibit 10 to the Company's Current Report on Form 8-K filed February 26, 1997.

 10.4(b)

 Amended and Restated Trademark and Technology License Agreement between Huhtam ki (now Iconic IP Interests, LLC) and the Company is incorporated by reference from Exhibit 10.2 to the Company's Annual Report on Form 10-K for the fiscal year ended December 31, 1999.

 10.5

 Five Year Credit Agreement dated as of April 26, 2023, among the Company and the banks, financial institutions and other institutional lenders listed on the respective signature pages thereof ("Lenders"), Bank of America, N.A., as administrative agent for the Lenders, JPMorgan Chase Bank, N.A. and Citibank, N.A., as syndication agents, Royal Bank of Canada, as documentation agent, and BofA Securities, Inc., JPMorgan Chase Bank, N.A., Citibank, N.A., RBC Capital Markets, and U.S. Bank National Association, as joint lead arrangers and joint book managers, is incorporated by reference from Exhibit 10.1 to the Company's Current Report on Form 8-K filed April 26, 2023.

 10.6

 Stock Purchase Agreement, dated February 13, 2023, between Milton Hershey School Trust, by its trustee, Hershey Trust Company, and The Hershey Company, is incorporated by reference from Exhibit 10.1 to the Company's Current Report on Form 8-K filed February 15, 2023.

 10.7

 Stock Purchase Agreement, dated February 14, 2022, between Milton Hershey School Trust, by its trustee, Hershey Trust Company, and The Hershey Company, is incorporated by reference from Exhibit 10.1 to the Company's Current Report on Form 8-K filed February 16, 2022.

 10.8

 Amended and Restated Master Supply Agreement between the Company and Barry Callebaut, AG, dated August 31, 2021, is incorporated by reference from Exhibit 10.7 to the Company's Annual Report on Form 10-K for the year ended December 31, 2022.

 10.9

 The Company's Equity and Incentive Compensation Plan, amended and restated February 22, 2011, and approved by our stockholders on April 28, 2011, is incorporated by reference from Appendix B to the Company's proxy statement filed March 15, 2011. +

 10.10(a)

 Form of Notice of Award of Restricted Stock Units (February 26, 2019 - February 22, 2021 version) is incorporated by reference from Exhibit 10.1 to the Company's Quarterly Report on Form 10-Q for the quarter ended March 31, 2019. +

 10.10(b)

 Form of Notice of Award of Restricted Stock Units (effective February 23, 2021) is incorporated by reference from Exhibit 10.1 to the Company's Quarterly Report on Form 10-Q for the quarter ended April 4, 2021. +

 10.10(c)

 Form of Notice of Award of Restricted Stock Units (3-year vest, effective February 23, 2021) is incorporated by reference from Exhibit 10.2 to the Company's Quarterly Report on Form 10-Q for the quarter ended April 4, 2021. +

 10.11(a)

 Form of Notice of Special Award of Restricted Stock Units (pro-rata vest, February 26, 2019 - February 22, 2021 version) is incorporated by reference from Exhibit 10.2 to the Company's Quarterly Report on Form 10-Q for the quarter ended March 31, 2019. +

 10.11(b)

 Form of Notice of Special Award of Restricted Stock Units (pro-rata vest, effective February 23, 2021) is incorporated by reference from Exhibit 10.3 to the Company's Quarterly Report on Form 10-Q for the quarter ended April 4, 2021. +

 10.11(c)

 Form of Notice of Special Award of Restricted Stock Units (3-year cliff vest, February 22, 2017 - February 25, 2019 version) is incorporated by reference from Exhibit 10.2(b) to the Company's Quarterly Report on Form 10-Q for the quarter ended April 2, 2017. +

 10.11(d)

 Form of Notice of Special Award of Restricted Stock Units (3-year cliff vest, effective February 26, 2019) is incorporated by reference from Exhibit 10.3 to the Company's Quarterly Report on Form 10-Q for the quarter ended March 31, 2019. +

 10.12(a)

 Terms and Conditions of Nonqualified Stock Option Awards under the Equity and Incentive Compensation Plan (February 15, 2016 - February 21, 2017 version) is incorporated by reference from Exhibit 10.12(b) to the Company's Annual Report on Form 10-K for the fiscal year ended December 31, 2016. +

 The Hershey Company | 2023 Form 10-K | Page 104

 10.12(b)

 Terms and Conditions of Nonqualified Stock Option Awards under the Equity and Incentive Compensation Plan (February 22, 2017 - February 25, 2019 version) is incorporated by reference from Exhibit 10.3 to the Company's Quarterly Report on Form 10-Q for the quarter ended April 2, 2017. +

 10.12(c)

 Terms and Conditions of Nonqualified Stock Option Awards under the Equity and Incentive Compensation Plan (February 26, 2019 - February 22, 2021 version) is incorporated by reference from Exhibit 10.4 to the Company's Quarterly Report on Form 10-Q for the quarter ended March 31, 2019. +

 10.12(d)

 Terms and Conditions of Nonqualified Stock Option Awards under the Equity and Incentive Compensation Plan (effective February 23, 2021) is incorporated by reference from Exhibit 10.4 to the Company's Quarterly Report on Form 10-Q for the quarter ended April 4, 2021. +

 10.13(a)

 Form of Notice of Award of Performance Stock Units (February 26, 2019 - February 22, 2021 version) is incorporated by reference from Exhibit 10.5 to the Company's Quarterly Report on Form 10-Q for the quarter ended March 31, 2019. +

 10.13(b)

 Form of Notice of Award of Performance Stock Units (effective February 23, 2021) is incorporated by reference from Exhibit 10.5 to the Company's Quarterly Report on Form 10-Q for the quarter ended April 4, 2021. +

 10.14(a)

 Form of Notice of Special Award of Performance Stock Units (February 22, 2017 - February 22, 2021 version) is incorporated by reference from Exhibit 10.1 to the Company's Current Report on Form 8-K filed May 5, 2017. +

 10.14(b)

 Form of Notice of Special Award of Performance Stock Units (effective February 23, 2021) is incorporated by reference from Exhibit 10.6 to the Company's Quarterly Report on Form 10-Q for the quarter ended April 4, 2021. +

 10.15

 The Long-Term Incentive Program Participation Agreement is incorporated by reference from Exhibit 10.2 to the Company's Current Report on Form 8-K filed February 18, 2005. +

 10.16

 The Company's Deferred Compensation Plan, Amended and Restated as of June 27, 2012, is incorporated by reference from Exhibit 10.3 to the Company's Quarterly Report on Form 10-Q for the quarter ended July 1, 2012. +

 10.17(a)

 The Company's Supplemental Executive Retirement Plan, Amended and Restated as of October 2, 2007, is incorporated by reference from Exhibit 10.6 to the Company's Annual Report on Form 10-K for the fiscal year ended December 31, 2007. +

 10.17(b)

 First Amendment to the Company's Supplemental Executive Retirement Plan, Amended and Restated as of October 2, 2007, is incorporated by reference from Exhibit 10.5 to the Company's Annual Report on Form 10-K for the fiscal year ended December 31, 2008. +

 10.18(a)

 The Company's Compensation Limit Replacement Plan, Amended and Restated as of January 1, 2009, is incorporated by reference from Exhibit 10.6 to the Company's Annual Report on Form 10-K for the fiscal year ended December 31, 2008. +

 10.18(b)

 First Amendment to the Company's Compensation Limit Replacement Plan, Amended and Restated as of December 31, 2023. *

 10.19

 The Company's Executive Benefits Protection Plan (Group 3A), Amended and Restated as of June 27, 2012, is incorporated by reference from Exhibit 10.2 to the Company's Quarterly Report on Form 10-Q for the quarter ended July 1, 2012. +

 10.20

 The Company' s Executive Benefits Protection Plan (Group 3), Amended and Restated as of June 27, 2012, is incorporated by reference from Exhibit 10.18 to the Company's Annual Report on Form 10-K for the fiscal year ended December 31, 2015. +

 10.21(a)

 Employee Confidentiality and Restrictive Covenant Agreement, amended as of February 18, 2013, is incorporated by reference from Exhibit 10.1 to the Company's Quarterly Report on Form 10-Q for the quarter ended March 31, 2013. +

 10.21(b)

 Employee Confidentiality and Restrictive Covenant Agreement, amended as of October 10, 2016, is incorporated by reference from Exhibit 10.21(b) to the Company's Annual Report on Form 10-K for the fiscal year ended December 31, 2016. +

 10.21(c)

 Employee Confidentiality and Restrictive Covenant Agreement, amended as of September 8, 2021, is incorporated by reference from Exhibit 10.1 to the Company's Quarterly Report on Form 10-Q for the quarter ended October 4, 2021. +

 10.22

 Executive Employment Agreement, effective as of March 1, 2017, by and between the Company and Michele G. Buck is incorporated by reference from Exhibit 10.1 to the Company's Current Report on Form 8-K/A filed February 24, 2017. +

 10.23

 The Company's Directors' Compensation Plan, Amended and Restated as of December 2, 2008, is incorporated by reference from Exhibit 10.8 to the Company's Annual Report on Form 10-K for the fiscal year ended December 31, 2008. +

 The Hershey Company Insider Trading Policy, Amended and Restated as of February 27, 2023. *

 21.1

 Subsidiaries of the Registrant. *

 23.1

 Consent of Ernst & Young LLP. *

 The Hershey Company | 2023 Form 10-K | Page 105

 31.1

 Certification of Michele G. Buck, Chief Executive Officer, pursuant to Section 302 of the Sarbanes-Oxley Act of 2002. *

 31.2

 Certification of Steven E. Voskuil, Chief Financial Officer, pursuant to Section 302 of the Sarbanes-Oxley Act of 2002. *

 32.1

 Certification of Michele G. Buck, Chief Executive Officer, and Steven E. Voskuil, Chief Financial Officer, pursuant to Section 906 of the Sarbanes-Oxley Act of 2002. **

 The Hershey Company Compensation Recovery Policy, effective October 2, 2023. *

 101.INS

 101.SCH

 101.CAL

 101.LAB

 101.PRE

 101.DEF

 *
 Filed herewith

 **
 Furnished herewith

 +
 Management contract, compensatory plan or arrangement

 Portions of this exhibit have been omitted pursuant to Item 601(b)(10)(iv) of Regulation S-K

 #
 Pursuant to Instruction 1 to Regulation S-T Rule 105(d), no hyperlink is required for any exhibit incorporated by reference that has not been filed with the SEC in electronic format

 Item 16. FORM 10-K SUMMARY
 None.

 The Hershey Company | 2023 Form 10-K | Page 106

 SIGNATURES
 Pursuant to the requirements of Section 13 or 15(d) of the Securities Exchange Act of 1934, the Company has duly caused this report to be signed on its behalf by the undersigned, thereunto duly authorized, this 20th day of February, 2024.

 (Registrant)

 By:
 /s/ STEVEN E. VOSKUIL

 Steven E. Voskuil

 Senior Vice President, Chief Financial Officer

 Pursuant to the requirements of the Securities Exchange Act of 1934, this report has been signed below by the following persons on behalf of the Company and in the capacities and on the date indicated.

 Signature

 Title

 Date

 /s/ MICHELE G. BUCK
 Chairman of the Board, President and Chief Executive Officer

 Michele G. Buck
 (Principal Executive Officer)

 /s/ STEVEN E. VOSKUIL
 Senior Vice President, Chief Financial Officer

 Steven E. Voskuil
 (Principal Financial Officer)

 /s/ JENNIFER L. MCCALMAN
 Vice President, Chief Accounting Officer

 Jennifer L. McCalman
 (Principal Accounting Officer)

 /s/ ANTHONY J. PALMER
 Lead Independent Director

 Anthony J. Palmer

 /s/ PAMELA M. ARWAY

 Pamela M. Arway

 /s/ VICTOR L. CRAWFORD

 Victor L. Crawford

 /s/ ROBERT M. DUTKOWSKY

 Robert M. Dutkowsky

 /s/ MARY KAY HABEN

 Mary Kay Haben

 /s/ JAMES C. KATZMAN

 James C. Katzman

 /s/ M. DIANE KOKEN

 M. Diane Koken

 /s/ HUONG MARIA T. KRAUS

 Huong Maria T. Kraus

 /s/ ROBERT M. MALCOLM

 Robert M. Malcolm

 /s/ JUAN R. PEREZ

 Juan R. Perez

 The Hershey Company | 2023 Form 10-K | Page 107

 THE HERSHEY COMPANY AND SUBSIDIARIES
 SCHEDULE II—VALUATION AND QUALIFYING ACCOUNTS
 For the Years Ended December 31, 2023, 2022 and 2021

 Additions

 Description
 Balance at Beginning of Period
 Charged to Costs and Expenses

 Charged to Other Accounts

 Deductions from Reserves
 Balance at End of Period

 In thousands of dollars

 For the year ended December 31, 2023

 Allowances deducted from assets

 Accounts receivable—trade, net (a)
 $
 26,001
 $
 248,022
 $
 —
 $
 ( 242,360)
 $
 31,663

 Valuation allowance on net deferred taxes (b)
 137,531
 6,927
 —
 ( 30,309)
 114,149

 Inventory obsolescence reserve (c)
 29,354
 73,687
 —
 ( 61,202)
 41,839

 Total allowances deducted from assets
 $
 192,886
 $
 328,636
 $
 —
 $
 ( 333,871)
 $
 187,651

 For the year ended December 31, 2022

 Allowances deducted from assets

 Accounts receivable—trade, net (a)
 $
 28,837
 $
 228,463
 $
 —
 $
 ( 231,299)
 $
 26,001

 Valuation allowance on net deferred taxes (b)
 184,896
 9,578
 —
 ( 56,943)
 137,531

 Inventory obsolescence reserve (c)
 19,472
 44,497
 —
 ( 34,615)
 29,354

 Total allowances deducted from assets
 $
 233,205
 $
 282,538
 $
 —
 $
 ( 322,857)
 $
 192,886

 For the year ended December 31, 2021

 Allowances deducted from assets

 Accounts receivable—trade, net (a)
 $
 24,975
 $
 198,608
 $
 —
 $
 ( 194,746)
 $
 28,837

 Valuation allowance on net deferred taxes (b)
 193,310
 9,759
 —
 ( 18,173)
 184,896

 Inventory obsolescence reserve (c)
 17,703
 27,657
 —
 ( 25,888)
 19,472

 Total allowances deducted from assets
 $
 235,988
 $
 236,024
 $
 —
 $
 ( 238,807)
 $
 233,205

 (a) Includes allowances for doubtful accounts, anticipated discounts and write-offs of uncollectible accounts receivable.
 (b) Includes adjustments to the valuation allowance for deferred tax assets that we do not expect to realize, as well as the release of valuation allowances.
 (c) Includes adjustments to the inventory reserve, transfers, disposals and write-offs of obsolete inventory.

 The Hershey Company | 2023 Form 10-K | Page 108