(import (java.time LocalTime ))
(import (java.time.temporal ChronoUnit))
(import (java.time.format DateTimeFormatter))

(def hhmm (DateTimeFormatter/ofPattern "HH:mm"))
(let [h1 (read)
      m1 (read)
      h2 (read)
      m2 (read)
      t1 (LocalTime/parse (format "%02d:%02d" h1 m1) hhmm)
      t2 (LocalTime/parse (format "%02d:%02d" h2 m2) hhmm)
      k (read)
      period (.between ChronoUnit/MINUTES t1 t2)
      ]
  (println (- period k)))
