Good rest on vacation

Report a typo

Write a program that will help people who are going on vacation. The program should calculate the total required sum (e.g. $) of money to have a good rest for a given duration.

There are four parameters that have to be considered:

  • duration in days
  • total food cost per day
  • one-way flight cost
  • cost of one night in a hotel (the number of nights is equal to the duration of days minus one)

Read integer values of these parameters from the standard input and then print the result.

Do not forget to consider the flight back!

Sample Input 1:

7
30
100
40

Sample Output 1:

650
Write a program in Python 3
# put your python code here
___

Create a free account to access the full topic