I have some data that describes workers login and logout times.

I'm calculating sum of minutes per workshift (which is 8 hours) when workers are logged in.

For example shift starts at 08:00AM and ends 02:00PM. Time is now 11:30 and login logout data i have so far is:

$\displaystyle

\begin{bmatrix}

\mathbf{m} & \mathbf{n}\\

---- & ----\\

0815 & 1010\\

0830 & 1005\\

0845 & 1115

\end{bmatrix}

$

Where m is login time and n is logout time.

Ok, sum of this is sum of differences of each logout-login time and we get:

115+95+150 = 360 minutes.

How to represent this summation with summation notation?

Notation should be working in general since we don't have any matrix data exists for example future login logout times.