What you are looking for is the GetParent() method in the Directory class
string path = @"C:\Documents\MasterDocumentFolder\";
DirectoryInfo parentDir = Directory.GetParent(path);
// or possibly
DirectoryInfo parentDir = Directory.GetParent(path.EndsWith("\\") ? path : string.Concat(path, "\\"));
// The result is available here
var myParentDir = parentDir.Parent.FullName