#include <bits/stdc++.h>
using namespace std;
int main() {
  int lower = 0, upper = 0;
  string s;
  cin >> s;
  for (int i = 0; s[i]; i++) {
    if (s[i] <= 'Z') {
      upper++;
    } else {
      upper--;
    }
  }
  for (int i = 0; s[i]; i++) {
    s[i] = (upper > 0)     ? !(s[i] <= 'Z') ? s[i] - 32 : s[i] = s[i]
               : (s[i] <= 'Z') ? s[i] + 32
                           : s[i] = s[i];
  }
  cout << s << endl;
}
