#K33512. Complete Weeks on Planet Zog

    ID: 25104 Type: Default 1000ms 256MiB

Complete Weeks on Planet Zog

Complete Weeks on Planet Zog

On Planet Zog, a year consists of y months with m days per month. The week starts on day s, where 0 corresponds to Monday, 1 to Tuesday, and so on up to 6 for Sunday. Your task is to compute the number of complete weeks in that year. A complete week is defined as exactly 7 consecutive days. Note that while the start day is provided, the total count of complete weeks depends solely on the total number of days in the year.

The total number of days is given by the product y * m, and the number of complete weeks is obtained by performing an integer division of this product by 7.

inputFormat

The input consists of three space-separated integers:

  1. y: the number of months in a year.
  2. m: the number of days in each month.
  3. s: the start day of the week (0 for Monday, 1 for Tuesday, …, 6 for Sunday).

You should read these values from the standard input (stdin).

outputFormat

Output a single integer representing the number of complete weeks contained in the given year. Write the answer to the standard output (stdout).

## sample
12 30 0
51