n = input("Enter n: ");

result = 0;
j = 1;
for i = 1:n
    result = result + j;
    j = j + 2;
end

disp("Sum: " + result);