#P1424. 小鱼的航程(改进版)

小鱼的航程(改进版)

Description

There is a little fish that swims 250250 kilometers every weekday and rests on weekends (two-day weekend). Starting from day xx of the week, after nn days, how many kilometers has the little fish swum in total?

Input Format

Two positive integers x,nx, n, meaning starting from day xx of the week and continuing for nn days.

Output Format

Output a single integer, the total number of kilometers the little fish has swum.

3 10
2000

Hint

The testdata guarantees 1x71\le x \le 7, 1n1061 \le n\le 10^6.

Translated by ChatGPT 5