title: How to simplify modulo
body: <p>I am trying to find the modulo of an expression. All I know is that</p>
  
  <pre><code>(a+b) mod N = ((a mod N) + (b mod N)) mod N
  </code></pre>
  
  <p>How do I use it to simplify the following modulo operation?</p>
  
  <pre><code>(a - 2*b + 1) mod N
  </code></pre>
  
  <p>There must be some way to simplify it by considering it as</p>
  
  <pre><code>(a - b - b + 1) mod N ?
  </code></pre>
  
  <p><b> EDIT: </b></p>
  
  <p>I have stumbled upon the following property too:</p>
  
  <pre><code>ab mod N = ((a mod N) (b mod N)) mod N
  </code></pre>
  
  <p>Will this be helpful somehow?</p>