public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		String line = "";
		while ((line = in.readLine()) != null && line.length() != 0) {
			tree = new Node();
			int n = Integer.parseInt(line);
			for (int i = 0; i < n; i++) {
				String word = in.readLine().trim();
				insert(word, tree);
			}
			ans = 0;
			dfs(tree, false, 0, 0);
			out.append(String.format(Locale.US, "%.2f\n", ans / n));
		}
		System.out.print(out);
	}