Counting Solutions of an Integer Equation

Given, n, count the number of solutions to the equation x + 2y + 2z = n, where x, y, z, n are non negative integers. Input There is at most 1500 inputs. Each input is n (n < 1000001) on a single line. Output For each input, output the number of solutions on a single line. Sample Input 2 3 Sample Output 3 3