#include using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i> N; set> st; vector> per = {{0, 1, 2}, {0, 2, 1}, {1, 0, 2}, {1, 2, 0}, {2, 0, 1}, {2, 1, 0}}; for(int x = 0; x <= N; ++x){ for(int y = 0; x + y <= N; ++y){ int z = N - x - y; if(z < 0) continue; array tmp = {x, y, z}; for(auto [i, j, k] : per){ st.insert({tmp[i], tmp[j], tmp[k]}); } } } cout << st.size() << endl; return 0; }