#K16086. Total Fruits Calculation
Total Fruits Calculation
Total Fruits Calculation
You are given the number of crates containing apples and bananas, as well as the number of fruits per crate. Your task is to calculate the total number of fruits available. Formally, given four integers (N), (M), (A), and (B), you need to compute the sum [ Total = N \times A + M \times B ] where (N) is the number of crates of apples, (M) is the number of crates of bananas, (A) is the number of apples per crate, and (B) is the number of bananas per crate.
inputFormat
The input consists of a single line with four space-separated integers: (N), (M), (A), and (B).
outputFormat
Output a single integer representing the total number of fruits.## sample
2 3 10 15
65