User:Kundor/scratchpad

using namespace std;
 * 1) include
 * 2) include
 * 3) include
 * 4) include

int main {	string line; int lineTotal; cin >> lineTotal; int min = 0; int spcsTotal = 0; int answer = 0;

while(i<=lineTotal) {		getline ( cin, line ); int spcs = count(line.begin, line.end, ' '); if( spcs < min) {			min = spcs; }		spcsTotal += spcs; i++; }

answer = spcsTotal - (min * lineTotal);

cout << answer << endl;

return 0;

}