Part of [**Advent of Code Golf 2021**](https://codegolf.meta.stackexchange.com/q/24068/78410) event. See the linked meta post for details.

The story continues from [AoC2015 Day 3](https://adventofcode.com/2015/day/3), Part 2. This challenge was kindly contributed by Wheat Wizard (Grain Ghost).

---

Santa is delivering presents to an infinite two-dimensional grid of houses each 1 unit apart. The delivery begins delivering a present to the house at an arbitrary starting location, and then moving along a predetermined path delivering a new present at every step of the path. The path is a list of moves made of characters:

* `^` north
* `v` south
* `>` east
* `<` west

At each step Santa reads the instruction and starts heading in that direction until a house which hasn't had a present delivered yet is reached. At that point a present is delivered to that house and the next instruction starts.

Task
----

Given a non-empty string representing directions, output the total length of the path that Santa will take.

This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so answers will be scored in bytes.

Test cases
----------

```
v^v^v^v^: 36
^>v<^>v : 10 
>>>>>><<<<<<< : 19
>>>vvv<<< : 9

```