read S sqlite3 /dev/null "SELECT $S * ($S+1) / 2;"