#include #include #include #include #include #include #include #include using namespace std; int main() { int n, cnt = 0; cin >> n; for (int i = 0; i <= n; i++){ for (int j = i; j <= n; j++){ for (int k = j; k <= n; k++){ if (i+j+k == n){ if (i == j && i == k) cnt++; else if (i == j || j == k) cnt += 3; else cnt += 6; } } } } cout << cnt << endl; }