ITEM 7.
Management’s Discussion and Analysis of Financial Condition and Results of Operations.
This Management’s Discussion and Analysis of Financial Condition and Results of Operations should be read in conjunction with our discussion of cautionary statements and significant risks to the company’s business under Item 1A.
Risk Factors of the 2018 Form?10-K.  OVERVIEW Our sales and revenues for 2018 were $54.722 billion, a 20?percent increase from 2017 sales and revenues of $45.462?billion.
The increase was primarily due to higher sales volume, mostly due to improved demand across all regions and across the three primary segments.
Profit per share for 2018 was $10.26, compared to profit per share of $1.26 in 2017.
Profit was $6.147 billion in 2018, compared with $754 million in 2017.
The increase was primarily due to lower tax expense, higher sales volume, decreased restructuring costs and improved price realization.
The increase was partially offset by higher manufacturing costs and selling, general and administrative (SG&A) and research and development (R&D) expenses and lower profit from the Financial Products Segment.
Fourth-quarter 2018 sales and revenues were $14.342 billion, up $1.446 billion, or 11 percent, from $12.896 billion in the fourth quarter of 2017.
Fourth-quarter 2018 profit was $1.78 per share, compared with a loss of $2.18 per share in the fourth quarter of 2017.
Fourth-quarter 2018 profit was $1.048 billion, compared with a loss of $1.299 billion in 2017.
Highlights for 2018 include: z Sales and revenues in 2018 were $54.722 billion, up 20?percent from 2017.
Sales improved in all regions and across the three primary segments.
z Operating profit as a percent of sales and revenues was 15.2?percent in 2018, compared with 9.8 percent in 2017.
Adjusted operating profit margin was 15.9 percent in 2018, compared with 12.5 percent in 2017.  z Profit was $10.26 per share for 2018, and excluding the items in the table below, adjusted profit per share was $11.22.
For 2017 profit was $1.26 per share, and excluding the items in the table below, adjusted profit per share was $6.88.  z In order for our results to be more meaningful to our readers, we have separately quantified the impact of several significant items:
||Full Year 2018|Full Year 2017|
|(Millions of dollars)|Profit Before Taxes|ProfitPer Share|Profit Before Taxes|ProfitPer Share|
|Profit|$7,822|$10.26|$4,082|$1.26|
|Restructuring costs|386|0.50|1,256|1.68|
|Mark-to-market losses|495|0.64|301|0.26|
|Deferred tax valuation allowance adjustments|—|-0.01|—|-0.18|
|U.S. tax reform impact|—|-0.17|—|3.95|
|Gain on sale of equity investment|—|—|-85|-0.09|
|Adjusted profit|$8,703|$11.22|$5,554|$6.88|

