P27084 [AtCoder] Next TTPC
普及
题目描述

Problem Description

You, a promising programmer, have become interested in the TTPC (Tech Talk Presentation Cup).

It seems that the first TTPC was held in year $ A $ and the second in year $ B $. No other information is available, but you assume it is likely held every $ (B - A) $ years.

Taking preparation time into account, you decided to participate in the first TTPC held after year $ T $ (including year $ T $ exactly).

In what year will the first TTPC after year $ T $ be held?

Input Format

The input is given from the standard input in the following format:

$ A $ $ B $ $ T $

Output Format

Output the year of the first TTPC held after year $ T $ in one line.

Sample Input and Output

Sample Input #1

2015 2019 2020

Sample Output #1

2023

Sample Input #2

2015 2019 2027

Sample Output #2

2027

Sample Input #3

1000 2999 3000

Sample Output #3

4998

Notes/Hints

Constraints

  • All inputs are integers.
  • $1{,}000 \leq A < B < T \leq 3{,}000$

Sample Explanation 1

  • The first TTPC after 2020 will be held in 2023.

Sample Explanation 2

  • Note that year 2027 is included in the range after 2027.
输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2015 2019 2020
样例输出
2023