#include <bits/stdc++.h>
using namespace std;
int main() {
  string x, p, o;
  int y = 0, c = 0;
  cin >> x;
  for (int i = 0; i < x.length(); i++) {
    if (x[i] < 97) {
      y++;
    } else {
      c++;
    }
  }
  for (int i = 0; i < x.length(); i++) {
    if (y == c || y < c) {
      if (x[i] < 97) {
        x[i] = x[i] + 32;
      }
      cout << x[i];
    } else {
      if (x[i] > 97 || x[i] == 97) {
        x[i] = x[i] - 32;
      }
      cout << x[i];
    }
  }
}
