HZ has a special calculator, in which all the integers are 11-bit signed integers. The range of an 11-bit signed integer is from $-2^{10}$ to $2^{10}-1$ (from $-1024$ to $1023$). When using this calculator to calculate the sum of two integers $A$ and $B$, the result may be different from other calculators. Here are some examples:
$$
\begin{align*}
1 + 1 & = 2\\
1023 + 1 & = -1024\\
1023 + 2 & = -1023\\
-1024 + (-1) & = 1023\\
-1024 + (-2) & = 1022
\end{align*}
$$
HZ found this special calculator very strange, so he comes to you. You are given two integers $A$ and $B$, and you need to guess the result of $A+B$ of this calculator.