#JSUTFPC2025F. Solving Equations I —— 解方程 I

Solving Equations I —— 解方程 I

Statement

Given an equation of the form y=kx+by=kx+b or y=kxby=kx-b, provide y,k,by, k, b and attempt to solve for xx.

Ensure that the values of y,k,by, k, b appearing are all positive integers, and guarantee that the solution xx is also an integer.

Input

A string in the format y=kx+b or y=kx-b, where the corresponding mathematical formulas y=kx+by=kx+b or y=kxby=kx-b satisfy 1y,k,b1×1091 \leqslant y,k,b \leqslant 1 \times 10^9

Output

Output an integer xx, representing the solution to the equation, ensuring that the result xx is always an integer.

Samples

3=1x+0
3
5=6x+5
0
87=15x-3
6