Vasya is very upset that many people on the Net mix uppercase and lowercase letters in one word. That's why he decided to invent an extension for his favorite browser that would change the letters' register in every word so that it either only consisted of lowercase letters or, vice versa, only of uppercase ones. At that as little as possible letters should be changed in the word. For example, the word HoUse must be replaced with house, and the word ViP — with VIP. If a word contains an equal number of uppercase and lowercase letters, you should replace all the letters with lowercase ones. For example, maTRIx should be replaced by matrix. Your task is to use the given method on one given word.

The first line contains a word s — it consists of uppercase and lowercase Latin letters and possesses the length from 1 to 100.

Print the corrected word s. If the given word s has strictly more uppercase letters, make the word written in the uppercase register, otherwise - in the lowercase one.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace csTest1
{
    class Program
    {
        static int Main(string[] args)
        {
            string s = Console.ReadLine();
            int upperCount = s.Count(c => char.IsUpper(c));
            if (upperCount > (s.Length - upperCount))
                Console.WriteLine(s.ToUpper());
            else
                Console.WriteLine(s.ToLower());
            return 0;
        }
    }
}

using System;

namespace _28__A._Word
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();

            int Ucounter = 0;
            int Lcounter = 0;

            for (int i = 0; i < input.Length; i++)
            {

                if ((int)input[i]>=97 && (int)input[i]<=122)
                {

                    Lcounter++;
                }
                else
                {
                    Ucounter++;
                }

            }

            if (Ucounter==Lcounter || Ucounter<Lcounter)
            {
                Console.WriteLine(input.ToLower());
            }

            else
            {
                Console.WriteLine(input.ToUpper());
            }

        }
    }
}

using System;
using System.Linq;

namespace Test
{
    class Program
    {
        static void Main()
        {
            string word = Console.ReadLine();
            byte upperCount =  (byte)word.ToCharArray().Count(x => char.IsUpper(x));
            byte lowerCount = (byte)(word.Length - upperCount);

            if (lowerCount >= upperCount)
                Console.WriteLine(word.ToLower());
            else
                Console.WriteLine(word.ToUpper());
        }
    }
}

using System;

class Program
{
    static void Main(string[] args)
    {
        string input = Console.ReadLine();
        int small = 0, cap = 0;

        foreach (var i in input)
        {
            if (i >= 'a' && i <= 'z') small++;
            else cap++;
        }

        if (small >= cap)
        {
            Console.WriteLine(input.ToLower());
        }
        else
        {
            Console.WriteLine(input.ToUpper());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static string make(string s)
        {
            string w = "";
            int[] dp = new int[2];
            dp[0] = 0;
            dp[1] = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (char.IsLower(s[i]))
                {
                    dp[0]++;
                }
                if (char.IsUpper(s[i]))
                {
                    dp[1]++;
                }
            }
            if (dp[0] == dp[1] || dp[0]>dp[1])
            {
                w += s.ToLower();
            }
            else {
                w += s.ToUpper();
            }
            return w;
        }
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            Console.WriteLine(make(s));
        }
    }
}

using System;

// Codeforces problem 59A "Слово"
// http://codeforces.com/problemset/problem/59/A
namespace _59_A
{
	class Program
	{
		static void Main(string[] args)
		{
			#region Read data
			string source = Console.ReadLine();
			#endregion
			#region Process data
			int lower = 0;
			int upper = 0;
			foreach (var c in source)
			{
				if (char.IsLower(c))
				{
					lower++;
				}
				else
				{
					upper++;
				}
			}
			#endregion
			#region Write results
			if (lower >= upper)
			{
				Console.WriteLine(source.ToLower());
			}
			else
			{
				Console.WriteLine(source.ToUpper());
			}
			Console.ReadLine();
			#endregion
		}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForcesCSharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            int u = 0;
            int l = 0;

            for (int i = 0; i < input.Length; i++)
            {
                if (char.IsLower(input[i])) l++;
                else if (char.IsUpper(input[i])) u++;
            }

            Console.WriteLine(u > l ? input.ToUpper() : input.ToLower());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace R55.Div2.A.Word
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            int upperChars = 0;
            foreach (char item in str)
            {
                if (char.IsUpper(item))
                {
                    upperChars++;
                }
            }
            int legnth = str.Length;
            if (upperChars > legnth/2)
            {
                Console.WriteLine(str.ToUpper());
            }
            else
            {
                Console.WriteLine(str.ToLower());
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForces
{
    public class Test
    {
        public static void Main()
        {
            string word = Console.ReadLine();
            int upperCount = 0;
            int lowerCount = 0;
            for (int i = 0; i < word.Length; i++)
            {
                if (word[i] >= 65 && word[i] < 97)
                {
                    upperCount++;
                }
                else
                {
                    lowerCount++;
                }
            }
            if (upperCount > lowerCount)
            {
                Console.WriteLine(word.ToUpper());
            }
            else
            {
                Console.WriteLine(word.ToLower());
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A_Word
{
    class Program
    {
        static void Main(string[] args)
        {
        here:    string s = Console.ReadLine();
            if(s.Length<1||s.Length>100)
            {
                goto here;
            }
            char[] Schar = s.ToCharArray();
            char[] lowerchar = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' };
            char[] upperchar = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
            int lowsum = 0;
            int uppersum = 0;
            for(int i=0;i<Schar.Length;i++)
            {
                for(int j=0;j<26;j++)
                {
                    if(Schar[i]==lowerchar[j])
                    {
                        lowsum++;
                    }
                    if (Schar[i] == upperchar[j])
                    {
                        uppersum++;
                    }
                }
            }
            if(lowsum>=uppersum)
            {
                for (int i = 0; i < Schar.Length; i++)
                {
                    for (int j = 0; j < 26; j++)
                    {
                        if (Schar[i] == upperchar[j])
                        {
                            Schar[i] = lowerchar[j];
                        }

                    }
                }
            }
            if (uppersum > lowsum)
            {
                for (int i = 0; i < Schar.Length; i++)
                {
                    for (int j = 0; j < 26; j++)
                    {
                        if (Schar[i] == lowerchar[j])
                        {
                            Schar[i] = upperchar[j];
                        }

                    }
                }
            }
            Console.Write(Schar);
        }
    }
}

using System;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string line = Console.ReadLine();

            int upperCounter = 0;
            int lowerCounter = 0;

            foreach(char item in line)
            {
                if (Char.IsUpper(item))
                    upperCounter++;
                else
                    lowerCounter++;
            }

            if(upperCounter<lowerCounter)
                Console.WriteLine(line.ToLower());
            else if(upperCounter>lowerCounter)
                Console.WriteLine(line.ToUpper());
            else
                Console.WriteLine(line.ToLower());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            Console.WriteLine(s.Count(c => Char.ToUpper(c) == c)
                              >
                              s.Count(c => Char.ToLower(c) == c)
                              ?
                              s.ToUpper() : s.ToLower());

            Console.ReadLine();
        }
    }
}
//5
// 100 50 200 150 200
// 100 50
// 100 50 200
// 100 50 200 150
// 100 50 200 150 200

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cf59a
{
    class Program
    {
        static void Main(string[] args)
        {
            string x;
            x = Console.ReadLine();
            int low=0;
            int up=0;

            for(int i=0; i<x.Length; i++){
                if((int)x[i]>=65&&(int)x[i]<=90){
                    up++;
                }
                else if((int)x[i]>=97&&(int)x[i]<=122){
                    low++;
                }
            }
            if(low>=up){
                Console.Write(x.ToLower());
            }
            else if(up>low){
                Console.Write(x.ToUpper());
            }
        }
    }
}

using System;

 namespace Dcoder
 {
   public class Program
   {
     public static void Main(string[] args)
     {
       string s = Console.ReadLine(); int letter = 0;
       for(int i = 0; i < s.Length; i++) {if(char.IsUpper(s[i])) letter++; else letter--;}
       Console.WriteLine(letter>0 ? s.ToUpper() : s.ToLower());
     }
   }
 }

using System;
using System.Text.RegularExpressions;

namespace Codeforces
{
    class Codeforces
    {
        public static void Main(string[] args)
        {
            string word = Console.ReadLine();

            int lower = Regex.Matches(word, "[a-z]").Count;
            int upper = Regex.Matches(word, "[A-Z]").Count;

            Console.Write(upper > lower ? word.ToUpper() : word.ToLower());
        }
    }
}

using System;
using System.Linq;
class P
{
    static void Main(string[] args)
    {
        string s = Console.ReadLine();
        if (s.Count(f => Char.IsUpper(f)) > s.Count(f => Char.IsLower(f))) Console.WriteLine(s.ToUpper());
        else Console.WriteLine(s.ToLower());
    }
}

using System;

namespace AWord
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();

            int nrLower = 0;
            int nrUpper = 0;

            for(int i = 0; i < input.Length; i++)
            {
                if (char.IsLower(input[i]))
                {
                    nrLower++;
                }

                if (char.IsUpper(input[i]))
                {
                    nrUpper++;
                }
            }

            if(nrLower == nrUpper)
            {
                Console.WriteLine(input.ToLower());
            }
            else if(nrLower > nrUpper)
            {
                Console.WriteLine(input.ToLower());
            }
            else
            {
                Console.WriteLine(input.ToUpper());
            }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            var line = Console.ReadLine();

            var allCharsCount = line.Length;
            var upperCharsCount = line.Count(x => char.IsUpper(x));

            if(upperCharsCount > allCharsCount - upperCharsCount)
                Console.WriteLine(line.ToUpper());
            else
                Console.WriteLine(line.ToLower());
        }

    }
}

using System;
using System.Linq;
public class Program
{
	public static void Main()
	{
		string word = Console.ReadLine();
		int lengthOfWord = word.Count();
		int upperCount = 0;
		foreach(char c in word){
			if(Char.IsUpper(c)){
				upperCount+=1;
			}
		}
		if((upperCount > lengthOfWord-upperCount)){
			Console.WriteLine(word.ToUpper());
		}else{
			Console.WriteLine(word.ToLower());
		}

	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            string word = Convert.ToString(Console.ReadLine());
            string resultWord = "";

            int countLower = 0;
            int countUpper = 0;
            for (int i = 0; i < word.Length; i++)
            {
                if ((int)word[i] > 64 && (int)word[i] < 91)
                    countUpper++;
                else
                    countLower++;
            }

            if (countUpper > countLower)
                resultWord = word.ToUpper();
            else
                resultWord = word.ToLower();

            Console.WriteLine(resultWord);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForces_59A_Word
{
    class Program
    {
        static void Main(string[] args)
        {
            string former = Console.ReadLine();
            if (former.Count(c => c >91) < former.Count(c => c < 91))
                Console.WriteLine(former.ToUpper());
            else
                Console.WriteLine(former.ToLower());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace kompet
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string text;
            int a = 0;
            int b = 0;
            char[] arr = s.ToCharArray();
            foreach (char ch in arr)
            {
                if (char.IsUpper(ch))
                    a++;
                if (char.IsLower(ch))
                    b++;
            }
            if (a > b)
            {
                text = s.ToUpper();
                Console.WriteLine(text);
            }
            else
            {
                text = s.ToLower();
                Console.WriteLine(text);
            }
        }
    }
}

using System;
using System.Collections.Generic;
namespace App
{
    class Program
    {
        static void Main(string[] args)
        {
            String input = Console.ReadLine();
            Char[] array = input.ToCharArray();
            int capitalCounter = 0;
            int smallCounter = 0;
            foreach (char c in array)
            {
                int value = c;
                if (c <= 90)
                    capitalCounter++;
                else
                    smallCounter++;
            }
            if (capitalCounter > smallCounter)
            {

                foreach (char c in array)
                {
                    int value = c;
                    if (value > 90)
                        value -= 32;
                    Console.Write((char)value);

                }
                Console.WriteLine();

            }
            else
            {

                foreach (char c in array)
                {
                    int value = c;
                    if (value < 97)
                        value += 32;
                    Console.Write((char)value);
                }
                Console.WriteLine();
            }
        }

}
}

using System;

class Program
{
    static void Main(string[] args)
    {
        string input = Console.ReadLine();
        int small = 0, cap = 0;

        foreach (var i in input)
        {
            if (i >= 'a' && i <= 'z') small++;
            else cap++;
        }

        if (small >= cap)
        {
            Console.WriteLine(input.ToLower());
        }
        else
        {
            Console.WriteLine(input.ToUpper());
        }
    }
}

using System;
namespace ConsoleApplication2
{
    class getUser
    {
       protected string s;
        public void get() {
            s = Console.ReadLine();
        }
    }
    class getSolution : getUser {

      protected  int countup = 0, countlow = 0;
        public void sol()
        {
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] >= 48 && s[i] <= 96)
                    countup++;

                if (s[i] >= 97 && s[i] <= 122)
                    countlow++;
                }
            }
        }

