#include<cassert>
#include<iostream>
#include<unordered_map>
#include<string>
#include<vector>

using namespace std;
constexpr int NSTR = 100 * 1000, NCHARS = 1000 * 1000;

// numbelow: number of paths that go down this node.
int n, nnodes = 1, depth[NCHARS], numbelow[NCHARS] = {};
unordered_map<string, int> children[NCHARS];

void dfs(int u) {
	for (const auto &[str, v] : children[u]) {
		depth[v] = depth[u] + 1;
		dfs(v);

		// Number of nodes here, and below.
		numbelow[u] += numbelow[v];
	}
}

int dfs2(int u, int curcost) {
	int result = curcost;
	for (const auto &[str, v] : children[u]) {
		int altcurcost = curcost + (n - numbelow[v]) - numbelow[v];
		if (altcurcost < curcost && !children[v].empty()) result = min(result, dfs2(v, altcurcost));
	}
	return result;
}

int main() {
	cin >> n;
	for (int i = 0; i < n; i++) {
		string line;
		cin >> line;
		int j, k, curnode = 0;
		for (j = k = 1; j < (int) line.size(); j = k + 1, ++k) {
			while (k < (int) line.size() && line[k] != '/') ++k;
			string subpart = line.substr(j, k - j);
			if (children[curnode].find(subpart) == children[curnode].end())
				children[curnode][subpart] = nnodes++;
			curnode = children[curnode][subpart];
		}
		numbelow[curnode]++;
	}

	depth[0] = 0;
	dfs(0);

	int default_cost = 0;
	for (int i = 0; i < nnodes; i++)
		if (children[i].empty()) default_cost += numbelow[i] * depth[i];

	cout << dfs2(0, default_cost) << endl;
	return 0;
}
