#B3847. Calculate Seconds From Midnight

    ID: 11504 Type: Default 1000ms 256MiB

Calculate Seconds From Midnight

Calculate Seconds From Midnight

Little Ming just learned the conversion between hours, minutes, and seconds. He is curious about the position of a given time in seconds within a day.

Your task is to determine the corresponding second of the day for a given time. The conversion details are as follows:

  • 1 hour = 3600 seconds
  • 1 minute = 60 seconds

The answer must be computed using the formula below:

\( seconds = hours \times 3600 + minutes \times 60 + seconds \)

inputFormat

The input consists of three integers separated by spaces representing the hours, minutes, and seconds respectively.

outputFormat

Output the total number of seconds from midnight (00:00:00) to the given time.

sample

0 0 0
0