         class display:getSolution
        {
            public void dis()
            {
                if (countup == countlow || countlow > countup)
                    Console.WriteLine( s = s.ToLower());
                else Console.WriteLine( s = s.ToUpper());
            }
       }
       class access {
        static void Main(string[] args)
        {
            display opj = new display();
            opj.get();
            opj.sol();
            opj.dis();
        }
    }
}

using System;

namespace _59a
{
    class Program
    {
        static void Main(string[] args)
        {
            string t = Console.ReadLine();
            int n = t.Length;
            char[] s = new Char[105];
            int p = 0, q = 0;
            for (int i = 0; i < n; ++i)
            {
                s[i] = t[i];
                if (Char.IsLower(s[i])) ++p;
                else ++q;
            }
            if (p < q)
            {
                for (int i = 0; i < n; ++i)
                    if (Char.IsLower(s[i])) s[i] = Char.ToUpper(s[i]);
            }
            else for (int i = 0; i < n; ++i)
                    if (Char.IsUpper(s[i])) s[i] = Char.ToLower(s[i]);
            for (int i = 0; i < n; ++i) Console.Write(s[i]);
        }
    }
}

using System;

namespace Слово_Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            int counter = 0;
            for (int i = 0; i < str.Length; i++)
            {
                if (str[i] == char.ToUpper(str[i]))

                {
                    counter++;
                }
            }

            if (str.Length - counter >= counter)
            {
                str = str.ToLower();
            }
            else
            {
                str = str.ToUpper();
            }
            Console.WriteLine(str);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace words
{
    class Program
    {
        static void Main()
        {
            String WorD = Console.ReadLine();
            String WORD = WorD.ToUpper();
            Int32 n = 0;
            Int32 N = 0;
            for(int i=0;i<WorD.Length;i++)
            {
                if(WorD[i]!=WORD[i])
                {
                    n++;
                }
                else
                {
                    N++;
                }
            }
            if(N>n)
            {
                Console.WriteLine("{0}", WORD);
            }
            else
            {
                Console.WriteLine("{0}",WorD.ToLower());
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication18
{
    class Program
    {
        static void Main(string[] args)
        {
            int k = 0, r = 0;
            string m = Console.ReadLine();
            foreach (char c in m)
            { if (char.IsLower(c))k++; else r++; }
            foreach (char c in m)
            {
                if (k >= r) m = m.Replace(c, char.ToLower(c));
                else m = m.Replace(c, char.ToUpper(c));

            }
            Console.WriteLine(m);

        }
    }
}

using System;
using System.Linq;

namespace Word_0
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            Console.WriteLine(s.Count(f => Char.IsUpper(f)) > s.Length / 2 ? s.ToUpper() : s.ToLower());
            Console.ReadLine();
        }
    }
}

using System;

namespace Problem___59A___A._Word
{
    class Program
    {
        static void Main(string[] args)
        {
            var s = Console.ReadLine();

            if (s.Length>=1 && s.Length<=100)
            {
                var countLow = 0;
                var countUpp = 0;

                for (int i = 0; i < s.Length; i++)
                {
                    var temp = Convert.ToString(s[i]);
                    var temp2 = temp.ToUpper();

                    if (string.Compare(temp,temp2)==0)
                    {
                        countUpp++;
                    }
                    else
                    {
                        countLow++;
                    }
                }

                if (countLow<countUpp)
                {
                    s = s.ToUpper();
                }
                else
                {
                    s = s.ToLower();
                }

                Console.WriteLine(s);

            }
        }
    }
}

using System;

namespace ConsoleApp10
{
    class Program
    {
        static void Main(string[] args)
        {
            string word = Console.ReadLine();
            int upperCase = 0;
            int lowerCase = 0;
            for (int i = 0; i < word.Length; i++)
            {
                if (char.IsUpper(word[i])) upperCase++;
            }
            for (int i = 0; i < word.Length; i++)
            {
                if (char.IsLower(word[i])) lowerCase++;
            }

            if (lowerCase >= upperCase)
            {
                Console.WriteLine(word.ToLower());
            }
            else
            {

                Console.WriteLine(word.ToUpper());
            }

        }
    }
}

using System;
using System.Linq;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int cu = s.Count(char.IsUpper);
            int cl = s.Count(char.IsLower);
            if (cu > cl)
            {
                Console.WriteLine(s.ToUpper());
            }
            else
            {
                Console.WriteLine(s.ToLower());
            }
        }
    }
}

using System;

namespace A
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            string v = Console.ReadLine();
            int Upp = 0;
            for (int i = 0; i < v.Length; i++)
                if (v[i] >= 'A' && v[i] <= 'Z')
                    Upp++;
            if (Upp > v.Length - Upp)
            {
                v = v.ToUpper();
            }
            else
            {
                v = v.ToLower();
            }
            Console.WriteLine(v);

        }
    }
}

using System;
 class Program
    {
        static void Main(string[] args)
        {
            char[] input = Console.ReadLine().ToCharArray();
            int u=0, l=0;
            for (int i = 0; i < input.Length; ++i)
                if (input[i] > 96)
                    l++;
                else u++;
            Func<char, char> fnc;
            if(l>=u)
                fnc = (x) => { if (x < 97) return (char)(x + 32); else return x; };
            else fnc = (x) => { if (x > 96) return (char)(x - 32); else return x; };
            for (int i = 0; i < input.Length; ++i)
                input[i]=fnc(input[i]);
            Console.WriteLine(new string(input));
        }
    }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Codeforces
{
    class Class17
    {
        public static void Main()
        {
            string s = Console.ReadLine();
            string ss1 = s.ToLower();
            string ss2 = s.ToUpper();
            int cnt1 = 0;
            int cnt2 = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] != ss1[i])
                    cnt1++;
            }
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] != ss2[i])
                    cnt2++;
            }
            if (cnt1 <= cnt2)
                Console.WriteLine(ss1);
            if (cnt1 > cnt2)
                Console.WriteLine(ss2);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