z Machinery, Energy & Transportation (ME&T) operating cash flow for 2018 was about $6.3 billion, more than sufficient to cover capital expenditures and dividends.
ME&T operating cash flow for 2017 was about $5.5 billion.
Restructuring Costs In recent years, we have incurred substantial restructuring costs to achieve a flexible and competitive cost structure.
During 2018, we incurred $386 million of restructuring costs related to restructuring actions across the company.
During 2017, we incurred $1.256 billion of restructuring costs with about half related to the closure of the facility in Gosselies, Belgium, and the remainder related to other restructuring actions across the company.
Although we expect restructuring to continue as part of ongoing business activities, restructuring costs should be lower in 2019 than 2018.
Notes: z Glossary of terms included on pages 33-34; first occurrence of terms shown in bold italics.
z Information on non-GAAP financial measures is included on pages 42-43.
Recognition of finance revenue and rental revenue is suspended and the account is placed on non-accrual status when management determines that collection of future income is not probable (generally after 120 days past due).
Recognition is resumed, and previously suspended income is recognized, when the account becomes current and collection of remaining amounts is considered probable.
See Note 7 for more information.
Revenues are presented net of sales and other related taxes.3.
Stock-Based Compensation Our stock-based compensation plans primarily provide for the granting of stock options, stock-settled stock appreciation rights (SARs), restricted stock units (RSUs) and performance-based restricted stock units (PRSUs) to Officers and other key employees, as well as non-employee Directors.
Stock options permit a holder to buy Caterpillar stock at the stock’s price when the option was granted.
SARs permit a holder the right to receive the value in shares of the appreciation in Caterpillar stock that occurred from the date the right was granted up to the date of exercise.
RSUs are agreements to issue shares of Caterpillar stock at the time of vesting.
PRSUs are similar to RSUs and include performance conditions in the vesting terms of the award.
Our long-standing practices and policies specify that all stockbased compensation awards are approved by the Compensation Committee (the Committee) of the Board of Directors.
The award approval process specifies the grant date, value and terms of the award.
The same terms and conditions are consistently applied to all employee grants, including Officers.
The Committee approves all individual Officer grants.
The number of stock-based compensation award units included in an individual’s award is determined based on the methodology approved by the Committee.
The exercise price methodology?approved by the Committee is the closing price of the Company stock on the date of the grant.
In June of 2014, shareholders approved the Caterpillar Inc.  2014 Long-Term Incentive Plan (the Plan) under which all new stock-based compensation awards are granted.
In June of 2017, the Plan was amended and restated.
The Plan initially provided that up to 38,800,000 Common Shares would be reserved for future issuance under the Plan, subject to adjustment in certain events.
Subsequent to the shareholder approval of the amendment and restatement of the Plan, an additional 36,000,000 Common Shares became available for all awards under the Plan.
Common stock issued from Treasury stock under the plans totaled 5,590,641 for 2018, 11,139,748 for 2017 and 4,164,134 for 2016.
The total number of shares authorized for equity awards under the amended and restated Caterpillar Inc.  2014 Long-Term Incentive Plan is 74,800,000, of which 44,139,162 shares remained available for issuance as of December?31,?2018.
Stock option and RSU awards generally vest according to a threeyear graded vesting schedule.
One-third of the award will become vested on the first anniversary of the grant date, one-third of the award will become vested on the second anniversary of the grant date and one-third of the award will become vested on the third anniversary of the grant date.
PRSU awards generally have a threeyear performance period and cliff vest at the end of the period based upon achievement of performance targets established at the time of grant.
Upon separation from service, if the participant is 55 years of age or older with more than five years of service, the participant meets the criteria for a “Long Service Separation.
” Award terms for awards granted in 2016 allow for immediate vesting upon separation of all outstanding options and RSUs with no requisite service period for employees who meet the criteria for a “Long Service Separation.
” Compensation expense for the 2016 grant was fully recognized immediately on the grant date for these employees.
Award terms for the 2018 and 2017 grants allow for continued vesting as of each vesting date specified in the award document for employees who meet the criteria for a “Long Service Separation” and fulfill a requisite service period of six months.
Compensation expense for eligible employees for the 2018 and 2017 grants was recognized over the period from the grant date to the end date of the six-month requisite service period.
For employees who become eligible for a “Long Service Separation” subsequent to the end date of the six-month requisite service period and prior to the completion of the vesting period, compensation expense is recognized over the period from the grant date to the date eligibility is achieved.
At grant, SARs and option awards have a term life of ten years.
For awards granted prior to 2016, if the “Long Service Separation” criteria are met, the vested options/SARs have a life that is the lesser of ten years from the original grant date or five years from the separation date.
For awards granted in 2018, 2017, and 2016, the vested options have a life equal to ten years from the original grant date.
Prior to 2017, all outstanding PRSU awards granted to employees eligible for a “Long Service Separation” may vest at the end of the performance period based upon achievement of the performance target.
Compensation expense for the 2016 PRSU grant was fully recognized immediately on the grant date for these employees.
For PRSU awards granted in 2018 and 2017, only a prorated number of shares may vest at the end of the performance period based upon achievement of the performance target, with the proration based upon the number of months of continuous employment during the three-year performance period.
Employees with a “Long Service Separation” must also fulfill a six-month requisite service period in order to be eligible for the prorated vesting of outstanding PRSU awards granted in 2018 and 2017.
Compensation expense for the 2018 and 2017 PRSU grants is being recognized on a straight-line basis over the three-year performance period for all participants.
Accounting guidance on share-based payments requires companies to estimate the fair value of options/SARs on the date of grant using an option-pricing model.
The fair value of our option/SAR grants was estimated using a lattice-based option-pricing model.
The latticebased option-pricing model considers a range of assumptions related to volatility, risk-free interest rate and historical employee behavior.
Expected volatility was based on historical Caterpillar stock price movement and current implied volatilities from traded options on Caterpillar stock.
The risk-free interest rate was based on U. S.  Treasury security yields at the time of grant.
The weighted-average dividend yield was based on historical information.
The expected life was determined from the lattice-based model.
The latticebased model incorporated exercise and post vesting forfeiture assumptions based on analysis of historical data.
The following table provides the assumptions used in determining the fair value of the Option/SAR awards for the years ended December?31, 2018, 2017 and 2016, respectively.
||Grant Year|
||2018|2017|2016|
|Weighted-average dividend yield|2.7%|3.4%|3.2%|
|Weighted-average volatility|30.2%|29.2%|31.1%|
|Range of volatilities|21.5-33.0%|22.1-33.0%|22.5-33.4%|
|Range of risk-free interest rates|2.02-2.87%|0.81-2.35%|0.62-1.73%|
|Weighted-average expected lives|8 years|8 years|8 years|


Question: What was the total amount of the adjusted profit in the years / sections where profit of profit before taxes is greater than 5000? (in million)

Solution:
def solution():
    # Define variables name and value
    profit_before_taxes_2018 = 7822
    profit_before_taxes_2017 = 0
    restructuring_costs_2018 = 386
    mark_to_market_losses_2018 = 495
    
    # Do math calculation to get the answer
    answer = (profit_before_taxes_2018 + restructuring_costs_2018) + (profit_before_taxes_2017 + mark_to_market_losses_2018)
    
    return answer

print(solution())

Answer: 8703