c# clear
Code\n\npublic class Solution \n{\n    public int FurthestDistanceFromOrigin(string moves)\n    {\n        var data = moves.ToCharArray();\n        var lenght =
# Code\n```\npublic class Solution \n{\n    public int FurthestDistanceFromOrigin(string moves)\n    {\n        var data = moves.ToCharArray();\n        var lenght = data.Length;\n        var sum = 0;\n        var free = 0;\n        for (var i = 0; i < lenght; ++i)\n        {\n            var character = data[i];\n            if (character == \'L\')\n            {\n                ++sum;\n            }\n            else if (character == \'R\')\n            {\n                --sum;\n            }\n            else\n            {\n                ++free;\n            }\n        }\n\n        return Math.Abs(sum) + free;\n    }\n}\n```
['C#']