public class Program
{
    static void Main()
    {
        List<int> alphabet = new List<int>();
        int upperCount = 0, lowerCount = 0;

        for (int i = 97; i < 123; ++i)
            alphabet.Add(i);

        List<char> input = Console.ReadLine().ToList();

        for (int i = 0; i < input.Count; ++i)
        {
            if (alphabet.Contains(input[i]))
                lowerCount++;
            else
                upperCount++;
        }

        if (lowerCount >= upperCount)
            Console.WriteLine(string.Join(string.Empty, input).ToLower());
        else
            Console.WriteLine(string.Join(string.Empty, input).ToUpper());
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Specialized;
using System.Collections;

namespace ConsoleApplication24
{
    class Program
    {

       static void Main(string[] args)
       {

           string x = Console.ReadLine();
           int NoUpp = 0;
           int NoLow = 0;

               foreach(char c in x )
               {
                   if (char.IsUpper(c))
                       NoUpp++;
                   else NoLow++;

               }
               Console.WriteLine(NoLow>= NoUpp ? x.ToLower(): x.ToUpper());
       }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace word
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();

            int upper = 0, lower = 0;

            for (int i=0;i<s.Length;i++)
            {
                if (char.IsLower(s[i])) lower++; else upper++;
            }

            if (lower < upper) Console.Write(s.ToUpper()); else Console.Write(s.ToLower());
        }
    }
}

using System;

namespace CF_Word
{
    class Program
    {
        static void Main(string[] args)
        {
            var line1 = Console.ReadLine();
            var word = line1.ToCharArray();
            var count = 0;

            for (int i = 0; i < word.Length; i++)
            {
                if (Char.IsUpper(word[i]))
                {
                    count++;
                }
            }

            if (count > word.Length / 2)
            {
                Console.WriteLine(line1.ToUpper());
            } else
            {
                Console.WriteLine(line1.ToLower());
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _59a
{
    class Program
    {
        static void Main(string[] args)
        {
            var str = Console.ReadLine();
            var numUpper = str.Count(p => char.IsUpper(p));
            var numLower = str.Length - numUpper;
            if (numUpper <= numLower)
                str = str.ToLower();
            else
                str = str.ToUpper();
            Console.WriteLine(str);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _59A
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();

            int cl = 0, cu = 0;
            int n = s.Length;
            for (int i = 0; i < n; i++)
            {
                if (Char.IsLower(s[i]))
                {
                    cl++;
                }
                else
                {
                    cu++;
                }
            }
            string ss = string.Empty;
            if (cl >= cu)
            {
                for (int i = 0; i < n; i++)
                    ss+=Char.ToLower(s[i]);
            }
            else
            {
                for (int i = 0; i < n; i++)
                {
                    if (Char.IsLower(s[i]))
                        ss += Char.ToUpper(s[i]);
                    else
                        ss += s[i];
                }
            }
            Console.WriteLine(ss);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ConsoleApplication20
{
    class Program
    {
        static void Main(string[] args)
        {
            reader = Console.In;
            writer = Console.Out;

            var word = ReadToken();

            if (word.Count(x => char.IsLower(x)) == word.Count(x => char.IsUpper(x)))
                Console.WriteLine(word.ToLower());
            else
                Console.WriteLine(word.Count( char.IsLower) > word.Count(char.IsUpper) ? word.ToLower() : word.ToUpper());

            Console.ReadLine();
        }

        private static Queue<string> currentLineTokens = new Queue<string>();
        protected static TextReader reader;
        protected static TextWriter writer;
        private static string[] ReadAndSplitLine()
        {
            return reader.ReadLine().Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
        }

        public static string ReadToken()
        {
            if (currentLineTokens.Count == 0)
                currentLineTokens = new Queue<string>(ReadAndSplitLine());
            return currentLineTokens.Dequeue();
        }

        public static int ReadInt()
        {
            return int.Parse(ReadToken());
        }

        public static int[] ReadIntArray()
        {
            return ReadAndSplitLine().Select(int.Parse).ToArray();
        }

        public static List<int> ReadIntList()
        {
            return ReadAndSplitLine().Select(int.Parse).ToList();
        }

        public static string[] ReadLines(int count)
        {
            string[] lines = new string[count];
            for (int i = 0; i < count; i++)
            {
                lines[i] = reader.ReadLine().Trim();
            }
            return lines;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ConsoleApplication20
{
    class Program
    {
        static void Main(string[] args)
        {
            reader = Console.In;
            var word = ReadToken();

            if (word.Count(char.IsLower) >= word.Count(char.IsUpper))
                Console.WriteLine(word.ToLower());
            else
                Console.WriteLine(word.ToUpper());

            reader.Close();
        }

        private static Queue<string> currentLineTokens = new Queue<string>();
        protected static TextReader reader;
        protected static TextWriter writer;
        private static string[] ReadAndSplitLine()
        {
            return reader.ReadLine().Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
        }

        public static string ReadToken()
        {
            if (currentLineTokens.Count == 0)
                currentLineTokens = new Queue<string>(ReadAndSplitLine());
            return currentLineTokens.Dequeue();
        }

        public static int ReadInt()
        {
            return int.Parse(ReadToken());
        }

        public static int[] ReadIntArray()
        {
            return ReadAndSplitLine().Select(int.Parse).ToArray();
        }

        public static List<int> ReadIntList()
        {
            return ReadAndSplitLine().Select(int.Parse).ToList();
        }

        public static string[] ReadLines(int count)
        {
            string[] lines = new string[count];
            for (int i = 0; i < count; i++)
            {
                lines[i] = reader.ReadLine().Trim();
            }
            return lines;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int upper = s.Count<char>(c => !(c >= 'a'));
            int lower = s.Length - upper;

            if(upper > lower)
            {
                Console.WriteLine(s.ToUpper());
                return;
            }

            if (upper < lower)
            {
                Console.WriteLine(s.ToLower());
                return;
            }

            if (upper == lower)
            {
                Console.WriteLine(s.ToLower());
                return;
            }
        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EO
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            int up = 0, down = 0;
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i]>='a' && a[i]<='z')
                {
                    down++;
                }
                else
                {
                    up++;
                }
            }
            if (down>=up)
            {
                Console.WriteLine(a.ToLower());
            }
            else
            {
                Console.WriteLine(a.ToUpper());
            }
        }
    }
}

using System;

public class Program
    {
        static void Main(string[] args)
        {
            var s = Console.ReadLine();
int lower = 0; int upper = 0;
            foreach(var ch in s)
{
if (ch >= 'A' && ch <= 'Z')
upper++;
else if (ch >= 'a' && ch <= 'z')
lower++;
}
if (lower >= upper)
Console.WriteLine(s.ToLower());
else
Console.WriteLine(s.ToUpper());
        }
    }

using System;

class Program
{
    public static bool IsMostlyUppercase(string word)
    {
        int countUpper = 0;
        int countLower = 0;

        for (int i = 0; i < word.Length; i++)
        {
            if (char.IsUpper(word[i]))
            {
                countUpper++;
            }
            else
            {
                countLower++;
            }
        }

        if (countUpper > countLower)
        {
            return true;
        }

        return false;
    }
    static void Main(string[] args)
    {
        string word = Console.ReadLine();
        if (IsMostlyUppercase(word))
        {
            Console.WriteLine(word.ToUpper());
        }
        else
        {
            Console.WriteLine(word.ToLower());
        }

    }
}

using System;
using System.Collections.Generic;
using System.IO;

namespace prA {

    class Program {
#if ONLINE_JUDGE
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024 * 10), System.Text.Encoding.ASCII, false, 1024 * 10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024 * 10), System.Text.Encoding.ASCII, 1024 * 10);
#else
        private static readonly StreamWriter writer = new StreamWriter("output");
        private static readonly StreamReader reader = new StreamReader("input");
#endif
        static void Main(string[] args) {
            string s = reader.ReadLine();
            long u = 0;
            long l = 0;
            foreach(char c in s) {
                if(Char.IsUpper(c))
                    u++;
                if(Char.IsLower(c))
                    l++;
            }
            if(u < l) {
                s = s.ToLower();
            } else if(u > l) {
                s = s.ToUpper();
            }
            else
                s = s.ToLower();
            writer.WriteLine(s);

            writer.Flush();
#if !ONLINE_JUDGE
            writer.Close();
#endif
        }
        private static int Next() {
            int c;
            int res = 0;
            do {
                c = reader.Read();
                if(c == -1)
                    return res;
            } while(c != '-' && (c < '0' || c > '9'));
            int sign = 1;
            if(c == '-') {
                sign = -1;
                c = reader.Read();
            }
            res = c - '0';
            while(true) {
                c = reader.Read();
                if(c < '0' || c > '9')
                    return res * sign;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int Upper = 0; int Lower = 0;
            foreach (char n in s)
            {
                if (n >= 'A' && n <= 'Z')
                    ++Upper;
                else if (n >= 'a' && n <= 'z')
                    ++Lower;
            }
            if (Upper > Lower)
                Console.Write(s.ToUpper());
            else
                Console.Write(s.ToLower());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForces_59A_Word
{
    class Program
    {
        static void Main(string[] args)
        {
            string former = Console.ReadLine();
            if (former.Count(c => c >91) < former.Count(c => c < 91))
                Console.WriteLine(former.ToUpper());
            else
                Console.WriteLine(former.ToLower());
        }
    }
}

using System;
using System.Globalization;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string word = Console.ReadLine();
            char[] letters = word.ToCharArray();
            int bigLetters = 0;
            int smallLetters = 0;
            foreach (char i in letters)
            {
                if (65 <= i && i <= 90)
                {
                    bigLetters++;
                }
                else if (97 <= i && i <= 122)
                {
                    smallLetters++;
                }
            }
            if (bigLetters <= smallLetters) Console.WriteLine(word.ToLower());
            else Console.WriteLine(word.ToUpper());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SPOJ_Problems
{
    class Class1
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            int lc = 0;
            int uc = 0;

            for (int i = 0; i < str.Length; i++)
            {
                if (Char.ToLower(str[i]) == str[i])
                {
                    // lowercase
                    lc++;
                }
                else
                {
                    uc++;
                }
            }

            string res = lc >= uc ? str.ToLower() : str.ToUpper();
            Console.WriteLine(res);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Boy_or_Girl
{
    class Program
    {
        static void Main(string[] args)
        {
            int l = 0;
            int u = 0;
            string s = Console.ReadLine();
            string s1 = s.ToLower();
            string s2 = s.ToUpper();
            for (int i = 0; i < s.Length; i++)
			{
			 if (s1[i].Equals(s[i]))
            {
                l++;
            }
             else
             {
                 u++;
             }
			}
            if (l>=u)
            {
                Console.Write(s1);
            }
            else
            {
                Console.Write(s2);
            }
        }
    }
}

using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;

namespace CSharp_Shell
{

    public static class Program
    {
        public static void Main()
        {
          string str = Console.ReadLine();
          int sumLower = 0,sumUpper = 0;
          for(int i = 0; i< str.Length; i++){
          	if(char.IsLower(str[i])){
          		sumLower++;
          	}else{
          		sumUpper++;
          	}
          }
          if(sumLower == sumUpper || sumLower > sumUpper){
          	str = str.ToLower();
          }else{
          	str = str.ToUpper();
          }
          Console.WriteLine(str);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace word
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();

            int upper = 0, lower = 0;

            for (int i=0;i<s.Length;i++)
            {
                if (char.IsLower(s[i])) lower++; else upper++;
            }

            if (lower < upper) Console.Write(s.ToUpper()); else Console.Write(s.ToLower());
        }
    }
}

using System;
using System.Linq;
public class Program
{
	public static void Main()
	{
		string word = Console.ReadLine();
		int lengthOfWord = word.Count();
		int upperCount = 0;
		foreach(char c in word){
			if(Char.IsUpper(c)){
				upperCount+=1;
			}
		}
		if((upperCount > lengthOfWord-upperCount)){
			Console.WriteLine(word.ToUpper());
		}else{
			Console.WriteLine(word.ToLower());
		}

	}
}

using System;
using System.Linq;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int cu = s.Count(char.IsUpper);
            int cl = s.Count(char.IsLower);
            if (cu > cl)
            {
                Console.WriteLine(s.ToUpper());
            }
            else
            {
                Console.WriteLine(s.ToLower());
            }
        }
    }
}

using System;

namespace CF_Word
{
    class Program
    {
        static void Main(string[] args)
        {
            var line1 = Console.ReadLine();
            var word = line1.ToCharArray();
            var count = 0;

            for (int i = 0; i < word.Length; i++)
            {
                if (Char.IsUpper(word[i]))
                {
                    count++;
                }
            }

            if (count > word.Length / 2)
            {
                Console.WriteLine(line1.ToUpper());
            } else
            {
                Console.WriteLine(line1.ToLower());
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;

namespace ؤخيثبخقؤث
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int low = 0 , upper = 0 ;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] >= 97) low++;
                else upper++;
            }
            if (low >=  upper) Console.WriteLine(s.ToLower());
            else Console.WriteLine(s.ToUpper());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _59a
{
    class Program
    {
        static void Main(string[] args)
        {
            var str = Console.ReadLine();
            var numUpper = str.Count(p => char.IsUpper(p));
            var numLower = str.Length - numUpper;
            if (numUpper <= numLower)
                str = str.ToLower();
            else
                str = str.ToUpper();
            Console.WriteLine(str);
        }
    }
}

using System;

public class Test
{

	public static int maxStep = 5;

	public static void Main()
	{
		string word = Console.ReadLine();

		int big_count = 0;

		for(int i = 0; i < word.Length; i++){
			if(Char.IsUpper(word[i]))
				big_count++;
		}

		if(big_count > word.Length/2){
			word = word.ToUpper();
		}else{
			word = word.ToLower();
		}

		Console.WriteLine($"{word}");
	}
}

using System;

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int upper = 0;
            int lower = 0;
            foreach (var c in s)
                if (char.ToLower(c) == c)
                    lower++;
                else
                    upper++;
            Console.WriteLine(lower >= upper ? s.ToLower() : s.ToUpper());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ConsoleApplication20
{
    class Program
    {
        static void Main(string[] args)
        {
            reader = Console.In;
            writer = Console.Out;

            var word = ReadToken();

            if (word.Count(x => char.IsLower(x)) == word.Count(x => char.IsUpper(x)))

                Console.WriteLine(word.ToLower());
            else
                Console.WriteLine(word.Count(x => char.IsLower(x)) > word.Count(x => char.IsUpper(x)) ? word.ToLower() : word.ToUpper());

            Console.ReadLine();
        }

        private static Queue<string> currentLineTokens = new Queue<string>();
        protected static TextReader reader;
        protected static TextWriter writer;
        private static string[] ReadAndSplitLine()
        {
            return reader.ReadLine().Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
        }

        public static string ReadToken()
        {
            if (currentLineTokens.Count == 0)
                currentLineTokens = new Queue<string>(ReadAndSplitLine());
            return currentLineTokens.Dequeue();
        }

        public static int ReadInt()
        {
            return int.Parse(ReadToken());
        }

        public static int[] ReadIntArray()
        {
            return ReadAndSplitLine().Select(int.Parse).ToArray();
        }

        public static List<int> ReadIntList()
        {
            return ReadAndSplitLine().Select(int.Parse).ToList();
        }

        public static string[] ReadLines(int count)
        {
            string[] lines = new string[count];
            for (int i = 0; i < count; i++)
            {
                lines[i] = reader.ReadLine().Trim();
            }
            return lines;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Слово__55_
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int n=s.Length;
            char [] ch =s.ToCharArray(0,n);
            int k=0;
            for(int i=0;i<n;i++){
                if (char.IsUpper(ch[i]))
                    k++;
            }
            if (n - k >= k)
                for (int i = 0; i < n; i++)
                    Console.Write(char.ToLower(ch[i]));
            else
                for (int i = 0; i < n; i++)
                Console.Write(char.ToUpper(ch[i]));
           // Console.ReadKey();
        }
    }
}

using System;

namespace Word
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] s = Console.ReadLine().ToCharArray();
            int b = 0;
            int l = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] >= 'A' && s[i] <= 'Z')
                {
                    b++;
                }
                else
                {
                    l++;
                }

            }
            if (b > l)
            {
                Console.WriteLine(new string(s).ToUpper());
            }
            else
            {
                Console.WriteLine(new string(s).ToLower());
            }
            Console.ReadLine();
        }
    }
}

using System;

namespace Word
{
    class Program
    {
        static void Main(string[] args)
        {

            int l = 0, u = 0, i;
             var z = Console.ReadLine();
            char[] s = new char[z.Length];
            s = z.ToCharArray();

            for (i = 0; i < s.Length; i++)
            {
                if (s[i] >= 65 && s[i] <= 90)
                    u++;
                else if (s[i] >= 97 && s[i] <= 122)
                {
                    l++;
                }
            }
            if (u > l)
            {
                for (i = 0; i < s.Length; i++)
                {
                    if (s[i] >= 97 && s[i] <= 122)
                    {
                        s[i] = (char)( 65 + s[i] - 97);
                    }
                }
            }
            else
            {
                for (i = 0; i < s.Length; i++)
                {
                    if (s[i] >= 65 && s[i] <= 90)
                    {
                        s[i] =(char) (97 + s[i] - 65);
                    }
                }
            }
            Console.WriteLine(s);

        }
    }
}

using System;
class Program
{
    static void Main()
    {
        var w = Console.ReadLine();
        int u = 0, l = 0;
        for (int i = 0; i < w.Length; i++)
        {
            var z = char.IsUpper(w[i]) ? u++ : l++;
        }
        Console.WriteLine(u > l ? new string(w.ToUpper().ToCharArray()) : new string(w.ToLower().ToCharArray()));
    }
}

using System;

class Program
{
    static void Main()
    {
        string letters = Console.ReadLine();
        int countLower = 0;

        for(int i = 0; i < letters.Length; i++)
        {
            if (char.IsLower(letters[i]))
            {
                countLower++;
            }
        }

        if(letters.Length - countLower <= letters.Length / 2)
        {
            Console.WriteLine(letters.ToLower());
        }
        else
        {
            Console.WriteLine(letters.ToUpper());
        }

        Console.ReadLine();
    }
}

using System;
using System.Linq;

class A59 {
    public static void Main() {
        var s = Console.ReadLine();
        Console.WriteLine(s.Count(char.IsUpper) > s.Length >> 1
            ? s.ToUpper()
            : s.ToLower()
        );
    }
}

using System;
using System.Linq;

namespace SOLID
{
    class Program
    {
        public static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string answer = "";
            int upperCase = 0;
            int lowerCase = 0;

