题目描述
Problem Description
You are given three non-negative integers, $ x $, $ y $, $ z $. Your task is to find the smallest non-negative integer $ n $ that satisfies all of the following conditions:
- $n\ {\rm\ mod}\ 17\ =\ x$
- $n\ {\rm\ mod}\ 107\ =\ y$
- $n\ {\rm\ mod}\ 1000000007(=10^9+7)\ =\ z$
Input Format
The input is given from Standard Input in the following format:
$ x $ $ y $ $ z $
Output Format
Print the value of $ n $ in the statement.
Sample Input and Output
Sample Input #1
15 50 1
Sample Output #1
1000000008
Sample Input #2
0 0 0
Sample Output #2
0
Sample Input #3
3 14 159265358
Sample Output #3
1050159272708
Notes/Hints
Constraints
- $0\ \leq\ x\ <\ 17$
- $0\ \leq\ y\ <\ 107$
- $0\ \leq\ z\ <\ 10^9+7$
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
15 50 1
样例输出
1000000008