func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n, s, h;   string s2, s1;   long long gw(long long n, long long x) {     long long rs = 0;     for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));          i += 1 - 2 * ((0) > (n))) {       for (__typeof(n) j = (0) - ((0) > (n)); j != (n) - ((0) > (n));            j += 1 - 2 * ((0) > (n))) {         if ((i + j) % 2 == x) {           rs++;         }       }     }     return rs;   }   int main() {     ios_base::sync_with_stdio(false);     cout.precision(30);     cout.tie(0);     cin.tie(0);     cin >> n;     for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));          i += 1 - 2 * ((0) > (n))) {       cin >> s1 >> s2;       if (s2 ==  hard )         h++;       else         s++;     }     for (__typeof(1001) i = (1) - ((1) > (1001)); i != (1001) - ((1) > (1001));          i += 1 - 2 * ((1) > (1001))) {       long long w = gw(i, 0), b = gw(i, 1);       if (h <= b && s <= w || h <= w && s <= b) {         cout << i << endl;         return 0;       }     }     return 0;   }   