            for (int i = 0; i < input.Length; i++)
            {
                if (Char.IsLower(input[i]))
                {
                    lowerCase++;
                }
            }

            upperCase = input.Length - lowerCase;

            if (upperCase > lowerCase)
            {
                answer = input.ToUpper();
            }
            else
            {
                answer = input.ToLower();
            }

            Console.WriteLine(answer);
        }
    }
}

namespace o
{
    using System;
    using System.Collections.Generic;
    using System.Text;

    class Program
    {
        static void Main(string[] args)
        {
            string message = Console.ReadLine();
            int upperCounter = 0;
            for (int i = 0; i < message.Length; i++)
            {
                if (char.IsUpper(message[i]))
                {
                    upperCounter++;
                }
            }
            if (upperCounter > message.Length - upperCounter)
            {
                Console.WriteLine(message.ToUpper());
            }
            else
            {
                Console.WriteLine(message.ToLower());
            }
        }
    }
}

using System;

namespace A
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            char[] v = Console.ReadLine().ToCharArray();
            int Upp = 0;
            foreach(char c  in  v)
            {
                if (c >= 'A' && c <= 'Z')
                    Upp++;
            }
            if (Upp > v.Length - Upp)
            {
                for (int i = 0; i < v.Length; i++)
                {
                    if (v[i] >= 'a' && v[i] <= 'z')
                        v[i] = Convert.ToChar(v[i] - 32);
                }
            }
            else
            {
                for (int i = 0; i < v.Length; i++)
                {
                    if (v[i] >= 'A' && v[i] <= 'Z')
                        v[i] = Convert.ToChar(v[i] + 32);
                }
            }
            Console.WriteLine(v);

        }
    }
}

using System;

namespace ConsoleApp6
{
    class Program
    {
        static void Main(string[] args)
        {
            string root;

            root = Console.ReadLine();

            char[] arr = root.ToCharArray();
            int upper = 0;
            int lower = 0;
            for(int i=0;i<root.Length;i++)
            {
                if (Char.IsUpper(arr[i]))
                {
                    upper++;
                }
                else
                    lower++;
            }
            if (upper > lower)
                Console.WriteLine(root.ToUpper());
            else if (upper < lower)
                Console.WriteLine(root.ToLower());
            else
                Console.WriteLine(root.ToLower());

        }
    }
}

using System;

namespace Competitive
{
    class Solution
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int cntB = 0;
            int cntS = 0;

            foreach (char c in s)
            {
                if (Convert.ToInt32(c) > 96)
                    ++cntS;
                else
                    ++cntB;
            }

            if (cntS >= cntB)
                Console.WriteLine(s.ToLower());
            else
                Console.WriteLine(s.ToUpper());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            // input word
            string sWord = Console.ReadLine();

            // count lower and upper cases
            int nLowers = 0;
            int nUppers = 0;
            for (int i = 0; i < sWord.Length; ++i)
            {
                if (char.IsLower(sWord[i]))
                {
                    ++nLowers;
                }
                else
                {
                    ++nUppers;
                }
            }

            // change characters
            if (nLowers < nUppers)
            {
                StringBuilder sbNewWord = new StringBuilder();
                for (int i = 0; i < sWord.Length; ++i)
                {
                    sbNewWord.Append(char.ToUpper(sWord[i]));
                }

                sWord = sbNewWord.ToString();
            }
            else
            {
                StringBuilder sbNewWord = new StringBuilder();
                for (int i = 0; i < sWord.Length; ++i)
                {
                    sbNewWord.Append(char.ToLower(sWord[i]));
                }

                sWord = sbNewWord.ToString();
            }

            // display results
            Console.WriteLine("{0}", sWord);
        }
    }
}

using System;
using System.Linq;
class P
{
    static void Main(string[] args)
    {
        string s = Console.ReadLine();
        if (s.Count(f => Char.IsUpper(f)) > s.Count(f => Char.IsLower(f))) Console.WriteLine(s.ToUpper());
        else Console.WriteLine(s.ToLower());
    }
}

using System;
using System.Linq;

class Program
{
    static void Main()
    {
        byte small_symb = 0;
        byte big_symb = 0;
        string str = Console.ReadLine();
        foreach(char symb in str)
        {
            if((symb>='A')&&(symb<='Z'))
            {
                big_symb++;
            }
            else
            {
                small_symb++;
            }
        }
        if(small_symb<big_symb)
        {
            Console.WriteLine(str.ToUpper());
        }
        else
        {
            Console.WriteLine(str.ToLower());
        }
    }
}

using System;
using System.Collections.Generic;

namespace CodeForces
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            //var T = Convert.ToInt32(Console.ReadLine());
            //for (int i = 1; i <= T; i++)
            //{
            //    var inputStr = Console.ReadLine();
            //    var result = StringManipulationTask(inputStr);
            //    Console.WriteLine(result);
            //}
            var input = Console.ReadLine();
            var output = UpperCaseLowerCase(input);
            Console.WriteLine(output);
        }

        public static string UpperCaseLowerCase(string str)
        {
            int upperCaseCount = 0, lowerCaseCount = 0;
            var upperCaseStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
            var lowerCaseStr = upperCaseStr.ToLower();
            foreach (var ch in str)
            {
                if (upperCaseStr.Contains(ch.ToString()))
                    ++upperCaseCount;
                if (lowerCaseStr.Contains(ch.ToString()))
                    ++lowerCaseCount;
            }
            return upperCaseCount > lowerCaseCount ? str.ToUpper() : str.ToLower();
        }

        public static string StringManipulationTask(string s)
        {
            var vowels = new List<char> { 'a', 'e', 'i', 'o', 'u' };
            char[] input = s.ToLower().ToCharArray();
            var result = "";
            foreach (char c in input)
            {
                if (!vowels.Contains(c))
                {

                    result += '.';
                    result += c;
                }
            }
            return result;
        }
    }
}

