title: Average of 3 numbers using integers
body: <p>I would like to compute the average of three numbers, like:</p>
  
  <pre><code>d = int(round((a + b + c) / 3.0))
  </code></pre>
  
  <p>Where <code>a</code>, <code>b</code>, <code>c</code>, <code>d</code> are integers.</p>
  
  <p>Is it possible to get the same result using just integers?</p>
  
  <p>I'm interested in this because of performance reasons, I assume doing the math using integers should be faster than using floats.</p>
  
  <p>The example above converts the integers to floats, calculates the result, rounds it and converts back to integer. Is it possible to avoid the int &lt;-> float conversions?</p>