ull dp[1000][1000]; ull helper(unsignedint n, unsignedint ma){ if(n == 0) return1; ull& res = dp[n][ma]; if(res) return res - 1; res = 1; for(unsignedint i = 1; i <= ma and i <= n; i++) { res += helper(n-i,i); } return res - 1; } ull exp_sum(unsignedint n){ returnhelper(n,n); }