using System;
using System.Linq;

namespace _59A
{
    class Program
    {
        static void Main()
        {
            var s = Console.ReadLine();
            var n = s.Where(x => Char.IsUpper(x)).Count();
            if (s.Length - n < n) Console.WriteLine(s.ToUpper());
            else Console.WriteLine(s.ToLower());
        }
    }
}

using System;

namespace CodeForces
{
    class Program
    {
        static void Main()
        {

            string input = Console.ReadLine();
            int lower = 0;
            foreach (var item in input)
            {
                if (char.IsLower(item))
                {
                    lower++;
                }
            }
            int upper = input.Length - lower;
            if (lower > upper)
            {
                Console.WriteLine(input.ToLower());
            }
            else if (lower < upper)
            {
                Console.WriteLine(input.ToUpper());
            }
            else
            {
                Console.WriteLine(input.ToLower());
            }
            //Console.WriteLine(new[] { 4, 7 }.Contains(Console.ReadLine().Count(x => x == '4' || x == '7')) ? "YES" : "NO");
            Console.ReadLine();
        }

    }
}

using System;

namespace Word
{
    class Program
    {
        static void Main(string[] args)
        {
            String word = Console.ReadLine();
            int upCount = 0;
            int downCount = 0;

            for (int i=0; i<word.Length; i++)
            {
                int n = word[i];
                if (n>=65 && n <=90)
                {
                    upCount++;
                }
                else if (n>=97 && n<=122)
                {
                    downCount++;
                }
            }

            if (upCount > downCount)
            {
                Console.WriteLine(word.ToUpper());
            }
            else if (upCount < downCount)
            {
                Console.WriteLine(word.ToLower());
            }
            else if (upCount == downCount)
            {
                Console.WriteLine(word.ToLower());
            }

            //Console.WriteLine(upCount+" "+downCount);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//using System.Threading.Tasks;

namespace codeforces
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int i = 0;
            int smcount = 0;
            int uppcount = 0;
            while (i < s.Length)
            {
                if (char.IsUpper(s.ElementAt(i)))
                {
                    uppcount++;
                }
                else
                {
                    smcount++;
                }
                i++;
            }
            if (uppcount == smcount)
            {
                Console.WriteLine(s.ToLower());
            }
            else if (uppcount > smcount)
            {
                Console.WriteLine(s.ToUpper());
            }
            else if (uppcount < smcount)
            {
                Console.WriteLine(s.ToLower());
            }
        }
    }
}

using System;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
        var word = Console.ReadLine();
        if (word.Count(x => char.IsUpper(x)) > word.Count(x => char.IsLower(x)))
        {
            Console.WriteLine(word.ToUpper());
        }
        else
        {
            Console.WriteLine(word.ToLower());
        }
    }
}

using System;

namespace Practice
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = (Console.ReadLine());
            Console.WriteLine(SolveProblem(s));
            Console.ReadLine();
        }

        static string SolveProblem (string s)
        {
            int lowerCount = 0;
            int higherCount = 0;
            for (int i = 0; i < s.Length ;i++)
            {
                if (char.IsLower( s [i]))
                {
                    lowerCount++;
                } else
                {
                    higherCount++;
                }

                if (lowerCount > (s.Length) / 2)
                {
                    return s.ToLower();
                }
            }
            return lowerCount == higherCount ? s.ToLower() :s.ToUpper();
        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Word
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            char[] arr = str.ToCharArray();
            str = "";
            int upperCase = 0;
            int lowerCase = 0;
            for (int i=0;i<arr.Length;i++)
            {
                bool bl = Char.IsUpper(arr[i]);
                if (bl == true)
                {
                    upperCase++;
                } else
                {
                    lowerCase++;
                }
            }

            for (int i=0;i<arr.Length;i++)
            {
                if (upperCase > lowerCase)
                {
                    arr[i] = Char.ToUpper(arr[i]);
                    str += arr[i];
                } else
                {
                    arr[i] = Char.ToLower(arr[i]);
                    str += arr[i];
                }
            }
            Console.WriteLine(str);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Security;
using System.Security.Cryptography.X509Certificates;
using System.Text;

namespace codeforces
{
	class Program
	{
		public class User
		{
			public int c;

			public int r;
		}

		public class Comparer : IComparer<User>
		{
			public int Compare(User x, User y)
			{
				if (x.c < y.c)
					return -1;
				return 1;
			}
		}

		public static long getGcd(long a, long b)
		{
			if (b == 0)
				return a;
			return getGcd(b, a % b);
		}

		public static void WriteYESNO(bool x, string yes = "YES", string no = "NO")
		{
			if (x)
				Console.WriteLine(yes);
			else
			{
				Console.WriteLine(no);
			}
		}

		public static string GetString()
		{
			return Console.ReadLine();
		}

		public static List<int> getList()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(int.Parse).ToList();
		}

		public static int getInt()
		{
			var s = Console.ReadLine();
			return int.Parse(s);
		}

		private static void Main(string[] args)
		{
/*			var input = new StreamReader("input.txt");
			var output = new StreamWriter("output.txt");*/
			var s = GetString();
			var ct = s.ToList().Count(x => x >= 'A' && x <= 'Z');
			if (ct> (s.Length - s.Length % 2) / 2)
			{
				s = s.ToUpper();
			}
			else
			{
				s = s.ToLower();
			}
			Console.WriteLine(s);
			/*			input.Close();
			output.Close();*/
		}
	}
}

using System;
class Program
{
    static void Main()
    {
        var w = Console.ReadLine();
        int u = 0, l = 0;
        for (int i = 0; i < w.Length; i++)
        {
            var z = char.IsUpper(w[i]) ? u++ : l++;
        }
        Console.WriteLine(u > l ? new string(w.ToUpper().ToCharArray()) : new string(w.ToLower().ToCharArray()));
    }
}

using System;

namespace CaseCorrector
{
    class Program
    {
        static void Main(string[] args)
        {
            string word = Console.ReadLine();

            int upperCase = 0, lowercase = 0;

            foreach (char character in word)
            {
                if ((int)character < 93)
                    upperCase++;
                else
                    lowercase++;
            }

            if (upperCase > lowercase)
                Console.WriteLine(word.ToUpper());
            else if (lowercase > upperCase)
                Console.WriteLine(word.ToLower());
            else
                Console.WriteLine(word.ToLower());
        }
    }
}

using System;
 class Program
    {
        static void Main(string[] args)
        {
            char[] input = Console.ReadLine().ToCharArray();
            int u=0, l=0;
            for (int i = 0; i < input.Length; ++i)
                if (input[i] > 96)
                    l++;
                else u++;
            Func<char, char> fnc;
            if(l>u)
                fnc = (x) => { if (x > 96) return (char)(x - 32); else return x; };
            else fnc = (x) => { if (x < 97) return (char)(x + 32); else return x; };
            for (int i = 0; i < input.Length; ++i)
                input[i]=fnc(input[i]);
            Console.WriteLine(new string(input));
        }
    }

