calculating seconds (finish at home)