public int calc(String str) {
		int total = 0;
		for (char c : str.toCharArray()) {
			if (c == 'c') {
				total++;
			}
		}
		int result = 0;
		int cCount = 0;
		for (int i = 0; i < str.length() - 1; i++) {
			if (str.charAt(i) == 'c') {
				cCount++;
			}
			if (total == cCount * 2) {
				result++;
			}
		}
		return result;

	}