using System;
 class Program
    {
        static void Main(string[] args)
        {
            char[] input = Console.ReadLine().ToCharArray();
            int u=0, l=0;
            for (int i = 0; i < input.Length; ++i)
                if (input[i] > 96)
                    l++;
                else u++;
            Func<char, char> fnc;
            if(l>u)
                fnc = (x) => { if (x < 97) return (char)(x + 32); else return x; };
            else fnc = (x) => { if (x > 96) return (char)(x - 32); else return x; };
            for (int i = 0; i < input.Length; ++i)
                input[i]=fnc(input[i]);
            Console.WriteLine(new string(input));
        }
    }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int Upper = 0; int Lower = 0;
            foreach (char n in s)
            {
                if (n > 'A' && n < 'Z')
                    ++Upper ;
                else if (n > 'a' && n < 'z')
                    ++Lower ;
            }
            if (Upper > Lower)
                Console.Write(s.ToUpper());
            else
                Console.Write(s.ToLower());
        }
    }

}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A.Word
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string cap = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
            string sma = "abcdefghijklmnopqrstuvwxyz";
            int sumcap = 0;
            int sumsma = 0;
            for (int i = 0; i < input.Length; i++)
            {
                for (int j = 0; j < cap.Length; j++)
                {
                    if ( input[i]== cap[j])
                    {
                        sumcap++;
                    }
                    else if ( input[i] == sma[j])
                    {
                        sumsma++;
                    }
                }
            }
            if (sumsma > sumcap)
            {
                input = input.ToLower();
                Console.WriteLine(input);
            }
            else
            {
                input = input.ToUpper();
                Console.WriteLine(input);
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace words
{
    class Program
    {
        static void Main()
        {
            String WorD = Console.ReadLine();
            String WORD = WorD.ToUpper();
            Int32 n = 0;
            Int32 N = 0;
            for(int i=0;i<n;i++)
            {
                if(WorD[i]!=WORD[i])
                {
                    n++;
                }
                else
                {
                    N++;
                }
            }
            if(N>n)
            {
                Console.WriteLine("{0}", WORD);
            }
            else
            {
                Console.WriteLine("{0}",WorD.ToLower());
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Learning
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int len = s.Length;
            int cnt = 0;
            for (var i = 0; i < len; ++i) {
                if(char.IsLower(s[i])){
                    cnt++;
                }
            }
            if(cnt > len/2)
                Console.Out.WriteLine(s.ToLower());
            else
                Console.Out.WriteLine(s.ToUpper());
            Console.ReadLine();
        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Learning
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int len = s.Length;
            int lower = 0;
            int upper = 0;
            for (var i = 0; i < len; ++i) {
                if (char.IsLower(s[i]))
                {
                    lower++;
                }
                else {
                    upper++;
                }
            }
            if(lower <= upper)
                Console.Out.WriteLine(s.ToLower());
            else
                Console.Out.WriteLine(s.ToUpper());
            //Console.ReadLine();
        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Learning
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int len = s.Length;
            int cnt = 0;
            for (var i = 0; i < len; ++i) {
                if(char.IsLower(s[i])){
                    cnt++;
                }
            }
            if(cnt >= len/2)
                Console.Out.WriteLine(s.ToLower());
            else
                Console.Out.WriteLine(s.ToUpper());
            Console.ReadLine();
        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cf59a
{
    class Program
    {
        static void Main(string[] args)
        {
            string x;
            x = Console.ReadLine();
            int low=0;
            int up=0;

            for(int i=0; i<x.Length; i++){
                if((int)x[i]>=65&&(int)x[i]<=90){
                    up++;
                }
                else if((int)x[i]>=97&&(int)x[i]<=122){
                    low++;
                }
            }
            if(low<=up){
                Console.Write(x.ToLower());
            }
            else{
                Console.Write(x.ToUpper());
            }
        }
    }
}

using System;
class Program
{
    static void Main()
    {
        var w = Console.ReadLine().ToCharArray();
        int u = 0, l = 0;
        for (int i = 0; i < w.Length; i++)
        {
            var z = char.IsUpper(w[i]) ? u++ : l++;
        }
        Console.WriteLine(u > l ? w.ToString().ToUpper() : w.ToString().ToLower());
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Olymp6
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int c = 0;
            for (int i=0; i<s.Length; i++)
            {
                if (s[i]>='a' && s[i] <= 'z')
                {
                    c++;
                }
            }
            if (c >= c - s.Length)
            {
                s=s.ToLower();
            }
            else
            {
                s=s.ToUpper();
            }
            Console.WriteLine(s);
            //Console.ReadKey();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication13
{

    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            char[] s1 = s.ToCharArray();
            char[] alphapeat = "qwertyuiopasdfghjklzxcvbnm".ToCharArray();
            char[] alphapeatupp = "QWERTYUIOPASDFGHJKLZXCVBNM".ToCharArray();
            int up = 0;
            int down = 0;
            string result = " ";

            for (int i = 0; i < s.Length; i++)
            {
                for (int x = 0; x < alphapeat.Length; x++)
                {
                    if (s1[i]==alphapeat[x])
                    {
                        down++;
                        break;
                    }
                    else if (s1[i]==alphapeatupp[x])
                    {
                        up++;
                        break;
                    }

                }

            }
            if (up>down)
            {
                result = s.ToUpper();
            }
            else if(down>up)
            {
                result = s.ToLower();
            }
            Console.WriteLine(result);
        }
    }
}

using System;

    class Program
    {
        public static bool IsMostlyUppercase(string word)
        {
            int countUpper = 0;
            int countLower = 0;

            for (int i = 0; i < word.Length; i++)
            {
                if (char.IsUpper(word[i]))
                {
                    countUpper++;
                }
                else
                {
                    countLower++;
                }
            }

            if (countUpper > countLower)
            {
                return true;
            }

            return false;
        }
        static void Main(string[] args)
        {
            string word = Console.ReadLine();
            if (IsMostlyUppercase(word))
            {
                Console.WriteLine(word.ToUpper());
            }
            else
            {
                Console.WriteLine(word.ToUpper());
            }

        }
    }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            string word = Convert.ToString(Console.ReadLine());
            string resultWord = "";

            int countLower = 0;
            int countUpper = 0;
            for (int i = 0; i < word.Length; i++)
            {
                if ((int)word[i] > 65 && (int)word[i] < 91)
                    countUpper++;
                else
                    countLower++;
            }

            if (countUpper > countLower)
                resultWord = word.ToUpper();
            else
                resultWord = word.ToLower();

            Console.WriteLine(resultWord);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodeForce
{
    class Program
    {
        static void Main(string[] args)
        {
            string S = Console.ReadLine();
            int C1=0 , C2=0;
            foreach (var item in S) if (item > 96) C1++; else C2++;
            bool Case = C2 > C1;
            string New_S = "";
            if (Case) foreach (var item in S) New_S += item > 96 ? (char)(item -32 ): (char)item;
            else foreach (var item in S) New_S += item <= 97 ? (char)(item +32 ): (char)item;
            Console.WriteLine(New_S);
        }
    }
}

using System;

public class Test
{

	public static int maxStep = 5;

	public static void Main()
	{
		string word = Console.ReadLine();

		int big_count = 0;

		for(int i = 0; i < word.Length; i++){
			if(Char.IsUpper(word[i]))
				big_count++;
		}

		if(word.Length >= big_count){
			word = word.ToLower();
		}else{
			word = word.ToUpper();
		}

		Console.WriteLine($"{word}");
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A.word_code_forces
{
    class Program
    {
        static void Main(string[] args)
        {
            string word = Console.ReadLine();
            int l = 0;
            for(int i=0;i < word.Length; i++)
            {
                if(char.IsUpper(word[1]))
                {
                    l++;
                }
            }
            if (l>(word.Length/2))
            {
                Console.WriteLine(word.ToUpper());
            }
            else
            {
                Console.WriteLine(word.ToLower());
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForcesCSharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            int u = 0;
            int l = 0;

            for (int i = 0; i < input.Length; i++)
            {
                if (char.IsLower(input[i])) l++;
                else if (char.IsUpper(input[i])) u++;
            }

            if (u == l)
            {
                Console.WriteLine(input);
            }
            else Console.WriteLine(l > u ? input.ToLower() : input.ToUpper());
        }
    }
}

using System;
using System.Linq;

namespace Zada4ki
{
    class Program
    {
        static void Main(string[] args)
        {
            int Up = 0, Down = 0;
            string Str = Console.ReadLine();
            char[] ar = Str.ToCharArray();
            for (int i = 0; i < Str.Length; i++)
            {
                if (char.IsUpper(ar[i])) Up++;
                else Down++;
            }
            if (Up > Down) Str.ToUpper();
            else Str.ToLower();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            var line = Console.ReadLine();

            var allCharsCount = line.Length;
            var upperCharsCount = line.Count(x => char.IsUpper(x));

            if(upperCharsCount > allCharsCount)
                Console.WriteLine(line.ToUpper());
            else
                Console.WriteLine(line.ToLower());
        }

    }
}

using System;

public class Program
    {
        static void Main(string[] args)
        {
            var s = Console.ReadLine();
int lower = 0; int upper = 0;
            foreach(var ch in s)
{
if (ch > 'A' && ch < 'Z')
upper++;
else if (ch > 'a' && ch < 'z')
lower++;
}
if (lower >= upper)
Console.WriteLine(s.ToLower());
else
Console.WriteLine(s.ToUpper());
        }
    }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace p_a
{
    class Program
    {
        static void Main(string[] args)
        {
            string a;
            int l;
            int u = 0;
            int low = 0;
            a = Console.ReadLine();
            l = a.Length;
            for(int i=0;i<l;i++)
            {
                if (char.IsLower(a[i]))
                    low++;
                else
                    u++;
            }
            if (low > u)
                a = a.ToLower();
            else
                a = a.ToUpper();
            Console.WriteLine(a);

        }
    }
}

using System;
class Program{
    static void Main(string[] args){
        string s = Console.ReadLine();
        int q = 0;
        for(int i = 0; i < s.Length; i++)
        {
            if (char.IsUpper(s[i])) q++;
            else q--;
        }
        if (q > 0) s.ToUpper();
        else s.ToLower();
        Console.WriteLine(s);
    }
}

using System;

namespace lol
{
    class lolClass
    {
        private static void Main()
        {
            string s = Console.ReadLine();
            int up = 0, low = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] < 'Z' && s[i] > 'A')
                    up++;
                else
                    low++;
            }
            if (up > low) Console.WriteLine(s.ToUpper());
            else Console.WriteLine(s.ToLower());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace word
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write(" the word : ");
            string word = Console.ReadLine();
            Console.WriteLine("===================");
            char[] cword;
            cword = word.ToCharArray();
             int z = 0;
            for(int i=0;i<cword.Length;i++)
            {

                if((int)(cword[i])>91)
                {
                    z++;
                }
            }
            if(z>=((cword.Length+1)/2))
            {
                for(int i=0;i<cword.Length;i++)
                {
                    if (cword[i] > 91)
                    {

                        Console.Write((char)cword[i]);

                    }
                    if(cword[i]<91)
                    {
                        cword[i] += (char)32;
                        Console.Write((char)cword[i]);

                    }

                }
            }

            else{
                for (int i = 0; i < cword.Length; i++)
                {
                    if (cword[i] < 91)
                    {

                        Console.Write((char)cword[i]);

                    }
                    if (cword[i] > 91)
                    {
                        cword[i] -= (char)32;
                        Console.Write((char)cword[i]);

                    }

                }
               }
            Console.WriteLine(" ");

            Console.WriteLine("===================");

        }
    }
}

using System;

namespace _59A
{
    class Program
    {
        static void Main()
        {
            var word = Console.ReadLine();
            var lower = 0;
            var upper = 0;
            for (var i = 0; i < word.Length; i++)
            {
                if (char.IsLower(word[i]))
                    lower++;
                else
                    upper++;
            }

            for (var i = 0; i < word.Length; i++)
                Console.Write(lower > upper ? char.ToLower(word[i]) : char.ToUpper(word[i]));

            Console.Write(Environment.NewLine);
        }
    }
}

using System;

namespace _59_A_Word
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int u=0,l=0;

            for (int i = 0; i < s.Length; i++)
            {
                if (Char.IsUpper(s[i]))
                {
                    u += 1;
                }

                l += 1;
            }

            if(u > l)
            {
                s.ToUpper();
            }
            s.ToLower();

            Console.WriteLine(s);
        }
    }
}

using System;

namespace _59_A_Word
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int u=0,l=0;

            for (int i = 0; i < s.Length; i++)
            {
                if (Char.IsUpper(s[i]))
                {
                    u += 1;
                }

                l += 1;
            }

            if(u > l)
            {
                s.ToUpper();
            }
            s.ToLower();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace plagin
{
    class Program
    {
        static void Main(string[] args)
        {

            string s = Console.ReadLine();
            //if (s[0] >= 'A' &&s[0]<='Z' && s[s.Length - 1] <= 'z' && s[s.Length - 1] >= 'a'  || s[0] >= 'a' && s[s.Length - 1] <= 'z') { Console.Write(s.ToLower()); }
            //else
            int kol=0;
            foreach (char c in s) {
                if (c <= 'Z') kol++;
            }
            if (s[0] >= 'A' && s[s.Length - 1] <= 'Z' || kol> s.Length) { Console.WriteLine(s.ToUpper()); } else { Console.WriteLine(s.ToLower()); }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace plagin
{
    class Program
    {
        static void Main(string[] args)
        {

            string s = Console.ReadLine();
            if (s[0] >= 'A' && s[s.Length - 1] <= 'z' && s[s.Length - 1] >= 'a'  || s[0] >= 'a' && s[s.Length - 1] <= 'z') { Console.Write(s.ToLower()); }
            else if (s[0] >= 'A' && s[s.Length - 1] <= 'Z') { Console.WriteLine(s.ToUpper()); }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace plagin
{
    class Program
    {
        static void Main(string[] args)
        {

            string s = Console.ReadLine();
            //if (s[0] >= 'A' &&s[0]<='Z' && s[s.Length - 1] <= 'z' && s[s.Length - 1] >= 'a'  || s[0] >= 'a' && s[s.Length - 1] <= 'z') { Console.Write(s.ToLower()); }
            //else
            if (s[0] >= 'A' && s[s.Length - 1] <= 'Z') { Console.WriteLine(s.ToUpper()); } else { Console.WriteLine(s.ToLower()); }

        }
    }
}

using System;

namespace CaseCorrector
{
    class Program
    {
        static void Main(string[] args)
        {
            string word = Console.ReadLine();

            int upperCase = 0, lowercase = 0;

            foreach (char character in word)
            {
                if ((int)character < 90)
                    upperCase++;
                else
                    lowercase++;
            }

            if (upperCase > lowercase)
                Console.WriteLine(word.ToUpper());
            else if (lowercase > upperCase)
                Console.WriteLine(word.ToLower());
            else
                Console.WriteLine(word.ToLower());
        }
    }
}

using System;

namespace CodeForcesTasks
{
	class Program
	{
		static void Main(string[] args)
		{
			var str = Console.ReadLine().ToCharArray();
			int upperCount = 0;
			int lowerCount = 0;
			var res = string.Empty;

			if (str.Length < 100)
			{
				foreach (var item in str)
				{
					if (char.IsUpper(item))
					{
						upperCount++;
					}
					else
					{
						lowerCount++;
					}
				}
				if (lowerCount >= upperCount)
				{
					foreach (var item in str)
					{
						res += item;
					}
					Console.WriteLine(res.ToLower());
				}
				else
				{
					foreach (var item in str)
					{
						res += item;
					}
					Console.WriteLine(res.ToUpper());
				}
			}

		}
	}
}

using System;
using System.Linq;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            int upper = str.ToCharArray().Where(x => x >= 'A' || x <= 'Z').Count();
            Console.WriteLine(upper > str.Length / 2 ? str.ToUpper() : str.ToLower());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main()
        {
            var s = Console.ReadLine();
            var n = s.Length;
            if (n == 1)
            {
                Console.WriteLine(s);
            }
            else
            {
                var list = new List<char>();
                for (byte i = 0; i < n; i++)
                {
                    list.Add(s[i]);
                }
                var c = list.Where(x => char.IsLower(x)).Count();
                if ((c == 0) || (c == n))
                {
                    Console.WriteLine(s);
                }
                else
                {
                    if (c >= s.Length/2)
                    {
                        foreach (var c1 in list)
                        {
                            Console.Write(char.ToLower(c1));
                        }
                    }
                    else
                    {
                        foreach (var c1 in list)
                        {
                            Console.Write(char.ToUpper(c1));
                        }
                    }
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.IO;

public static class XXX
{
    private static void Main()
    {
        int counter =0;
        string str = Console.ReadLine().ToLower();
        foreach(var x in str){
            if(x>='A' && x<='Z'){
                counter++;
            }
        }
        if(counter>=str.Length/2){
            Console.WriteLine(str.ToUpper());
        }
        else Console.WriteLine(str.ToLower());
        return;
    }
}

using System;
using System.Collections.Generic;
using System.IO;

public static class XXX
{
    private static void Main()
    {
        int counter =0;
        string str = Console.ReadLine().ToLower();
        foreach(char x in str){
            if(char.IsUpper(x)){
                counter++;
            }
        }
        if(counter>str.Length/2){
            Console.WriteLine(str.ToUpper());
        }
        else Console.WriteLine(str.ToLower());
        return;
    }
}

using System;
using System.Collections.Generic;
using System.IO;

public static class XXX
{
    private static void Main()
    {
        int counter =0;
        string str = Console.ReadLine().ToLower();
        foreach(var x in str){
            if(x>='A' && x<='Z'){
                counter++;
            }
        }
        if(counter>str.Length/2){
            Console.WriteLine(str.ToUpper());
        }
        else Console.WriteLine(str.ToLower());
        return;
    }
}

using System;
using System.Collections.Generic;
using System.IO;

public static class XXX
{
    private static void Main()
    {
        int counter =0;
        string str = Console.ReadLine().ToLower();
        foreach(char x in str){
            if(char.IsUpper(x)){
                counter++;
            }
        }
        Console.Write(counter);
        if(counter>str.Length/2){
            Console.WriteLine(str.ToUpper());
        }
        else Console.WriteLine(str.ToLower());
        return;
    }
}

using System;
using System.Linq;

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            var s = Console.ReadLine();
            var s1 = s.ToLower();

            var diff = 0;

            for (var i = 0; i < s.Length; i++)
            {
                if (s[i] != s1[i])
                    diff++;
            }

            if (diff <= s.Length)
                Console.WriteLine(s1);
            else
                Console.WriteLine(s.ToUpper());
        }
    }
}

using System;

class Program
{
    static void Main(string[] args)
    {
        string input = Console.ReadLine();
        int small = 0, cap = 0;

        foreach (var i in input)
        {
            if (i <= 'z') small++;
            else cap++;
        }

        if (small >= cap)
        {
            Console.WriteLine(input.ToLower());
        }
        else
        {
            Console.WriteLine(input.ToUpper());
        }
    }
}

using System;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            var s = Console.ReadLine();

            if (s.Length>=1 && s.Length<=100)
            {
                s = s.ToLower();
                Console.WriteLine(s);
            }
        }
    }
}

using System;

namespace A._Word___Problem___59A___Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
             //----------------------------------------------------------------//
            ////    Annotation:    A. Word (Problem - 59A - Codeforces)    ////
            //--------------------------------------------------------------//

            var input = Console.ReadLine();
            if (input.Length<=Math.Pow(10,3))
            {
                var output = "";
                for (int i = 0; i < input.Length; i++)
                {
                    if (i==0)
                    {
                        output += input[i].ToString().ToUpper();
                    }
                    else
                    {
                        output += input[i];
                    }
                }
                Console.WriteLine($"{output}");
            }
        }
    }
}

using System;
using System.Collections.Generic;

namespace CodeForces.Task59A
{
    class Program
	{
		static void Main(string[] args)
		{
			var task = new Task();
		}
	}

    public interface IGeneralInterface
	{
		void Input();

		void Output();
	}

    public class Task : IGeneralInterface
	{
		private const int MIN = 1;
		private const int MAX = 100;
		private List<char> _listUp = new List<char>();
		private List<char> _listLow = new List<char>();
		private string _str;

		public Task()
		{
			Input();
			Output();
		}

		public void Input()
		{
			_str = Console.ReadLine();
			if(InRange())
				Distribute();
		}

		private bool InRange()
		{
			if (MIN < _str.Length && _str.Length < MAX)
				return true;

			return default;
		}

		private void Distribute()
		{
			foreach (var item in _str)
			{
				if(Char.IsUpper(item))
					_listUp.Add(item);
				else
					_listLow.Add(item);
			}
		}

		public void Output()
		{
			if(_listUp.Count > _listLow.Count && _listUp.Count != _listLow.Count)
				Console.WriteLine(_str.ToUpper());
			else
				Console.WriteLine(_str.ToLower());
		}
	}
}

using System;
using System.Linq;
public class Program
{
	public static void Main()
	{
		string word = Console.ReadLine();
		int lengthOfWord = word.Count();
		int upperCount = 0;
		foreach(char c in word){
			if(Char.IsUpper(c)){
				upperCount+=1;
			}
		}
		if((lengthOfWord-upperCount) == upperCount){
			Console.WriteLine(word.ToLower());
		}else{
			Console.WriteLine(word.ToUpper());
		}

	}
}

using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            int u=0, l=0;
            string w = Console.ReadLine();
            char[] x = w.ToCharArray();
            for (int i = 0; i < x.Length; i++)
            {
                if (char.IsUpper(x[i]))
                    u++;
                else
                    i++;
            }
            if (u > l)
                Console.WriteLine(w.ToUpper());
            else
                Console.WriteLine(w.ToLower());

        }

    }

}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Codeforces
{
    class Class17
    {
        public static void Main()
        {
            string s = Console.ReadLine();
            string ss1 = s.ToLower();
            string ss2 = s.ToUpper();
            int cnt1 = 0;
            int cnt2 = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] != ss1[i])
                    cnt1++;
            }
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] != ss2[i])
                    cnt2++;
            }
            if (cnt1 < cnt2)
                Console.WriteLine(ss1);
            else
                Console.WriteLine(ss2);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Codeforces
{
    class Class17
    {
        public static void Main()
        {
            string s = Console.ReadLine();
            string ss1 = s.ToLower();
            string ss2 = s.ToUpper();
            int cnt1 = 0;
            int cnt2 = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] != ss1[i])
                    cnt1++;
            }
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] != ss2[i])
                    cnt2++;
            }
            if (cnt1 < cnt2)
                Console.WriteLine(ss1);
            if (cnt1 >= cnt2)
                Console.WriteLine(ss2);

        }
    }
}

