Given a directory path, find out the minimum number of directories are
needed to be traversed from the current location to the root location.
The path given can contain
Input Format: Single line with the entire path
Output Format: An integer denoting the minimum number of directories to be traversed to go back to the root
Example-1:
Input: /opt/tournaments/ipl/2020/matches
Output : 5
Example-2:
Input: /opt/tournaments/./ipl/../odi-wc-men/2019/matches/../venues
Output : 5
Explanation: The final path to be traversed is /opt/tournaments/odi-wc-men/2019/venues1