title: Help in a simple homework exercise
body: <p>I need to create a method, in the following signature:</p>
  
  <pre><code>int x (int y);
  </code></pre>
  
  <p>That's the example of values that this it should return:</p>
  
  <pre><code>x(3) = 1
  x(4) = 1
  x(5) = 2
  x(6) = 2
  x(7) = 3
  x(8) = 3
  x(9) = 4
  x(10) = 4
  ...
  </code></pre>
  
  <p>Any ideas how could I do it?</p>
  
  <p>Thank you.</p>
  
  <p><strong>EDIT:</strong> That's what I've got so far:</p>
  
  <pre><code>    static int x(int y)
      {
          return (y / 2) - 1;
      }
  </code></pre>
  
  <p>but the problem is that:</p>
  
  <pre><code>x(3) = 0
  x(4) = 1
  x(5) = 1
  x(6) = 2
  </code></pre>