using System;
class Test {
    static void Main() {
        string str = Console.ReadLine();
        bool p = char.IsUpper(str[0]);
        bool q = char.IsUpper(str[str.Length-1]);
        if(p && q){
            Console.WriteLine(str.ToUpper());
        }else{
            Console.WriteLine(str.ToLower());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string line = Console.ReadLine();
            int lowerCount = 0;
            foreach (char letter in line)
            {
                if (letter >= 'a' && letter <= 'z')
                {
                    lowerCount++;
                }
            }
            if (line.Length / 2 > lowerCount)
            {
                Console.WriteLine(line.ToUpper());
            }
            else
            {
                Console.WriteLine(line.ToLower());
            }
        }
    }
}

using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();

            int up = 0;
            for (int i = 0; i < s.Length; i++) {
                if (Char.IsUpper(s[i])) up++;
            }
            if (up >= s.Length * 0.5)
            {
                Console.WriteLine(s.ToUpper());
            }
            else {
                Console.WriteLine(s.ToLower());
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForces
{
    public class Test
    {
        public static void Main()
        {
            string word = Console.ReadLine();
            int upperCount = 0;
            int lowerCount = 0;
            for (int i = 0; i < word.Length; i++)
            {
                if (word[i] > 65 && word[i] < 97)
                {
                    upperCount++;
                }
                else
                {
                    lowerCount++;
                }
            }
            if (upperCount > lowerCount)
            {
                Console.WriteLine(word.ToUpper());
            }
            else
            {
                Console.WriteLine(word.ToLower());
            }
        }
    }
}

using System;

namespace A._Word___Problem___59A___Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
             //----------------------------------------------------------------//
            ////    Annotation:    A. Word (Problem - 59A - Codeforces)    ////
            //--------------------------------------------------------------//

            var input = Console.ReadLine();
            if (input.Length<=Math.Pow(10,3))
            {
                var output = "";
                for (int i = 0; i < input.Length; i++)
                {
                    if (i==0)
                    {
                        output += input[i].ToString().ToUpper();
                    }
                    else
                    {
                        output += input[i];
                    }
                }
                Console.WriteLine(output);
            }
        }
    }
}

using System;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            String s = Console.ReadLine();

            if (s.Length>=1 && s.Length<=100)
            {
                s = s.ToLower();
                Console.WriteLine(s);
            }
        }
    }
}

using System;

namespace A._Word___Problem___59A___Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
             //----------------------------------------------------------------//
            ////    Annotation:    A. Word (Problem - 59A - Codeforces)    ////
            //--------------------------------------------------------------//

            string input = Console.ReadLine();
            if (input.Length<=Math.Pow(10,3))
            {
                string output = "";
                for (int i = 0; i < input.Length; i++)
                {
                    if (i==0)
                    {
                        output += input[i].ToString().ToUpper();
                    }
                    else
                    {
                        output += input[i];
                    }
                }
                Console.WriteLine(output);
            }
        }
    }
}

using System;

namespace A._Word___Problem___59A___Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine();
            if (input.Length<=Math.Pow(10,3))
            {
                var output = "";
                for (int i = 0; i < input.Length; i++)
                {
                    if (i==0)
                    {
                        output += input[i].ToString().ToUpper();
                    }
                    else
                    {
                        output += input[i];
                    }
                }
                Console.WriteLine(output);
            }
        }
    }
}

using System;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();

            if (s.Length>=1 && s.Length<=100)
            {
                String d = s.ToUpper();

                if (String.Compare(s,d)==0)
                {
                    Console.WriteLine(s);
                }
                else
                {
                    s = s.ToLower();
                    Console.WriteLine(s);
                }
            }
        }
    }
}

using System;

namespace A._Word___Problem___59A___Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
             //----------------------------------------------------------------//
            ////    Annotation:    A. Word (Problem - 59A - Codeforces)    ////
            //--------------------------------------------------------------//

            var input = Console.ReadLine();
            if (input == null || !(input.Length <= Math.Pow(10, 3))) return;
            var output = "";
            for (int i = 0; i < input.Length; i++)
            {
                if (i==0)
                {
                    output += input[i].ToString().ToUpper();
                }
                else
                {
                    output += input[i];
                }
            }
            Console.WriteLine($"{output}");
        }
    }
}

using System;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            var s = Console.ReadLine();

            if (s.Length>=1 && s.Length<=100)
            {
                Console.WriteLine(s.ToLower());
            }
        }
    }
}

using System;

namespace A._Game_23
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            if (input.Length<=Math.Pow(10,3))
            {
                string x = "";
                for (int i = 0; i < input.Length; i++)
                {
                    if (i==0)
                    {
                        x += input[i].ToString().ToUpper();
                    }
                    else
                    {
                        x += input[i];
                    }
                }

                Console.WriteLine(x);
            }

        }

    }
}

using System;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();

            if (s.Length>=1 && s.Length<=100)
            {
                s = s.ToLower();
                Console.WriteLine(s);
            }
        }
    }
}

using System;

namespace Practice
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = (Console.ReadLine());
            Console.WriteLine(SolveProblem(s));
            Console.ReadLine();
        }

        static string SolveProblem (string s)
        {
            int lowerCount = 0;
            int higherCount = 0;
            for (int i = 0; i < s.Length ;i++)
            {
                if (char.IsLower( s [i]))
                {
                    lowerCount++;
                } else
                {
                    higherCount++;
                }

                if (lowerCount > (s.Length) / 2)
                {
                    return s.ToLower();
                }
            }
            return s.ToUpper();
        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace MY_Sheet
{
    class Program
    {
        static void Main(string[] args)
        {
            var str = Console.ReadLine();
            int n = 0;

            for (int i = 0; i < str.Length; i ++)
            {
                if (char.IsLower(str[i]))
                    n++;
            }
            if (n >1)
                Console.WriteLine(str.ToLower());
            else
                Console.WriteLine(str.ToUpper());
        }
    }
}

using System;
using System.Text.RegularExpressions;

namespace Codeforces
{
    class Codeforces
    {
        public static void Main(string[] args)
        {
            string word = Console.ReadLine();

            int lower = Regex.Matches("a-z", word).Count;
            int upper = Regex.Matches("A-Z", word).Count;

            Console.Write(lower > upper ? word.ToLower() : word.ToUpper());
        }
    }
}

using System;
using System.Text.RegularExpressions;

namespace Codeforces
{
    class Codeforces
    {
        public static void Main(string[] args)
        {
            string word = Console.ReadLine();

            int lower = Regex.Matches("[a-z]", word).Count;
            int upper = Regex.Matches("[A-Z]", word).Count;

            Console.Write(lower > upper ? word.ToLower() : word.ToUpper());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp19
{
    class Program
    {
        static void Main(string[] args)
        {
            int upper = 0;
            int lower = 0;
            string word = Console.ReadLine();
            for(int i =0; i<word.Length; i++)
            {
                if(word[i] >=61 && word[i]<=122)
                {
                    lower++;
                }
                else
                {
                    upper++;
                }
            }
            if(lower>=upper)
            {
                Console.WriteLine(word.ToLower());
            }
            else
            {
                Console.WriteLine(word.ToUpper());
            }

        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CODING_C_SHARP
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            str = str.ToLower();
            Console.Write(str);
        }
    }
}

using System;

namespace Word_problem
{
    class Program
    {
        static void Main(string[] args)
        {

            string word = Console.ReadLine();
            int lowerCaseLetterCount = 0;
            int upperCaseLetterCount = 0;

            foreach (var letter in word)
            {
                if (letter > 97 && letter < 122)
                {
                    lowerCaseLetterCount++;
                }
                else
                {
                    upperCaseLetterCount++;
                }
            }

            if (upperCaseLetterCount > lowerCaseLetterCount)
                Console.WriteLine(word.ToUpper());
            else
                Console.WriteLine(word.ToLower());
        }
    }
}

using System;
namespace Code
{
    class WordCapitalizationProblem
    {
        public static void Main(string[] args)
        {
            var word=Console.ReadLine().ToCharArray();
            word[0]=Char.ToUpper(word[0]);
           foreach (var c in word)
           {
               Console.Write(c);
           }
        }
    }
}

using System;

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            string Input = Console.ReadLine();
            if (Input.Length <= 0)
                return;
            int upercase = 0, lowercase = 0;
            foreach (var item in Input)
            {
                if (Char.IsUpper(item))
                    upercase++;
                else
                    lowercase++;
            }
            if (upercase > lowercase)
               Input = Input.ToUpper();
            else
                Input = Input.ToLower();
        }
    }
}

using System;

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            string Input = Console.ReadLine();
            int upercase = 0, lowercase = 0;
            foreach (var item in Input)
            {
                if (Char.IsUpper(item))
                    upercase++;
                else
                    lowercase++;
            }
            if (upercase > lowercase)
               Input = Input.ToUpper();
            else
                Input = Input.ToLower();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;

namespace ؤخيثبخقؤث
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int low = 0 , upper = 0 ;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] > 97) low++;
                else upper++;
            }
            if (low > upper) Console.WriteLine(s.ToLower());
            else Console.WriteLine(s.ToUpper());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;

namespace ؤخيثبخقؤث
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int low = 0 , upper = 0 ;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] > 97) low++;
                else upper++;
            }
            if (low >= upper) Console.WriteLine(s.ToLower());
            else Console.WriteLine(s.ToUpper());
        }
    }
}

using System;
class Demo
{
    static void Main()
    {
        byte cnt = 0;
        string s = Console.ReadLine();
        for (byte i = 0; i < s.Length; i++)
            if (char.IsUpper(s[i]))
                cnt++;
            else cnt--;
        Console.WriteLine(cnt>=0?s.ToUpper():s.ToLower());
    }
}

using System;
class Demo
{
    static void Main()
    {
        int cnt = 0;
        string s = Console.ReadLine();
        for (int i = 0; i < s.Length; i++)
            if (char.IsUpper(s[i]))
                cnt++;
            else cnt--;
        Console.WriteLine(cnt >= 0 ? s.ToUpper() : s.ToLower());
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Word
{
    class Program
    {
        static void Main(string[] args)
        {
            var Input = Console.ReadLine();
            var Lower = 0;
            var Upper = 0;

            foreach (var item in Input)
            {
                if (char.IsLower(item))
                    Lower++;
                else
                    Upper++;
            }

            Console.WriteLine(Lower>Upper ? Input.ToLower() : Input.ToUpper());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CR_111_A
{
    class Program
    {

        static void Main()
        {
            //int k = int.Parse(Console.ReadLine());
            //string[] tmp = Console.ReadLine().Split(' ');
            char[] str = Console.ReadLine().ToArray();
            char[] it = new char[100];
            int k = 0 , countM = 0 , countB = 0;
            for (int i = 0; i < str.Length; i++)
            {
                if (char.IsUpper(str[i]))
                    countB++;
                else
                    countM++;
            }
            if (countB > countM)
                for (int i = 0; i < str.Length; i++)
                    it[k++] = char.ToUpper(str[i]);
            else
                for (int i = 0; i < str.Length; i++)
                    it[k++] = char.ToLower(str[i]);
            for (int i = 0; i < it.Length; i++)
                Console.Write(it[i]);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;
using System.Numerics;
namespace sharp_learning
{
    class Class1
    {
        static void Main()
        {
            string s = Console.ReadLine();
            BigInteger big = 0, small = 0;
            foreach(var i in s)
            {
                if (i >= 'a')
                    small++;
                else
                    big++;
            }
            if (small <= big)
                Console.WriteLine(s.ToLower());
            else
                Console.WriteLine(s.ToUpper());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;
using System.Numerics;
namespace sharp_learning
{
    class Class1
    {
        static void Main()
        {
            string s = Console.ReadLine();
            BigInteger big = 0, small = 0;
            foreach(var i in s)
            {
                if (i >= 'a')
                    small++;
                else
                    big++;
            }
            Console.WriteLine(small);
            if (small >= big)
                Console.WriteLine(s.ToLower());
            else
                Console.WriteLine(s.ToUpper());
        }
    }
}

using System;

namespace _59a
{
    class Program
    {
        static void Main(string[] args)
        {
            string t = Console.ReadLine();
            int n = t.Length;
            char[] s = new Char[105];
            int p = 0, q = 0;
            for (int i = 0; i < n; ++i)
            {
                s[i] = t[i];
                if (Char.IsLower(s[i])) ++p;
                else ++q;
            }
            if (p < q)
            {
                for (int i = 0; i < n; ++i)
                    if (Char.IsLower(s[i])) s[i] = Char.ToUpper(s[i]);
            }
            else for (int i = 0; i < n; ++i)
                    if (Char.IsUpper(s[i])) s[i] = Char.ToLower(s[i]);
            Console.WriteLine(s);
        }
    }
}