IT City company developing computer games invented a new way to reward its employees. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction. Every time when the next number of sales is divisible by all numbers from 2 to 10 every developer of this game gets a small bonus.A game designer Petya knows that the company is just about to release a new game that was partly developed by him. On the basis of his experience he predicts that n people will buy the game during the first month. Now Petya wants to determine how many times he will get the bonus. Help him to know it.

The only line of the input contains one integer n (1 ≤ n ≤ 1018) — the prediction on the number of people who will buy the game.

Output one integer showing how many numbers from 1 to n are divisible by all numbers from 2 to 10.

#include<stdio.h>
int main()
{
    long long n,x;
    scanf("%lld",&n);
    x = n/2520;
    printf("%lld\n",x);
    return 0;
}

#include<stdio.h>
int main()
{
	unsigned long long n;
	scanf("%lld",&n);
	printf("%lld\n",n/2520);
}

#include <stdio.h>

int main ()
{
    unsigned long long n;

    scanf("%llu", &n);
    if(n < 2520)
    {
        printf("0\n");
    }

    else
    {
        printf("%llu\n", n / 2520);

    }

    return 0;
}

#include<stdio.h>
int main()
{
    long long int n,k;
    scanf("%I64d",&n);
    k=n/2520;
    printf("%I64d\n",k);
    return 0;
}

#include<stdio.h>
int main(){
unsigned long long int a,b,c,s,i,l,j,k,n;
scanf("%llu",&n);
printf("%llu\n",n/2520);

}

#include<stdio.h>
int main ()
{
    long long int n;
    scanf("%lld",&n);
    printf("%lld",n/2520);
}

#include <stdio.h>
int main ()
{
    long long int n ;
    scanf("%lli",&n);
    n=n/2520;
    printf("%lli",n);
}

#include<stdio.h>

/*int f(long long int i)
{
    if((i%5==0)&&(i%7==0)&&(i%9==0)&&(i%8==0))
        return 1;
    else return 0;
}*/
int main()
{
    long long int n,s;
    //n=pow(10,18);
    //  printf("%llu",n);
    scanf("%lld",&n);
     //printf("%lld",n);
    //for(i=2520; i<=n; i=i+2520)
    s=n/2520;
    printf("%lld",s);
    return 0;
}

#include<stdio.h>
int main()
{
    long long int n,ans;
    scanf("%I64d", &n);
    ans=n/2520;
    printf("%I64d", ans);
}

#include<stdio.h>
int main ()
{
    long long int n,i,count=0;
    scanf("%lld",&n);
    printf("%lld",n/2520);
    return 0;
}

#include<stdio.h>
int main()
{
    long long int n, s;
    scanf("%I64d", &n);
    s=(n/2520);
    printf("%I64d\n", s);
    return 0;
}

#include<stdio.h>

int main(void)
{
	long long int n, i, div = 2520;

	scanf("%lld", &n);
	printf("%lld", n/div);

	return 0;
}

#include<stdio.h>
int main(){
long long int n;
scanf("%lld",&n);
printf("%lld",n/2520);
return 0;
}

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

int main() {
    unsigned long long a;
    scanf("%lld", &a);
    printf("%lld", a/2520);
    return 0;
}

#include <stdio.h>
long long x;
int main()
{
	scanf("%lld",&x);
	printf("%lld\n",x/2520);
	return 0;
}

#include<stdio.h>

int main()
{
    long long int n,x;
    scanf("%I64d",&n);
    x=n/2520;
    printf("%I64d\n",x);
    return 0;
}

#include<stdio.h>
#include<math.h>

int main(){

long long int i,j;
scanf("%I64d",&i);

j=8*9*5*7;
i=i/j;
printf("%I64d",i);

return 0;
}

#include <stdio.h>
#include <math.h>
int main(){
	long long int n,ans;
	scanf("%lld",&n);
	ans=n/2520;
	printf("%lld",ans);
	return 0;
}

#include <stdio.h>
int main()
{
    long long int n;
    scanf("%lld",&n);
    printf("%lld\n",n/2520);
}

#include<stdio.h>
int main()
{
    long long int n,c ;
    int i,j,count=0,count2=0;
    scanf("%lld",&n);
    c=n/2520;

    printf("%lld",c);
    return 0;
}

#include<stdio.h>
int main()
{
    unsigned long long int n;
    while(scanf("%llu", &n)==1)
    {
        printf("%llu\n", n/2520);
    }
    return 0;
}

#include<stdio.h>
long long int n;
int main()
{
    scanf("%lld",&n);
    printf("%lld",n/2520);
}

#include<stdio.h>

int main()
{
    long long int n;
    scanf("%lld",&n);

    long long int answer=n/2520;
    printf("%lld",answer);
    return 0;
}

#include<stdio.h>

int main()
{
    long long int n;

    scanf("%I64d", &n);

    printf("%I64d", n/2520);

    return 0;
}

#include<stdio.h>
#include<math.h>

int main()
{
	long long int i,j,k,l,m,n;
	scanf("%I64d",&n);
	j=2520;
	printf("%I64d",n/j);
}

#include<stdio.h>
int main(){
    long long n;
    scanf("%lld",&n);
    long long simple=2*2*2*3*3*5*7;
    printf("%lld",n/simple);
}

#include<stdio.h>
int main(){
    unsigned long long int n;
    scanf("%llu",&n);
    printf("%llu",n/2520);
}

#include<stdio.h>
int main()
{
long long int n;
scanf("%lld",&n);
printf("%lld\n",n/2520);
return 0;
}

#include<stdio.h>
int main()
{
    long long int n;
    scanf("%lld",&n);
    printf("%lld",n/2520);
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<inttypes.h>
int main(){
	long long  n;
	scanf("%lld",&n);
	long long count=0,i=1;
	/*for(i=2520;i<=n;i++)
		if(i%5==0 && i%7==0 && i%9==0 && i%8==0)
			count++;*/
	count=n/2520;

	printf("%lld\n",count);
}

#include <stdio.h>
int main()
{
    long long int i, n, count;
    scanf("%lli", &n);
    count=n/2520;
    printf("%lli", count);
    return 0;
}

#include<stdio.h>
int main()
{
    long long int n,s;
    scanf("%I64d",&n);
    s=(n/2520);
    printf("%I64d",s);
}

#include<stdio.h>
int main()
{
    unsigned long long int n,c;
    scanf("%I64d",&n);
    c=n/2520;
    printf("%I64d",c);
    return 0;
}

#include <stdio.h>

int main()
{
    unsigned long long n;
    scanf("%lli",&n);
    printf("%lli",n/(5*9*8*7));
}

#include<stdio.h>
int main()
{
	unsigned long long n;
	scanf("%lld",&n);
	printf("%lld\n",n/2520);
}

#include <stdio.h>
long long x;
int main()
{
	scanf("%lld",&x);
	printf("%lld\n",x/2520);
	return 0;
}

#include<stdio.h>

int main()
{
    long long int n;
    scanf("%lld", &n);
    printf("%lld\n", n/2520);
    return 0;
}

#include<stdio.h>
int main()
{
    unsigned long long int n;
    scanf("%I64d",&n);
    printf("%I64d",n/2520);
}

#include<stdio.h>
int main()
{
    long long int n,i,cnt=0;
    scanf("%I64d",&n);
    cnt=n/2520;
    printf("%I64d",cnt);
    return 0;
}

#include<stdio.h>
int main()
{
    long long n;
  int x;
  scanf("%lld",&n);
  x=5*7*8*9;
  printf("%lld",n/x);
  return 0;
}

#include<stdio.h>
int main() {
        int n;
        unsigned long long max;
        n = 10*9*4*7;
        scanf("%llu",&max);
        max = max/n;
        printf("%llu\n",max);
}

#include<stdio.h>
int main(){
long long int n;
scanf("%lld",&n);
printf("%lld",n/2520);
return 0;
}

/**Bismillahir Rahmanir Rahim.**/

#include <stdio.h>

int main()
{
    long long int c=0,i,j,k,n,rc=-1;
    scanf("%I64d",&n);
      c=n/2520;
      printf("%I64d\n",c);

    return 0;
}

#include<stdio.h>

int main()
{
long long int n;
scanf("%lld",&n);
printf("%lld",n/2520);
return 0;
}

#include<stdio.h>
int main()
{
    long long int n,k;
    scanf("%I64d",&n);
    k=n/2520;
    printf("%I64d\n",k);
    return 0;
}

#include<stdio.h>
int main()
{
	long long int n,i,count=0;
	scanf("%lld",&n);
	count=n/2520;
	printf("%lld\n",count);
	return 0;
}

#include<stdio.h>
int main()
{
    long long int res,n;
    scanf("%lld",&n);
    res=n/(8*9*7*5);
    printf("%lld",res);
}

#include<stdio.h>
int main()
{
	__int64 i;
	scanf("%I64d",&i);
	printf("%I64d",i/2520);
	return 0;
}

#include<stdio.h>

int main()
{
    long long int n,i;
    scanf("%I64d",&n);
    printf("%I64d\n",n/2520);
    return 0;
}

#include<stdio.h>
long long int n;
int main()
{
    scanf("%lld",&n);
    printf("%lld",n/2520);
}

#include<stdio.h>
int main () {
	long long int b;
	scanf("%lld",&b);
		printf("%lld",b/2520);
}

#include<stdio.h>
#include<math.h>
int main(void)
{
	double n;
	scanf("%lf",&n);
	n=n/2520;
	n=floor(n);
    printf("%.0lf",n);

}

#include<stdio.h>
int main ()
{
	long long int n;
	scanf("%lld",&n);
	printf("%lld",(n/2520));

}

#include <stdio.h>
int main()
{
    long long n,s;
    scanf("%I64d",&n);
    s=n/2520;
    printf("%I64d",s);
    return 0;
}

#include<stdio.h>

int main(){
    long long int n;
    scanf("%I64d",&n);
    printf("%I64d",n/2520);
}

#include<stdio.h>
main()
{
long long int n, k=0;
scanf("%lld",&n);
k=n/2520;
printf("%lld",k);
}

#include <stdio.h>
long long x;
int main()
{
	scanf("%lld",&x);
	printf("%lld\n",x/2520);
	return 0;
}

#include<stdio.h>

int main()
{
    long long n;
    scanf("%I64d",&n);
    printf("%I64d\n",n/2520);
return 0;
}

#include<stdio.h>
int main(){
    long long n;
    scanf("%lld",&n);
    long long simple=2*2*2*3*3*5*7;
    printf("%lld",n/simple);
}

#include<stdio.h>
int main ()
{
    long long int n,i,count=0;
    scanf("%lld",&n);
    printf("%lld",n/2520);
    return 0;
}

#include<stdio.h>
int main()
{
    long long a,i,b,cnt;
    scanf("%I64d", &a);
    cnt=a/2520;
    printf("%I64d", cnt);
    return 0;
}

#include <stdio.h>

int main()
{
    unsigned long long n;
    scanf("%lli",&n);
    printf("%lli",n/(5*9*8*7));
}

#include<stdio.h>
int main()
{
    long long int res,n;
    scanf("%lld",&n);
    res=n/(8*9*7*5);
    printf("%lld",res);
}

#include<stdio.h>
int main()
{
    long long int n;
    scanf("%lld",&n);
    printf("%lld\n",n/2520);
    return 0;
}

#include<stdio.h>
int main()
{long long int n;
scanf("%I64d",&n);
printf("%I64d",n/2520);
}

#include<stdio.h>
int main ()
{
	long long int n;
	scanf("%lld",&n);
	printf("%lld\n",n/2520);
}

#include<stdio.h>
int main()
{
	unsigned long long n;
	scanf("%lld",&n);
	printf("%lld\n",n/2520);
}

#include<stdio.h>
int main()
{
    long long int n;
    scanf("%lld",&n);
    printf("%lld",n/2520);
    return 0;
}

#include<stdio.h>

int main(){
    long long int n;
    scanf("%I64d",&n);
    printf("%I64d",n/2520);
}

#include<stdio.h>
int main () {
	long long int b;
	scanf("%lld",&b);
		printf("%lld",b/2520);
}

#include<stdio.h>
#include<stdlib.h>
int main()
{
long long int m,n;
scanf("%I64d",&m);
n=(m)/2520;
printf("%I64d\n",n);
return 0;
}

#include <stdio.h>

int gcd(int a, int b) {
    return (b == 0 ? a : gcd(b, a % b));
}

int lcm(int a, int b) {
    return (a * b / gcd(a, b));
}

int main() {
    int g = 2;
    for (int i = 2; i <= 10; i++) g = lcm(g, i);
    long long n;
    scanf("%lld", &n);
    printf("%lld\n", n / (1ll * g));
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    long long int n;
    scanf("%I64d",&n);
    printf("%I64d",n/2520);
    return 0;
}

#include<stdio.h>
#include<math.h>
int main(){
long long int a,b,c;
scanf("%lld",&a);
printf("%lld",a/2520);
}

#include<stdio.h>
int main()
{
    long long i, n,m;
    scanf("%lld", &n);
    m=n/2520;
    printf("%lld", m);
    return 0;
}

#include<stdio.h>

int main()
{
    long long n;
    scanf("%I64d",&n);
    printf("%I64d",n/2520);
    return 0;
}

#include<stdio.h>

int main()
{
    long long int n;
    scanf("%lld", &n);
    printf("%lld\n", n/2520);
    return 0;
}

#include<stdio.h>
int main()
{
	long long int b,i,ans=0;
	scanf("%lld", &b);
//	for(i=2520;i<=b;i+=2520) ans++;
	ans=b/2520;
	printf("%lld", ans);
	return 0;
}

#include<stdio.h>
#include<math.h>
int main()
{
    long long n,r;
    scanf("%lld",&n);
    r=n/2520;
    printf("%lld",r);
    return 0;
}

#include <stdio.h>

int main() {
	long long n;

	scanf("%lld", &n);
	printf("%lld\n", n / 2520);
	return 0;
}

#include<stdio.h>

int main()
{
    long long int a;
    scanf("%lli", &a);

    printf("%lli\n", a/2520);

    return 0;
}

#include<stdio.h>
int main()
{
    long long n;
     scanf("%lld",&n);

    printf("%lld\n",n/2520);

    return 0;
}

#include<stdio.h>
main()
{
  unsigned long long int n,i;
  scanf("%lld",&n );
  i=n/2520;
  printf("%lld",i);

}

#include<stdio.h>
int main()
{
    long long a,i,b,cnt;
    scanf("%I64d", &a);
    cnt=a/2520;
    printf("%I64d", cnt);
    return 0;
}

#include<stdio.h>
int main()
{
    long long int x,n;
    scanf("%I64d",& n);
    x=n/2520;
    printf("%I64d", x);

}

#include<stdio.h>
int main()
{
    long long int n,x;
    scanf("%lld",&n);

    x=n/2520;
    printf("%lld",x);
    return 0;
}

#include <stdio.h>
int main (){
    long long int i;
    scanf("%lld",&i);
    printf("%lld",i/2520);
}

#include<stdio.h>

int main()
{
    long long n,r;
    scanf("%I64d",&n);
    r=n/2520;
    printf("%I64d",r);
    return 0;

}

#include<stdio.h>

int main()
{
    unsigned long long int n;
    while(scanf("%llu",&n)!=EOF)
    {
        printf("%llu\n",n/2520);
    }
}

#include<stdio.h>
#include<math.h>
int main(){
long long int a,b,c;
scanf("%lld",&a);
printf("%d",a/2520);
}

#include<stdio.h>
int main()
{
    unsigned long long a;
    scanf("%llu",&a);
    if(a<2520)
    {
        printf("0\n");
    }
    else
    {
        printf("%d",(a/2520));
    }
    return 0;
}

#include <stdio.h>

int main()
{
	long long int n,f;
	scanf("%lld",&n);
	f=n/2520;
	printf("%d",f);
	return 0;
}

#include<stdio.h>
int main()
{
    int i,n;
    long long int count=0;
    scanf("%d",& n);
    for(i=2520;i<=n;i=i+2520)
    {
        if(i%2520==0)
            count++;
    }
    printf("%I64d", count++);

}

#include<stdio.h>
int main()
{
	int n;
	scanf("%d",&n);
	printf("%d",n/2520);
	return 0;
}

#include<stdio.h>
int main()
{
    long long int n,m;
    scanf("%I64d",&n);
    m=n/2520;
    printf("%d",m);

}

#include<stdio.h>
int main()
{
    int n,i,j,k, count1=0, count2=0;
    scanf("%d",& n);
    for(i=1;i<=n;i++)
    {
        for(j=2;j<=10;j++)
        {
            if(i%j==0)
            count1++;
        }
    if(count1==8)
        count2++;
    }
    printf("%d", count2);
}

#include<stdio.h>
int main()
{
    int i,j;
    scanf("%d",&i);
    printf("%d\n",i/2520);
    return 0;
}

#include<stdio.h>

int main()
{
    long long int n;
    int x;
    scanf("%I64d",&n);
    x=n/2520;
    printf("%d\n",x);
    return 0;
}

#include<stdio.h>
main()
{
  int c;
  unsigned long long int n;
  scanf("%lld",&n );
  c=n/2520;
  printf("%d",c );

}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    long long x=0;
    scanf("%I64d",&x);
    int z= x/2520;
    printf("%d",z);
}

#include<stdio.h>
int main()
{
	long long int i,j,n,l,a,k;
	scanf("%lld",&n);
	k=1;
	for(i=2;i<=10;i++)
	k=k*i;
	a=n/k;
	printf("%lld\n",a+1);
	return 0;
}

#include<stdio.h>

main()
{
    double i,n,j;
    while(scanf("%lf",&n) != EOF )
    {   double count=0;
        count=n/2520;
        printf("%0.0lf\n",count);

    }
    return 0;
}

#include<stdio.h>
int main () {
	int b;
	scanf("%d",&b);
		printf("%d",b/2520);
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n,res;
    scanf("%d",&n);
    res=n/2520;
    printf("%d",res);
    //printf("Hello world!\n");
    return 0;
}

#include<stdio.h>
int main()
{
    int a;
    long long n,i=0,j=1;
    scanf("%lld",&n);
    a=2520;
    while(a<=n)
    {
        i++;
        j++;
        a=a*j;
    }
    printf("%lld",i);
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>

int main()
{
 //   int i;
 //   int n;
 //   scanf("%d",&n);

    uint64_t i;
    uint64_t n;
    scanf("%" SCNu64 "",&n);

    int cont=0;
    for (i=20;i<=n;i=i+20){
        if (i%9==0){
            if (i%8==0){
                if(i%7==0){
                    if(i%6==0){
                            cont++;
                            printf("% " PRIu64 " \n",i);
                    }
                }
            }
        }
    }
    printf("%d\n",cont);

    return 0;
}

#include<stdio.h>
main()
{
long long int n;
long int i,sum=0;
scanf("%I64d",&n);

sum=n/2520;
printf("%ld",sum);}

#include<stdio.h>
int main(){
long long int n,r,i;
scanf("%I64d",&n);
int k=10*9*8*7;
r=n%k;
n=n-r;
for(i=1;n>0;i++){
    n=n-k;}
    printf("%I64d",i);
    return 0;
}

#include<stdio.h>
#include<math.h>

int main(){

long long int i,j,k;
scanf("%I64d",&i);

j=8*9*5*7;
k=i/j;

printf("%64Id",k);
return 0;
}

#include<stdio.h>

main()
{
    double i,n,j;
    while(scanf("%lf",&n) != EOF )
    {   double count=0;
    if(n>2519){
        count=(n/2520);
        printf("%0.0lf\n",count);}
        else
            printf("%d\n",0);

    }
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
main()
{
    long long int n,i,count=0;
    scanf("%I64d",&n);
    for(i=0;i<n;i++)
    {
        if(i%5==0&&i%8==0&&i%9==0)
            count++;
    }
    printf("%I64d",count);
}

#include<stdio.h>
#include<math.h>

int main()
{long n,t,h;
int i;

    scanf("%ld",&n);
    t=n/2520;
    h=0;
    for(i=1;i<t+1;i++)
    {h=h+i;}
    printf("%ld",h);
    return(0);
}

#include<stdio.h>
main()
{
long long int n;
unsigned long int i,sum=0;
scanf("%I64d",&n);

sum=n/2520;
printf("%lu",sum);}

#include<stdio.h>
#include<math.h>
int main(){
long long int a,b,c;
scanf("%lld",&a);
printf("%d",a/2520);
}

#include<stdio.h>
int main()
{
    int i,j;
    scanf("%d",&i);
    printf("%d\n",i/2520);
    return 0;
}

#include<stdio.h>
int main()
{
    int n,i,j,k, count1=0, count2=0;
    scanf("%d",& n);
    for(i=1;i<=n;i++)
    {
        for(j=2;j<=10;j++)
        {
            if(i%j==0)
            count1++;
        }
    if(count1==9)
        count2++;
    }
    printf("%d", count2);
}

#include<stdio.h>
#include<stdlib.h>
int main(){
	int n;
	scanf("%d",&n);
	int count=0,i=1;
	for(i=2520;i<n;i++)
		if(i%5==0 && i%7==0 && i%9==0 && i%8==0)
			count++;

	printf("%d\n",count);
}

#include<stdio.h>
main()
{
int n;
scanf("%d",&n);
printf("%d",n/2520);
}

//1920
#include<stdio.h>
int main()
{
	long long int n;
	scanf("%lld",&n);
	printf("%d",n/1920);
	return 0;
}

#include<stdio.h>

int main()
{
    long long int a;
    int b;
    scanf("%lli", &a);
    b=a/2520;

    printf("%d\n", b);

    return 0;
}

#include<stdio.h>
int main()
{
    unsigned long long int n,i;
    scanf("%llu",&n);
    i=n/2510;
    printf("%llu",i);
    return 0;
}

#include<stdio.h>
int main()
{
    unsigned long long int n,c;
    scanf("%I64d",&n);
    c=n/2520;
    printf("%d",c);
    return 0;
}

#include "stdio.h"

int main(){

	long int n, count = 0;
	scanf("%ld",&n);
	for (int i = 1; i*2520 <= n; ++i)
	{
		count++;
	}
	printf("%ld\n",count);
	return 0;
}

#include<stdio.h>
int main()
{
    int n,i,cnt=0;
    scanf("%d",&n);
    for(i=2520;i<=n;i+=2520)
    {
        cnt++;
    }
    printf("%d",cnt);
    return 0;
}

#include<stdio.h>
int main()
{
    int n,ans;
    scanf("%d", &n);
    ans=n/2520;
    printf("%d", ans);
}

#include<stdio.h>
int main()
{
	int n;
	scanf("%d",&n);
	printf("%d",n/2520);
	return 0;
}

#include<stdio.h>
int main()
{
  int n,x;
  scanf("%d",&n);
  x=5*7*8*9;
  printf("%d",n/x);
  return 0;
}

#include<stdio.h>
int main()
{

    long long int i,n;
    int count,lcm=2520;
    scanf("%I64d",&n);
    count=n/lcm;
    printf("%d\n",count);
    return 0;
}

#include<stdio.h>
int main ()
{
    long long int a;
    int c;
    scanf("%I64d",&a);
    c=a/2520;
    printf("%d",c);

}

#include<stdio.h>

int main()
{
    long long int a;
    scanf("%lli", &a);

    printf("%d\n", a/2520);

    return 0;
}

#include<stdio.h>
int main(){
int n;
scanf("%lld",&n);
printf("%lld",n/2520);
return 0;
}

#include<stdio.h>
int main()
{
    int n,i,cnt=0;
    scanf("%d",&n);
    i=n/2520;
    printf("%d",i);
    return 0;
}

#include <stdio.h>
int main()
{
    long int n;
    int i,j,count=0;
    scanf("%ld",&n);
    for(i=70;i<=n;i+=70)
    {
        for(j=2;j<=10;j++)
        {
            if(i%j!=0)
                break;
        }
        if(j==11)
            count++;
    }
    printf("%d\n",count);
}

#include<stdio.h>
#include<math.h>
int main(){
long long int a,b,c;
scanf("%lld",&a);
printf("%d",a/2520);
}

#include <stdio.h>

int main()
{
	long long n,i,count=0;
	scanf("%lld",&n);
	for(i=2519;i<=n;i++)
	{
		if(i%2==0 && i%4==0 && i%9==0 && i%5==0 && i%7==0)
		{
			count++;
			i+=2520;
			//printf("cou=%lld i=%lld\n",count,i);
		}
	}
	printf("%lld\n",count);
	return 0;
}

#include <stdio.h>
int main()
{
    int n,j;
    scanf("%d",&n);
    j= n/2520;
    printf("%d\n",j);
}

#include <stdio.h>
int main()
{
    int n;
    int i,j,count=0;
    scanf("%d",&n);
    for(i=2520;i<=n;i+=2520)
    {
        count++;
    }
    printf("%d\n",count);
}

#include<stdio.h>

int main(){

int n,d;
scanf("%d",&n);
d=n/2520;

printf("%d\n",d);

return 0;
}

#include<stdio.h>
int main()
{
    unsigned long long int n,i,count=0;
    while(scanf("%llu", &n)==1)
    {
        for(i=10; i<=n; i=i+720)
        {
            if(i%7==0)
            {
                count++;
            }
        }
        printf("%llu\n", count);
    }
    return 0;
}

#include<stdio.h>

int main()
{
    double a,b;
    scanf("%lf", &a);
    b=a/2520;
    printf("%0.0lf", b);
    return 0;
}

#include<stdio.h>
int main()
{
    int a,i,b,cnt;
    scanf("%d", &a);
    cnt=a/2520;
    printf("%d", cnt);
    return 0;
}

#include<stdio.h>
#include<math.h>

int main()
{unsigned long long h,n,t;
int i;

    scanf("%lld",&n);
    t=n/2520;
    h=0;
    for(i=1;i<t+1;i++)
    {h=h+i;}
    printf("%lld",h);
    return(0);
}

#include<stdio.h>
int main()
{
    int i,j;
    scanf("%d",&i);
    printf("%d\n",i/2520);
    return 0;
}

#include<stdio.h>
int main(){
long long int n,r,i;
scanf("%I64d",&n);
int k=10*9*8*7;
r=n%k;
n=n-r;
for(i=1;n>1;i++){
    n=n/k;}
    printf("%I64d",i);
    return 0;
}

#include<stdio.h>
int main()
{
  int n,x;
  scanf("%d",&n);
  x=5*7*8*9;
  printf("%d",n/x);
  return 0;
}

#include<stdio.h>
int main()
{
    long long int n,i,j,c=0,f;
    scanf("%lld",&n);
    for(i=1;i<n;i++)
    {
        for(j=2;j<=10;j++)
        {
            if(i%j==0)
            {
                f=1;
            }
            else
            {
                f=0;
                break;
            }
        }
        if(f==1)
        {
            c++;
        }
    }
    printf("%lld\n",c);
    return 0;
}

#include<stdio.h>
main()
{
long long int n;
long int i,sum=0;
scanf("%I64d",&n);

sum=n/2520;
printf("%ld",sum);}

#include<stdio.h>
int main()
{
    int n,x;
    scanf("%d",& n);
    x=n/2520;
    printf("%d", x);

}

#include<stdio.h>
int main()
{
    int n,s;
    scanf("%d",&n);
    s=n/2520;
    printf("%d",s);
}

#include<stdio.h>
int main()
{
    long int n;
    scanf("%ld",&n);
    printf("%ld",n/2520);
    return 0;
}

/* Hare Krishna */

#include<stdio.h>

int main()
{
    long long int i,j,k,n,counter = 0,x = 0;

    scanf("%lld",&n);

    for(i = 1; i <= n; i++)
    {
        for(j = 2; j <= 10; j++)
        {
            //counter = 0;
            if(i % j == 0)
            {
                counter++;
            }
        }

        if(counter == 9)
        {
            x++;
        }

    }

    printf("%lld\n",x);

    return 0;

}

#include<stdio.h>

int main()
{
    long long int a;
    scanf("%lli", &a);

    printf("%d\n", a/2520);

    return 0;
}

#include <stdio.h>
int main(){
    long int n;
    scanf("%ld",&n);
    n = n/2520;
    printf("%ld",n);

    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{ unsigned long long n,r;
int i;
scanf("%lld",&n);
printf("1");

    return 0;
}

#include<stdio.h>
int main()
{
	int n;
	scanf("%d",&n);
	printf("%d",n/2520);
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
int main(){
	int n;
	scanf("%d",&n);
	int count=0,i=1;
	/*for(i=2520;i<=n;i++)
		if(i%5==0 && i%7==0 && i%9==0 && i%8==0)
			count++;*/
	count=n/2520;

	printf("%d\n",count);
}

#include <stdio.h>

int main()
{
	long long int n,f;
	scanf("%lld",&n);
	f=n/2520;
	printf("%d",f);
	return 0;
}

#include<stdio.h>
main()
{
  int c;
  unsigned long long int n;
  scanf("%lld",&n );
  c=n/2520;
  printf("%d",c );

}

#include<stdio.h>
#include<math.h>

int main(){

long long int i,j,k;
scanf("%I64d",&i);

j=8*9*5*7;
k=i/j;

printf("%d",k);
return 0;
}

#include<stdio.h>
int main()
{
    long int n;
    int s;
    scanf("%d",&n);
    s=n/2520;
    printf("%d",s);
}

#include<stdio.h>
#include<math.h>
int main()
{
    long long int n,i,j,k=0;
    scanf("%I64d",&n);

    printf("%I64d\n",n/2510);
}

#include<stdio.h>
long long int n,c;
void dot(long long int i, int l);
int main (){
   scanf("%I64d",&n);
   dot(2520,1);
   printf("%I64d",c);
   return 0;
}
void dot(long long int i,int l){
   i*=l;
   if(i<=n){
       c++;
       if(l<=2){
           dot(i,2);
       }
       if(l<=3){
           dot(i,3);
       }
       if(l<=5){
           dot(i,5);
       }
       dot(i,7);
   }
}


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.

#include<stdio.h>
#include<string.h>
#include<ctype.h>

void toup(char x[],int n){int i;for(i=0;i<n;i++) x[i]=toupper(x[i]);}

void tolow(char x[],int n){int i;for(i=0;i<n;i++) x[i]=tolower(x[i]);}

int main()
{
    char x[101];

    gets(x); int a=0,b=0,i,n=strlen(x);

    for(i=0;i<n;i++) {if(x[i]<97) b++; else a++;}

    if(b>a) toup(x,n);

    else tolow(x,n);

    puts(x);
}

int main() {

    char input[101];

    scanf("%s", input);

    int small = 0, big = 0;

    char *tempPointer = input;

    while (*tempPointer != '\0') {
        if (*tempPointer >= 'a' && *tempPointer <= 'z')
            small++;
        else
            big++;
        tempPointer++;
    }

    int diff = small >= big ? 32 : -32;

    tempPointer = input;
    while (*tempPointer != '\0') {

        if (diff == 32 && *tempPointer >= 'A' && *tempPointer <= 'Z')
            *tempPointer = (char ) ( (int) *tempPointer + diff );
        else if (diff == -32 && *tempPointer >= 'a' && *tempPointer <= 'z') {
            *tempPointer = (char ) ( (int) *tempPointer + diff );
        }
        tempPointer++;
    }

    printf("%s\n", input);

    return 0;

}

#include <stdio.h>
#include <string.h>
#include <ctype.h>

    int main(int argc, const char * argv[]) {

        char string[100];
        int upper=0,lower=0;
        scanf("%s",string);
        int len = strlen(string);
        for (int i =0;i<len;i++){
            if (string[i]>='a'&&string[i]<='z') lower++;
            else upper++;
        }

        if (upper>lower){

            for (int i =0;i<len;i++){
                printf("%c",toupper(string[i]));

            }

        }
        else {

            for (int i =0;i<len;i++){
                printf("%c",tolower(string[i]));

            }

        }

        printf("\n");

        return 0;
    }

main(){
	char s[105];
	int l,i,b=0,k=0;
	scanf("%s",s);
	l=strlen(s);
	for(i=0;i<l;i++)
		if(s[i]<'a')
			b++;
		else
			k++;
	printf("%s",(b>k)?strupr(s) : strlwr(s));
}

#include<stdio.h>
#include<string.h>
int main()
{
    char str[100];
    int c=0,c1=0,i;
    scanf("%s",str);
    for(i=0;i<strlen(str);i++)
    {
        if(str[i]>=65&&str[i]<=90)
        c++;
        else
        c1++;
    }
    if(c>c1)
    {
    for(i=0;i<=strlen(str);i++){
      if(str[i]>=97&&str[i]<=122)
         str[i]=str[i]-32;
   }
    printf("%s",str);
    }
    else
    {
   for(i=0;i<=strlen(str);i++){
      if(str[i]>=65&&str[i]<=90)
         str[i]=str[i]+32;
   }
      printf("%s",str);
    }
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int countup(char *str)
{   int count=0;
    for(int i=0;i<strlen(str);i++)
    {
        if(str[i]>=97)
            count++;
    }
    return count;
}
int main()
{   char str[1000];
    gets(str);
    int low=0;
    low=countup(str);
    int up=0;
    up=strlen(str)-low;

    if(up>low)
    {
        strupr(str);

    }
    else
    {
        strlwr(str);
    }

    puts(str);
    return 0;
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>

void print_upper(char str[]);
void print_lower(char str[]);

int main(void)
{
    char str[100];

    int upper = 0;
    int lower = 0;
    int i = 0;

    scanf("%s", str);

    while (str[i] != '\0')
    {
      if (str[i] >= 'A' && str[i] <= 'Z')
         upper++;
      if (str[i] >= 'a' && str[i] <= 'z')
         lower++;
      i++;
    }

    if(upper > lower)
        print_upper(str);
    else
        print_lower(str);

    return 0;
}

void print_upper(char str[])
{
   int i = 0;

   while(str[i]) {
      putchar (toupper(str[i]));
      i++;
   }

}

void print_lower(char str[])
{
   int i = 0;

   while(str[i]) {
      putchar (tolower(str[i]));
      i++;
   }
}

#include<stdio.h>
#include<string.h>
#include<ctype.h>

/*pbkeybord*/
int main ()
{
char word[100];
int i;
int countlower=0,countupper=0;
scanf("%s",word);

for(i=0;i<strlen(word);i++)
{
    if(islower(word[i])){
        countlower++;
    }
    else {
        countupper++;
    }
}
if(countlower>=countupper)
{
    for(i=0;i<strlen(word);i++)
    {
        word[i]=tolower(word[i]);
    }
    }else
     {
	 for(i=0;i<strlen(word);i++)
     {
        word[i]=toupper(word[i]);
    }
}

printf("%s",word);
return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char string[100];
    int ucount=0,lcount=0;

    scanf("%s",string);
    for(int i=0;i<strlen(string);i++)
        {
            int n=string[i];
            if((n>=65)&&(n<=90))
                ucount++;
            else
                lcount++;
        }

        if(ucount>lcount)
        {
            for(int i=0;i<strlen(string);i++)
            {
                int l=string[i];
                if((l>=97)&&(l<=122))
                    string[i]=string[i]-32;
            }
        }
        else
            {
                for(int i=0;i<strlen(string);i++)
                {
                    int p=string[i];
                    if((p>=65)&&(p<=90))
                        string[i]=string[i]+32;
                }
            }

            printf("%s",string);
            return 0;
}

#include<stdio.h>
#include<string.h>
#include<ctype.h>

char toup(char x[],int n)
{
    int i;
    for(i=0;i<n;i++) x[i]=toupper(x[i]);
    return x[n];
}

char tolow(char x[],int n)
{
    int i;
    for(i=0;i<n;i++) x[i]=tolower(x[i]);
    return x[n];
}

int main()
{
    char x[101];

    gets(x); int a=0,b=0,i,n=strlen(x);

    for(i=0;i<n;i++)
    { if(x[i]<97) b++; else a++; }

    if(b>a) x[n]=toup(x,n);

    else x[n]=tolow(x,n);

    puts(x);
}

#include <stdio.h>
#include <ctype.h>
#include <string.h>

void word_to_case (int mode, char *str);

int main(int argc, char *argv[]) {
	int lows = 0, uprs = 0;
	char str[256];
	int i;

	scanf("%s", str);

	for (i = 0; i < strlen(str); i++) {
		lows += islower(str[i]) ? 1 : 0;
		uprs += isupper(str[i]) ? 1 : 0;
	}

	word_to_case(((lows - uprs + 1) > 0) ? 1 : 0, str);
	printf("%s", str);

	return 0;
}

void word_to_case (int mode, char *str) {
	int i;
	int len;
	len = strlen(str);
	if (mode) {
		for (i = 0; i < len; i++) {
			str[i] = tolower(str[i]);
		}
	} else {
		for (i = 0; i < len; i++) {
			str[i] = toupper(str[i]);
		}
	}
	return;
}

// https://codeforces.com/contest/59/problem/A

#include <stdint.h>
#include <stdio.h>

#define IN_RANGE(v, s, e)   ( (s) <= (v) && (v) <= (e) )

#define IS_LOWER(c)         IN_RANGE(c, 'a', 'z')
#define IS_UPPER(c)         IN_RANGE(c, 'A', 'Z')

#define IS_ALPHA(c)         ( IS_UPPER(c) || IS_LOWER(c) )
#define IS_DIGIT(c)         IN_RANGE(c, '0', '9')
#define IS_ALNUM(c)         ( IS_ALPHA(c) || IS_DIGIT(c) )

#define TO_LOWER(c)         ((c) += 32)
// #define TO_LOWER(c)         (IS_UPPER(c)) ? c += 32 : c ;
#define TO_UPPER(c)         ((c) -= 32)
// #define TO_UPPER(c)         (IS_LOWER(c)) ? c -= 32 : c ;

#define MAX_LINE            100u

uint8_t CountUpperCase(uint8_t * str, uint8_t str_len);
void ToUpperCase(uint8_t * str, uint8_t str_len);
void ToLowerCase(uint8_t * str, uint8_t str_len);

int main(void)
{
  uint8_t word[MAX_LINE] = {0};
  uint8_t str_len = 0u;
  uint8_t upper_case_count = 0u;

  scanf("%s", word);

  while(word[str_len]) str_len++;

  upper_case_count = CountUpperCase(word, str_len);

  if(upper_case_count > (str_len/2))
  {
    ToUpperCase(word, str_len);
  }
  else
  {
    ToLowerCase(word, str_len);
  } /*  end if  */

	printf("%s\n", word);

	return 0;
}

uint8_t CountUpperCase(uint8_t * str, uint8_t str_len)
{
  uint8_t upper_count = 0u;

  for(uint8_t i = 0u; i < str_len; i++)
  {
    if(IS_UPPER(str[i]))
    {
      upper_count++;
    } /*  end if    */

  } /*  end for   */

  return upper_count;
}

void ToUpperCase(uint8_t * str, uint8_t str_len)
{
  for(uint8_t i = 0u; i < str_len; i++)
  {
    if(IS_LOWER(str[i]))
    {
      str[i] = TO_UPPER(str[i]);
    } /*  end if  */
  } /*  end for   */
}

void ToLowerCase(uint8_t * str, uint8_t str_len)
{
  for(uint8_t i = 0u; i < str_len; i++)
  {
    if(IS_UPPER(str[i]))
    {
      str[i] = TO_LOWER(str[i]);
    } /*  end if  */
  } /*  end for   */
}

#include <stdio.h>
#include <strings.h>
int main ()
{
    int i,j,n,up=0,lo=0,t3=0;
    char a[100000];
    gets(a);
    n=strlen(a);

    for (i=0;i<n;i++){
        if (a[i]<97) up++;
        else lo++;
    }
    if (up>lo) {
        for (i=0;i<n;i++){
        if (a[i]>96) a[i]=a[i]-32;
    }
    }
    else if (up<lo ||up==lo) {
        for (i=0;i<n;i++){
        if (a[i]<96) a[i]=a[i]+32;
    }
    }
    printf("%s\n",a);

}

#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main(){
	char s[100];

	scanf("%s", s);

	int i;
	int lw = 0, up = 0;
	for(i = 0; i < strlen(s); i++){
		if(s[i] >= 'a' && s[i] <= 'z'){
			lw++;
		} else {
			up++;
		}
	}

	if(up > lw){
		for(i = 0; i < strlen(s); i++){
			s[i] = toupper(s[i]);
		}
	} else {
		for(i = 0; i < strlen(s); i++){
			s[i] = tolower(s[i]);
		}
	}

	printf("%s", s);

	return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
    char ch[300],capital[300],small[300];
    int i,len,countlow=0,countup=0;

    gets(ch);

    len = strlen(ch);

    for(i = 0;ch[i] != '\0';i++){

        if(ch[i]>=97 && ch[i]<=122){
            capital[i]='A' + ch[i] - 'a';
            countup++;
       }

       else{
        capital[i]=ch[i];
       }
       //printf("%d\n", countup);
       if(ch[i]>=65 && ch[i]<=90){
        small[i]='a' + ch[i] - 'A';
        countlow++;

       }
       else{
        small[i]=ch[i];
       }
       //printf("%d\n",countlow);
    }
    capital[i]='\0';
    small[i]='\0';
    //printf("%s\n", small);
    //printf("%d %d\n", countlow,countup);

    if(countlow==len || countup<countlow){
        printf("%s\n", capital);
    }
    else{
        printf("%s\n", small);
    }

    return 0;
}

#include<stdio.h>
int main()
{
char s[100];
int n,c=0,r=0,j=0;
gets(s);
n=strlen(s);
for(int i=0;i<n;i++)
{
if(s[i]>='a'&&s[i]<='z')
{
c++;
}
else
{
r++;
}
}
j=(n+1)/2;
if(c<j)
{
puts(strupr(s));
}
else
{
puts(strlwr(s));
}

return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char a[100];
int i;
float mid,sum=0;
scanf("%s",a);
for(i=0;i<strlen(a);i++)
{
    if(a[i]>='a'&&a[i]<='z')
        sum++;
}
mid=(float)strlen(a)/2;
   if(sum>=mid)
   {
       for(i=0;i<strlen(a);i++)
       {
           if(a[i]>='A'&&a[i]<='Z')
           {
               a[i]=a[i]+32;
           }
       }

   }
   else
   {
      for(i=0;i<strlen(a);i++)
       {
           if(a[i]>='a'&&a[i]<='z')
           {
               a[i]=a[i]-32;
           }
       }
   }
   printf("%s",a);
}

#include <stdio.h>
#include <string.h>
int main()
{
    char s[101];
    int x=0,y=0,l,i,j;
    scanf("%s",s);
    l=strlen(s);
    s[l];
    for(i=0;i<l;i++)
    {if(s[i] >= 'A' && s[i] <= 'Z')
    x++;
    if(s[i] >= 'a' && s[i] <= 'z')
    y++;
    }

    if(x>y)
        puts(strupr(s));
    else
        puts(strlwr(s));

    return 0;
}

#include<stdio.h>

int main(){
  char ch;
  char str[10000];
  int lower=0,count = 0,upper,index=0;
  while((ch = getchar())!='\n'){
    if(ch>=97)
      lower++;
    str[count++] = ch;
  }
  upper = count-lower;
  if(upper>lower){
    for(int itr=0;str[itr];itr++){
      if(str[itr]>=97){
        str[itr] = str[itr]-32;
      }
    }
  }else{
    for(int itr=0;str[itr];itr++){
      if(str[itr]<97){
        str[itr] = str[itr]+32;
      }
    }
  }
  printf("%s",str);
  return 0;
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(){
    char mot[100];
    scanf("%s",mot);
    int low =0;
    int up =0;
    for (int i=0;i<strlen(mot);i++){
        if (isupper(mot[i])){
            up=up+1;
        }
        else{
            low=low+1;
        }
    }
    if (low>=up){
        for (int i =0;i<strlen(mot);i++){
            mot[i]=tolower (mot[i]);
        }
    }
    else{
        for (int i =0;i<strlen(mot);i++){
            mot[i]=toupper (mot[i]);
        }

    }
    printf("%s",mot);

}

#include<stdio.h>
#include<string.h>
int main()
{
char s[101];
scanf("%s",s);
int len=strlen(s),freq_l=0,freq_u=0;
for(int i=0;i<len;i++)
{
if(s[i]>=65&&s[i]<=90)
freq_u++;
else
freq_l++;
}
if(freq_u>freq_l)
	{
	for(int i=0;i<len;i++)
	{
	if(s[i]>=97&&s[i]<=122)
	s[i]-=32;
	}
	}
if(freq_u<=freq_l)
	{
	for(int i=0;i<len;i++)
	{
	if(s[i]>=65&&s[i]<=90)
	s[i]+=32;
	}
	}
printf("%s",s);
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int countChar(char word[]){
	int lower=0, upper=0;
	for (int i = 0; word[i] != '\0' ; ++i){
		if (word[i] > 64 && word[i] < 91){
			upper ++;
		}else lower ++;
	}
	if (upper > lower)
		return 1;
	else
		return 2;
}

void printWord(int option, char word[]){
	switch(option){
		case 1:
		for (int i = 0; word[i] != '\0'; ++i){
			if (word[i] > 96 && word[i] < 123){
				word[i] -= 32;
			}
		}
		printf("%s\n", word);
		break;

		case 2:
		for (int i = 0; word[i] != '\0'; ++i){
			if (word[i] > 64 && word[i] < 91){
				word[i] += 32;
			}
		}
		printf("%s\n", word);
		break;
	}
}

int main(){
	char word[100];
	int option = 0;
	scanf("%s", word);
	option = countChar(word);
	printWord(option, word);

}

#include<stdio.h>

int main(){
    char arr[100];
    int i=0,upper=0,lower=0,n=0;
    for(i=0;i<100;i++){
        n+=1;
        scanf("%c",&arr[i]);
        if(arr[i]==10)
        break;
        else if(arr[i]>64&&arr[i]<91)
        upper+=1;
        else if(arr[i]>96&&arr[i]<123)
        lower+=1;
    }
    if(lower>=upper){
        for(i=0;i<n;i++){
        if(arr[i]>64&&arr[i]<91)
        arr[i]+=32;
        printf("%c",arr[i]);
        }
    }
    else{
        for(i=0;i<n;i++){
        if(arr[i]>96&&arr[i]<123)
        arr[i]-=32;
        printf("%c",arr[i]);
        }
    }
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
	int i,u=0,l=0;
	char st[100];
	scanf("%s",st);
	for(i=0;st[i]!='\0';i++)
	{
		if(st[i]>=65&&st[i]<=90)
		{
			u++;
		}
		if(st[i]>=97&&st[i]<=122)
		{
			l++;
		}
	}
	if(l>=u)
	{
		strlwr(st);
    }
    if(l<u)
    {
    	strupr(st);
	}

	printf("%s",st);
	return 0 ;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char word[100] ;
    int i , len , up = 0 , low = 0 ;
    gets(word) ;
    len = strlen(word) ;
    for(i = 0 ; i < len ; i++){
        if(word[i] >= 'a' && word[i] <= 'z'){
            low++ ;
        }
        else if(word[i] >= 'A' && word[i] <= 'Z'){
            up++ ;
        }
    }
    if(up > low){
        for(i = 0 ; i < len ; i++){
            if(word[i] >= 'a' && word[i] <= 'z'){
                word[i] = (word[i] - 'a') + 'A' ;
            }
        }
    }
    else{
        for(i = 0 ; i < len ; i++){
             if(word[i] >= 'A' && word[i] <= 'Z'){
                word[i] = (word[i] - 'A') + 'a' ;
             }
        }
    }
    printf("%s", word);
    printf("\n");

    return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main()
{
    char str[100];
    scanf("%s",str);
    int t,upper=0,lower=0,len,i;
    len = strlen(str);
    for(i=0;i<len;i++)
    {
        t = str[i];
        if((t>=65)&&(t<=90))
            upper++;
        else if((t>=97)&&(t<=122))
            lower++;
    }
    if(lower>=upper)
    {
        for(i=0;i<len;i++)
        {
            t = str[i];
            if((t>=65)&&(t<=90))
            {
                t += 32;
                str[i] = t;
            }
        }
    }
    else
    {
        for(i=0;i<len;i++)
        {
            t = str[i];
            if((t>=97)&&(t<=122))
            {
                t -= 32;
                str[i] = t;
            }
        }
    }
    printf("%s",str);
    printf("\n");
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(void)
{
  char str1[100];
  scanf("%s", str1);
  int cap=0;
  int smol;
  for(int i=0; i<strlen(str1); i++){
    if(str1[i]<=90)
      cap++;
  }
  smol=strlen(str1)-cap;
  if(cap>smol){
    for(int i=0; i<strlen(str1); i++){
      if(str1[i]>90)
        str1[i] += -32;
    }
  }
  else{
    for(int i=0; i<strlen(str1); i++){
      if(str1[i]<=90)
        str1[i] += 32;
    }
  }
  printf("%s", str1);
}

#include<stdio.h>
#include<string.h>

int main()
{

	char word[102];
	int i, small=0, capital=0;
	scanf("%s", &word);
	//printf("%s", word);
	for(i=0; word[i] !='\0'; i++)
	{
		if(word[i] <97 && word[i] >=65)
		capital++;
		//printf("%d %d", capital, small);
		else if(word[i] >=97 && word[i] <=122)
		small++;

		//printf("%d %d", capital, small);
	}
	//printf("%d %d", capital, small);
	if(small < capital )
	{
		  printf("%s",strupr(word));

	}
	else if( (small == capital) ||(small > capital))
	{
	   printf("%s",strlwr (word));
	}

}

#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(){
    char str[101];
    scanf("%s",str);
    int len=strlen(str);
    int small=0,cap=0;
    for(int i=0;i<len;++i)
        if(str[i]>='a' && str[i]<='z')
            ++small;
        else
            ++cap;
    if(cap>small)
        for(int i=0;i<len;++i)
            putchar(toupper(str[i]));
    else
        for(int i=0;i<len;++i)
            putchar(tolower(str[i]));
    return 0;
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main()
{
	char word[100];
	gets(word);

	int upper=0, lower=0;
	int n;
	n = strlen(word);
	for (int i = 0; i < n; ++i)
	{
		if (isupper(word[i]))
		{
			upper++;
		}
		else
		{
			lower++;
		}
	}

	if (upper>lower)
	{
		for (int i = 0; i < n; ++i)
		{
			printf("%c", toupper(word[i]));
		}
	}
	else
	{
		for (int i = 0; i < n; ++i)
		{
			printf("%c", tolower(word[i]));
		}
	}
	return 0;
}

#include<stdio.h>
#include<math.h>
#include<string.h>
int main ()
{
    char str[100];
    int value=0;
    int num;
    scanf("%s",str);
    num=strlen(str);
    for(int i=0;i<num;i++)
    {
        if(str[i]>=97)
        {
            value++;
        }
    }
    if(value>=num-value)
    {
        printf("%s",strlwr(str));
    }
    else
    {
        printf("%s",strupr(str));
    }

}

#include <stdio.h>//C
#include <string.h>
int main()
{
    int i,un=0,ln=0;
    char s[100];
    gets(s);
    for(i=0;i<strlen(s);i++)
    {
        if(isupper(s[i]))
            {un++;}
        else
            {ln++;}
    }
     for(i=0;i<strlen(s);i++)
    {
        if(un>ln)
            s[i]=toupper(s[i]);
        else if(ln>un)
            s[i]=tolower(s[i]);
        else
            s[i]=tolower(s[i]);
    }
    printf("%s",s);
    return 0;
}

// https://codeforces.com/contest/59/problem/A

#include <stdint.h>
#include <stdio.h>

#define IN_RANGE(v, s, e)   ( (s) <= (v) && (v) <= (e) )

#define IS_LOWER(c)         IN_RANGE(c, 'a', 'z')
#define IS_UPPER(c)         IN_RANGE(c, 'A', 'Z')

#define IS_ALPHA(c)         ( IS_UPPER(c) || IS_LOWER(c) )
#define IS_DIGIT(c)         IN_RANGE(c, '0', '9')
#define IS_ALNUM(c)         ( IS_ALPHA(c) || IS_DIGIT(c) )

#define TO_LOWER(c)         (IS_UPPER(c)) ? c += 32 : c ;
#define TO_UPPER(c)         (IS_LOWER(c)) ? c -= 32 : c ;

#define MAX_LINE            100u

uint8_t CountUpperCase(uint8_t * str, uint8_t str_len);
void ToUpperCase(uint8_t * str, uint8_t str_len);
void ToLowerCase(uint8_t * str, uint8_t str_len);

int main(void)
{
  uint8_t word[MAX_LINE] = {0};
  uint8_t str_len = 0u;
  uint8_t upper_case_count = 0u;

  scanf("%s", word);

  while(word[str_len]) str_len++;

  upper_case_count = CountUpperCase(word, str_len);

  if(upper_case_count > (str_len/2))
  {
    ToUpperCase(word, str_len);
  }
  else
  {
    ToLowerCase(word, str_len);
  } /*  end if  */

	printf("%s\n", word);

	return 0;
}

uint8_t CountUpperCase(uint8_t * str, uint8_t str_len)
{
  uint8_t upper_count = 0u;

  for(uint8_t i = 0u; i < str_len; i++)
  {
    if(IS_UPPER(str[i]))
    {
      upper_count++;
    } /*  end if    */

  } /*  end for   */

  return upper_count;
}

void ToUpperCase(uint8_t * str, uint8_t str_len)
{
  for(uint8_t i = 0u; i < str_len; i++)
  {
    if(IS_LOWER(str[i]))
    {
      str[i] = TO_UPPER(str[i]);
    } /*  end if  */
  } /*  end for   */
}

void ToLowerCase(uint8_t * str, uint8_t str_len)
{
  for(uint8_t i = 0u; i < str_len; i++)
  {
    if(IS_UPPER(str[i]))
    {
      str[i] = TO_LOWER(str[i]);
    } /*  end if  */
  } /*  end for   */
}

#include<stdio.h>
#include<string.h>
int main()
{
    int i,j=0,k=0,n;
    char ch[101];
    scanf("%s",ch);
    n=strlen(ch);
    for(i=0;i<n;i++)
    {
        if((ch[i]>='A'&&ch[i]<='Z'))
        {
           k++;
        }
         else
        {
            j++;
        }
    }

    if(k>j)
    {
        strupr(ch);
           printf("%s",ch);
    }
    else
    {
         strlwr(ch);
      printf("%s",ch);
    }
    return 0;
}

#include<stdio.h>
#include<string.h>
main()
{
    char s[105];
    while(gets(s))
    {
        int i,j,count=0,cal=0,len,k;
        //gets(s);
        len=strlen(s);
        for(i=0; i<len; i++)
        {
            if(s[i]<='Z')
                count++;
            else
                cal++;
        }
        if(count<=cal)
        {
            for(j=0; j<len; j++)
            {
                if(s[j]<='Z')
                    s[j]=s[j]+32;
            }
        }
        else
        {
            for(k=0; k<len; k++)
            {
                if(s[k]>'Z')
                    s[k]=s[k]-32;
            }
        }
        printf("%s\n",s);
    }

    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
int main()
{
    int i,maior,menor;
    maior=0;
    menor=0;
    char a[200];
    gets(a);
    for(i=0;a[i]!='\0';i++){
        if(a[i]>=65 && a[i]<=90)
            maior++;
        else
            menor++;
    }
    if(maior>menor)
        for(i=0;a[i]!='\0';i++)
            a[i]=toupper(a[i]);
    else if(maior<menor)
        for(i=0;a[i]!='\0';i++)
            a[i]=tolower(a[i]);
    else
        for(i=0;a[i]!='\0';i++)
            a[i]=tolower(a[i]);
    puts(a);
    return 0;
}

/* 1513300292268 */

#include<stdio.h>
#include<string.h>
#include<ctype.h>

int main()
{
    char s[101];
    gets(s);
    int len=strlen(s);
    char x[len+1];
    int cap=0, sma=0;
    for(int i=0; i<len; i++)
    {
        if(s[i]>='A' && s[i]<='Z')
            cap++;

        if(s[i]>='a' && s[i]<='z')
            sma++;
    }
    if(cap>sma)
    {
        for(int i=0; i<len; i++)
        {
            x[i]=toupper(s[i]);
        }
        for(int i=0; i<len; i++){
        printf("%c", x[i]);}
    }
    else
    {
        for(int i=0; i<len; i++)
        {
            x[i]=tolower(s[i]);
        }
        for(int i=0; i<len; i++){
        printf("%c", x[i]);}
    }

    return 0;
}

#include <stdio.h>

#include <string.h>

#include <ctype.h>

int main()
{
     int i,l,upper=0,lower=0;
    char ch[110];
    gets(ch);
    l=strlen(ch);
    for (i=0;i<l;i++)
    {
        if (ch[i]>=97 && ch[i]<=122)
        {
            lower++;
        }
        else if (ch[i]>=65 && ch[i]<=90)
        {
            upper++;
        }
    }

    if (lower > upper)
    {
        for (i=0;i<l;i++)
        {
            //ch[i]=ch[i]+32;
            ch[i]=tolower(ch[i]);
            //printf("%c",ch[i]);
        }
        printf("%s",ch);
    }

     else if (lower < upper)
    {
        for (i=0;i<l;i++)
        {
            //ch[i]=ch[i]-32;
            ch[i]=toupper(ch[i]);
            //printf("%c",ch[i]);
        }
        printf("%s",ch);
    }

    else if (lower == upper)
    {
        for (i=0;i<l;i++)
        {
            //ch[i]=ch[i]+32;
            ch[i]=tolower(ch[i]);
            //printf("%c",ch[i]);
        }
        printf("%s",ch);
    }

}

#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>

int main()
{
  int i,b,sum=0,up=0,low=0;
  char s[100];
  scanf("%s",&s);
  for(i=0;s[i]!='\0';i++)
  {
    if(s[i]<97)
    up++;
    else
    low++;
  }
  if(up>low)
  {
    for(i=0;s[i]!='\0';i++)
    printf("%c",toupper(s[i]));
  }
  else{
    for(i=0;s[i]!='\0';i++)
    printf("%c",tolower(s[i]));
  }
  return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
    char ch[105];
    while(gets(ch)){
        int i,len = strlen(ch);
        int count = 0, bount = 0;
        for(i = 0; i < len; i++){
            if(ch[i] >= 65 && ch[i] <=90){
                count++;
            }
            else if(ch[i] >= 97 && ch[i] <= 122){
                bount++;
            }
        }
            if(count > bount){
                for(i = 0; i< len; i++){
                    printf("%c", toupper(ch[i]));
                }
            }
            else{
                for(i = 0; i< len; i++){
                    printf("%c", tolower(ch[i]));
                }
            }
            printf("\n");
    }
    }

#include<stdio.h>
#include<string.h>
int main()
{
    char s[1000];
    int i,a=0,b=0;
    gets(s);
    for(i=0;i<strlen(s);i++)
    {
        if(s[i]>='A' && s[i]<='Z')
          a++;
        else
            b++;
    }
    if(a>b)
        printf("%s",strupr(s));
    else
        printf("%s",strlwr(s));
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main()
{
	char str[100];
	scanf("%s",str);
	int t,upper=0,lower=0,len,i;
	len = strlen(str);
	for(i=0;i<len;i++)
	{
		t = str[i];
		if((t>=65)&&(t<=90))
			upper++;
		else if((t>=97)&&(t<=122))
			lower++;
	}
	if(lower>=upper)
	{
		for(i=0;i<len;i++)
		{
			t = str[i];
			if((t>=65)&&(t<=90))
			{
				t += 32;
				str[i] = t;
			}
		}
	}
	else
	{
		for(i=0;i<len;i++)
		{
			t = str[i];
			if((t>=97)&&(t<=122))
			{
				t -= 32;
				str[i] = t;
			}
		}
	}
	printf("%s\n",str);
	return 0;
}

    #include<stdio.h>
    int main()
    {
        char s[101];
        gets(s);
        int capital=0,small=0,i,ans;
        for(i=0;i<strlen(s);i++)
        {
            if(s[i]>=65 && s[i]<=90)
            {
                capital++;
            }
            else if(s[i]>=97 && s[i]<=122)
            {
                small++;
            }
        }
        if(capital>small)
        {
           ans= strupr(s);
        }
        else
        {
           ans= strlwr(s);
        }
        printf("%s\n",ans);

        return 0;
    }

#include<stdio.h>
#include<string.h>
int main(){
    char str[101];
    scanf("%s",str);
    int n,c=0,d=0;
    n=strlen(str);
    for(int i=0;i<n;i++){
        if(str[i]>='a'&&str[i]<='z'){
            c++;
        }else{
            d++;
        }
    }
    for(int i=0;i<n;i++){
        if(c>=d){
            if(str[i]<='Z'&&str[i]>='A'){
                str[i]=str[i]+32;
            }
        }else{
            if(str[i]<='z'&&str[i]>='a'){
            str[i]=str[i]-32;
            }
        }
    }
    printf("%s",str);
    return 0;
}

#include<stdio.h>
#include <string.h>

int main()
{
    int lowercase , uppercase ;
    lowercase = uppercase = 0;
    char string[1000];
    int i = 0 ;

    do{
        scanf("%c" , &string[i]);
        if ( string[i] >= 'a' && string[i] <= 'z')
            lowercase++;
        else
            uppercase++;
    }while( string[i++] != '\n');
    i = 0;
    if(lowercase >= --uppercase)
        while (string[i] != '\n')
            printf("%c" , tolower(string[i++]) );
    else
        while (string[i] != '\n')
            printf("%c" , toupper(string[i++]) );
    return 0;
}

int main(int argc, char *argv[]) {
	char s[200];
	int t,a,b;
	scanf("%s",&s);
    int i;
    a=0;b=0;
    for(i=0;i<strlen(s);i++){
    	if(s[i]<='z'&&'a'<=s[i]) a++;
    	else b++;
	}

    if(a>=b){
    	for(i=0;i<strlen(s);i++){
    		s[i]=tolower(s[i]);
    	}
    }
    else{
    	for(i=0;i<strlen(s);i++){
    		s[i]=toupper(s[i]);
    	}
	}
    printf("%s",s);
	return 0;
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main()
{
   char a[101];
   int counter_uppercase=0,counter_lowercase=0;
   int i;
   gets(a);
   for(i=0;a[i]!='\0';i++)
    {
        if(islower(a[i]))      counter_lowercase++;
        else if(isupper(a[i])) counter_uppercase++;
    }
    if(counter_uppercase<=counter_lowercase)
    {
         for(i=0;a[i]!='\0';i++)
           a[i]=tolower(a[i]);
    }
    else
    {
         for(i=0;a[i]!='\0';i++)
            a[i]=toupper(a[i]);
    }
    puts(a);
}

#include<stdio.h>
#include<string.h>
main(){
  char A[10000];
  int tam,i,min,may;
  may=0;
  gets(A);
  tam=strlen(A);
  for(i=0;i<tam;i++){
    if(A[i]<'a')
      may++;
  }
  min=tam-may;
  if(may>min){
    for(i=0;i<tam;i++){
      if(A[i]>'Z')
        A[i]=A[i]-' ';
    }
  }
  else{
    for(i=0;i<tam;i++){
      if(A[i]<'a')
        A[i]=A[i]+' ';
    }
  }
  for(i=0;i<tam;i++){
    printf("%c",A[i]);
  }
  return 0;
}

    #include<stdio.h>
    #include<string.h>
    int main(){
    	char s[101];
    	int i,c=0;
    	scanf("%s",s);
    	for(i=0;i<strlen(s);i++)
    		if(s[i]<'a')
    			c++;
    	printf("%s",c>strlen(s)/2 ? strupr(s):strlwr(s));
    }

#include<stdio.h>
#include<string.h>
int main()
{char c[10000];
long l,n,i,max;max=0;n=0;

gets(c);l=strlen(c);for(i=0;i<l;i++)
{
if(isupper(c[i]))
    n++;
else
    max++;
}

    for(i=0;i<l;i++)
    printf("%c",(max>=n)?tolower(c[i]):toupper(c[i]));
printf("\n");
return 0;}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main() {
    char s[100] ;
    int i, n , l=0 , u=0 ;
    scanf("%s", s) ;
    n= strlen(s) ;
    for (i=0 ; i<n ; i++)
    {
        if(isupper(s[i]))
        {
            u=u+1 ;
        }
        else
        {
            l=l+1 ;
        }
    }
    if(l>=u)
    {

            printf("%s", strlwr(s)) ;

    }
    else
    {

            printf("%s", strupr(s)) ;

    }

    return 0 ;
}

#include<stdio.h>
#include<string.h>
int main()
{
	int i,count=0,count1=0;
	char str1[1000];
	gets(str1);
	int length=strlen(str1);
	for(i=0;i<length;i++)
	{
		if(str1[i]>64 && str1[i]<=90)
		{
			count++;   // A to Z
		}
		if(str1[i]>=97 && str1[i]<=122)
		{
			count1++;     // a to z
		}
	}
	/*if(count1=count)
	{
		for(i=0;i<length;i++)
		{
			if(str1[i]>64 && str1[i]<=90)
			{
			str1[i]=str1[i]+32;
			}
		}
	}*/

	if(count1 >= count)
	{
		for(i=0;i<length;i++)
		{
			if(str1[i]>64 && str1[i]<=90)
			{
			str1[i]=str1[i]+32;
			}
		}
	}

	else
	{
		for(i=0;i<length;i++)
		{
			if(str1[i]>=97 && str1[i]<=122)
			{
			str1[i]=str1[i]-32;
			}
		}
	}
	puts(str1);

}

#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main (void)

{
	char s[101];
	int up=0, lo=0;
	fgets(s, 101, stdin);

	for(int i=0; i<strlen(s); i++)
	{
		   if(s[i]>='a'&&s[i]<='z')
                lo++;
            else if(s[i]>='A'&&s[i]<='Z')
                up++;

	}

	if (up > lo)
	{

			printf("%s", strupr(s));

	}

	else if (lo>=up)
			printf("%s", strlwr(s));

return 0;
}

#include <stdio.h>
#include <string.h>
char s[105];
int l,i,b=0,k=0;
int main(){
	scanf("%s",s);
	l=strlen(s);
	for(i=0;i<l;i++)
		if(s[i]<'a')
			b++;
		else
			k++;

	for(i=0;i<l;i++)
		if(b>k){
			if(s[i]>='a')
				s[i]-=32;
		}
		else{
			if(s[i]<'a')
				s[i]+=32;
		}
	printf("%s",s);
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main()
{
	char word[100];
	gets(word);

	int upper=0, lower=0;
	for (int i = 0; i < strlen(word); ++i)
	{
		if (isupper(word[i]))
		{
			upper++;
		}
		else
		{
			lower++;
		}
	}
	if (upper>lower)
	{
		for (int i = 0; i < strlen(word); ++i)
		{
			printf("%c", toupper(word[i]));
		}
	}
	else
	{
		for (int i = 0; i < strlen(word); ++i)
		{
			printf("%c", tolower(word[i]));
		}
	}
	return 0;
}

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{

                char a[102];
                int i;
                int scount=0;
                int ccount=0;
                scanf("%s",a);
                int l=strlen(a);
                for(i=0;i<l;i++)
                {
                                if(a[i]!='\0')
                                {
                                if(a[i]>=97 && a[i]<=122)
                                {
                                            scount++;

                                            }
                                            else
                                            {
                                                ccount++;

                                                }
                                                }
                                                }

                                                for(i=0;i<l;i++)
                                                {
                                                                if(a[i]!='\0')
                                                                {
                                                                if(scount==ccount)
                                                                {

                                                                                if(a[i]>=65 && a[i]<=90  )
                                                                                {
                                                                                a[i]=a[i]+32;

                                                                                }
                                                                }
                                                                else if(ccount>scount)
                                                                {
                                                                                if(a[i]>=97 && a[i]<=122)
                                                                                {
                                                                                a[i]=a[i]-32;

                                                                                }

                                                                }
                                                                else
                                                                {
                                                                      if(a[i]>=65 && a[i]<=90)
                                                                                {
                                                                                a[i]=a[i]+32;
                                                                                }
}
}
}
printf("%s\n",a);
//system("Pause");
return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
int i,c=0,t=0;
char s[100];
scanf("%s",s);
for(i=0;s[i]!='\0';i++)
{
if(s[i]>='a'&&s[i]<='z'){
c=c+1;
}
if(s[i]>='A'&&s[i]<='Z'){
t=t+1;
}
}
if(c>=t)
puts(strlwr(s));
if(t>c)
puts(strupr(s));
return 0;
}

#include<stdio.h>
#include<string.h>

int main()
{
    char s[1000],count=0;
    scanf("%s",s);
    int p=strlen(s);
    for(int i=0;i<p;i++)
    {
        if(s[i]<'a')
        count++;
    }

    printf("%s",count>p/2?strupr(s):strlwr(s));
    return 0;
}

#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main()
{
    char x[101],a=0,b=0,i;

    gets(x);

    for(i=0;i<strlen(x);i++)
    { if(x[i]<97) b++; else a++; }

    if(b>a) for(i=0;i<strlen(x);i++) x[i]=toupper(x[i]);

    else for(i=0;i<strlen(x);i++) x[i]=tolower(x[i]);

    puts(x);
}

#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main()
{
char a[105]={"\0"},b[105]={"\0"};
int count1=0,count2=0,i,d;
scanf("%s",a);
d=strlen(a);
for(i=0;i<d;i++)
{
	if(isupper (a[i]))
	count1++;
	else
	count2++;
}
if(count1>count2)
{
	for(i=0;i<d;i++)
	 b[i]=toupper (a[i]);
	printf("%s",b);
}
else
{
	for(i=0;i<d;i++)
	b[i]=tolower(a[i]);
	printf("%s",b);
}
return 0;
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main(){
	char s[101];
	int cntmin = 0, cntmax = 0, i;
	scanf("%s", &s);
	for(i = 0; i < strlen(s); i++){
		if(s[i] > 'Z') cntmin++;
		else cntmax++;
	}
	if(cntmin >= cntmax){
		for(i = 0; i < strlen(s); i++){
			s[i] = tolower(s[i]);
		}
		printf("%s\n", s);

	}
	else{
		for(i = 0; i < strlen(s); i++){
			s[i] = toupper(s[i]);
		}
		printf("%s\n", s);
	}
	return 0;
}

#include<stdio.h>
#include<string.h>
int uppercase_count(char s[101])
{
 int i=0,c=0;
 while(s[i]!=0)
 {
  if(s[i]>='A'&&s[i]<='Z')
  c++;
  i++;
 }
 return c;
}
int main(){
 int n,u,l;
 char str[101];
 scanf("%s",str);
 u=uppercase_count(str);
 n=strlen(str);
 l=n-u;
 if(l>=u)
 printf("%s",strlwr(str));
 else
 printf("%s",strupr(str));
}

#include<stdio.h>
#include<string.h>
#include<ctype.h>

void stringlower(char *str, int n)
{
      int i;

      for(i = 0 ;i < n ;i++)
      {
            str[i]=tolower(str[i]);
      }
}

void stringupper(char *str, int n)
{
      int i;

      for(i = 0 ;i < n ;i++)
      {
            str[i]=toupper(str[i]);
      }
}

int main()
{
      char str[100];
      scanf("%s",str);

      int up=0;

      int i;

      for(i=0;i<strlen(str);i++)
      {
            if(str[i]!=tolower(str[i]))
            up++;
      }

      if(strlen(str)<2*up)
      stringupper(str,strlen(str));

      else
      stringlower(str,strlen(str));

      printf("%s",str);

}

#include <stdio.h>
#include <string.h>

int main(){
	char s[100];

	char l[100];
	char u[100];

	scanf("%s", s);

	int i, lw = 0, up = 0;
	int flag = 1;
	for(i = 0; i < strlen(s); i++){
		if(s[i] > 96){
			lw++;
			flag = 0;
		} else {
			up++;
			flag = 1;
		}

		if(flag == 0){
			l[i] = s[i];
			u[i] = s[i] - 32;
		} else {
			l[i] = s[i] + 32;
			u[i] = s[i];
		}
	}

	if(up > lw){
		printf("%s", u);
	} else {
		printf("%s", l);
	}

	return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include<string.h>

int Fn_Mm(char ch[100])
{
 int l,i,M=0,m=0;
 l=strlen(ch);
   for (i=0;i<l;i++)
   {
      if(isupper(ch[i]))
      {
          M++;
      }
      else
        {
        m++;
        }

   }
      if(M>m)
      {
          return 1;
      }
      else
      {
          return 0;
      }

}

int main()
{
    int c,i;
    char ch[100];
    scanf("%s",&ch);

c=Fn_Mm(ch);
if (c)
{
    for (i=0 ;i<strlen(ch);i++)
    {
        if (islower(ch[i]))
        {
            ch[i]=(toupper(ch[i]));
        }
    }
}
else
{
    for (i ;i<strlen(ch);i++)
    {
        if (isupper(ch[i]))
        {
            ch[i]=(tolower(ch[i]));
        }
    }

}
return 0 ;
}

#include<stdio.h>
#include<string.h>
int main(){
    char a[100],b;
    int i,c=0;
    scanf("%s",a);
    for(i=0;i<strlen(a);i++){
        if(isupper(a[i]))c++;
        else b++;
    }if(c-b>0)printf("%s\n", strlwr(a));
    else printf("%s\n", strupr(a));
    return 0;
}

#include <stdio.h>
#include<string.h>
int main()
{
    char str[100];
    int len,count=0,n;
    len=strlen(str);
    scanf("%s",str);
    for(int i=0;i<len;i++)
    {
        if(str[i]<91)
        count++;
    }
    if(count>len/2)
    {
        for(int i=0;i<len;i++)
        {
            if(str[i]>=97)
            {
                str[i]=str[i]-32;
            }
        }
    }
    else
    {
        for(int i=0;i<len;i++)
        {
            if(str[i]<=90)
            {
                str[i]=str[i]+32;
            }
        }
    }
    printf("%s",str);

    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
int i,c=0,t=0;
char s[100];
scanf("%s",s);
for(i=0;s[i]!='\0';i++)
{
if(s[i]>='a'&&s[i]<='z'){
c=c+1;
}
if(s[i]>='A'&&s[i]<='Z'){
t=t+1;
}
}
if(c>t)
puts(strlwr(s));
if(t>c)
puts(strupr(s));
return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>
#include<string.h>
int main(){
	int cntu, cntl, i, j;
	char str[101];
	fgets(str, 100, stdin);
	for(i = 0; str[i] != '\0'; i++){
		if(isupper(str[i])){
			cntu++;
		}
		else{
			cntl++;
		}
	}
	if(cntl >= cntu){
		for(j = 0; str[j] != '\0'; j++){
			printf("%c", tolower(str[j]));
		}
	}
	else{
		for(j = 0; str[j] != '\0'; j++){
			printf("%c", toupper(str[j]));
		}
	}
}

#include <stdio.h>
#include <ctype.h>
#include <string.h>

int main(int argc, char *argv[]) {
	int lows = 0, uprs = 0;
	char str[256];
	int i;
	scanf("%s", str);
	for (i = 0; i < strlen(str); i++) {
		lows += islower(str[i]) ? 1 : 0;
		uprs += isupper(str[i]) ? 1 : 0;
	}
	lows = lows - uprs + 1;
	for (i = 0; i < strlen(str); i++) {
		printf("%c", lows ? tolower(str[i]) : toupper(str[i]));
	}

	return 0;
}

#include <stdio.h>
#include <ctype.h>

int main(){
  char c, arr[101];
  int mayus = 0, minus = 0, size = 0;
  while((c = getchar()) != '\n' && c != '\0'){
    arr[size] = c;
    size++;
    if(islower(c)){
      minus++;
    }
    if(isupper(c)){
      mayus++;
    }
  }
  if(mayus > minus){
    for(int i = 0; i < size + 1; i++){
      arr[i] = toupper(arr[i]);
      printf("%c",arr[i]);
    }
  }else{
    for(int i = 0; i < size + 1; i++){
      arr[i] = tolower(arr[i]);
      printf("%c",arr[i]);
    }
  }
}

#include<stdio.h>
#include<string.h>
int main()
{
    char str[100],str1[100],str2[100];
    int l,i,a=0,b=0;
    gets(str);
    l=strlen(str);
    for(i=0; i<l; i++)
    {
        if(str[i]>='a' && str[i]<='z')
        {
            a++;
        }
        else if(str[i]>='A' && str[i]<='Z')
        {
            b++;
        }
    }

   for(i=0; i<l; i++)
    {
        if(a>=b)
        {
            str1[i]=tolower(str[i]);
        }
        else if(b>a)
        {
            str2[i]=toupper(str[i]);
        }

    }
    if(a>=b)
   {

       puts(str1);
   }
   else if(b>a)
   {

       puts(str2);
   }

}

#include<stdio.h>
#include<string.h>
int main()
{
int i,c=0,t=0;
char s[100];
scanf("%s",s);
for(i=0;s[i]!='\0';i++)
{
if(s[i]>='a'&&s[i]<='z')
c=c+1;
if(s[i]>='a'&&s[i]<='z')
t=t+1;
}
if(c>t)
puts(strlwr(s));
if(t>c)
puts(strupr(s));
return 0;
}

#include <stdio.h>
#include <ctype.h>

int main(void)
{
    char str[100];
    int upper = 0;
    int lower = 0;
    int j = 0;
    int k = 0;
    scanf("%[^\n]%*c", str);

    int size = sizeof(str) / sizeof(str[0]);

    for(int i = 0; i < size; i++)
    {
        if(str[i] >= 'A' && str[i] <'Z')
        {
            upper++;
        }
        else
        {
            lower++;
        }
    }

    if(upper > lower)
    {
        while(str[j]) {
        putchar (toupper(str[j]));
        j++;
        }
    }
    else
    {
        while(str[k]) {
        putchar (tolower(str[k]));
        k++;
        }
    }

    return 0;
}

#include<stdio.h>
#include<string.h>

int main()
{
     int i=0,t=0;
     float n;
   char A[100];
   gets(A);
   n=strlen(A);
   while(A[i]!='\0')
   {
       if((char)A[i]>97)
       t++;
       i++;
   }i=0;
   if((n-t)<=t)
   {
       while(A[i]!='\0')
       {
           if((char)A[i]<97)
           A[i]=(char)A[i]+32;
           i++;
       }
   }
   else
   {
       while(A[i]!='\0')
       {
           if((char)A[i]>97)
           A[i]=(char)A[i]-32;
           i++;
       }
   }
   printf("%s",A);
    return 0;
}

#include<stdio.h>
#include<math.h>
#include<string.h>
int main ()
{
    char str[100];
    int value=0;
    int num;
    scanf("%s",str);
    num=strlen(str);
    for(int i=0;i<num;i++)
    {
        if(str[i]>97)
        {
            value++;
        }
    }
    if(value>num-value)
    {
        printf("%s",strlwr(str));
    }
    else
    {
        printf("%s",strupr(str));
    }

}

int main() {

    char input[101];

    scanf("%s", input);

    int small = 0, big = 0;

    char *tempPointer = input;

    while (*tempPointer != '\0') {
        if (*tempPointer >= 'a' && *tempPointer <= 'z')
            small++;
        else
            big++;
        tempPointer++;
    }

    int diff = small > big ? 40 : -40;

    tempPointer = input;
    while (*tempPointer != '\0') {

        if (diff == 40 && *tempPointer >= 'A' && *tempPointer <= 'Z')
            *tempPointer = (char ) ( *tempPointer + diff );
        else if (diff == -40 && *tempPointer >= 'a' && *tempPointer <= 'z') {
            *tempPointer = (char ) ( *tempPointer + diff );
        }
        tempPointer++;
    }

    printf("%s\n", input);

}

#include <stdio.h>
#include <string.h>
#include<ctype.h>
int k;
int main(){
    char s[101]; scanf("%d\n",&s);
    long long int l=0,u=0;
    int len=strlen(s);
    for(k = 0; k <len;++k){if(s[k]<='z'&&s[k]>='a')
                                l++;

                             else
                             u++;
                                }
     if(l>=u){
                for(k = 0; k <len; ++k){s[k]=tolower(s[k]);}
                printf("%s",s);
                return 0;
            }
     else{
                    for(k = 0; k <len; k++){s[k]=toupper(s[k]);}
                    printf("%s",s);
                return 0;
                    }
}

#include <stdio.h>
#include <string.h>

int main(){
    char a[200];
    scanf("%s",&a);
    int i,rev_sum,len,sum = 0;
    len = strlen(a);
    for (i = 0; i < len; i++){              //for flagging the smaller words.
        if (a[i] > 90){
            sum = sum+1;
        }
    }
    rev_sum = len - sum;                    //total amount of capital word
    if (rev_sum > sum ){
        for (i = 0;i < len;i++){
            if (a[i] > 90){
                a[i] = a[i] - 32;
            }
        }
    }
    else {
        for (i = 0;i < len;i++){
            if (a[i] < 90){
                a[i] = a[i] + 32;
            }
        }
    }
    printf("%s\n",a);
}

#include <stdio.h>
//#include<string.h>
int main()
{
    char str[100];
    int len,count=0,n;
    len=strlen(str);
    scanf("%s",str);
    for(int i=0;i<len;i++)
    {
        if(str[i]<91)
        count++;
    }
    if(count>len/2)
    {
        for(int i=0;i<len;i++)
        {
            if(str[i]>=97)
            {
                str[i]=str[i]-32;
            }
        }
    }
    else
    {
        for(int i=0;i<len;i++)
        {
            if(str[i]<=90)
            {
                str[i]=str[i]+32;
            }
        }
    }
    printf("%s",str);

    return 0;
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main (void)

{
	char s[100];
	int up=0, lo=0;
	fgets(s, 100, stdin);

	for(int i=0; i<strlen(s); i++)
	{
		if(isupper(s[i]))
		{
			up++;
		}
		else if (islower(s[i]))
		{
			lo++;
		}
	}

	if (up > lo)
	{

			printf("%s", strupr(s));

	}

	else if (lo>=up)
			printf("%s", strlwr(s));

}

#include<stdio.h>
#include<string.h>
main()
{
    int r,i,up=1,lw=0;
	char a[101];
	gets(a);
	r=strlen(a);
	for(i=0;i<r;i++)
	if(a[i]<'a')
       {
  up++;
}else
{
	lw++;
}

	if(up>=lw)
	printf("%s",strupr(a));
	else
	printf("%s",strlwr(a));
}

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
	char s[100] ,t[100];
	int nb1 ,nb2 ,i;
	scanf("%s",s);
	nb1=0;
	nb2=0;
	for (i=0;i<strlen(s);i++)
	{
		if (isupper(s[i]))
		{ nb1=nb1+1 ;
		}
		else
		    {
			nb2=nb2+1 ;
		   }
	}

    if (nb1==0)
      {
      for (i=0;i<strlen(s);i++)
      	{
		  t[i]=toupper(s[i]);
	    }
	  }
	  else if (nb2==0)
	  {
	  for (i=0;i<strlen(s);i++)
	   {
		 t[i]=tolower(s[i]);
	    }
	  }

	 else if (nb1>nb2)
	{ 	for (i=0;i<strlen(s);i++)
	    {
	       t[i]=toupper(s[i]);
		}
   }
    else if ( nb1 <nb2)
	  {for (i=0;i<strlen(s);i++)
	     {
	       t[i]=tolower(s[i]);
		 }
	  }
	  else
	  {for (i=0;i<strlen(s);i++)
	  { t[i]=tolower(s[i]);
	  }
	  }

	printf("%s",t);
	return 0;
}

#include<stdio.h>
int main()
{
char s[100];
int n,c=0,r=0,j=0;
gets(s);
n=strlen(s);
for(int i=0;i<n;i++)
{
if(s[i]>='a'&&s[i]<='z')
{
c++;
}
else
{
r++;
}
}
j=(n+1)/2;
if(c>j)
{
puts(strlwr(s));
}
else
{
puts(strupr(s));
}

return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
	int i,j,count=0,count1=0;
	char word[100],newword[100];
	scanf("%s",&word);
	for(i=0;i<strlen(word);i++)
	{
		if(word[i]>=65&&word[i]<=90)
			count++;
		else if(word[i]>=97&&word[i]<=122)
			count1++;
	}
	if(count>(strlen(word)/2))
	{
		for(i=0;i<strlen(word);i++)
		{
			if(word[i]>=65&&word[i]<=90)
				newword[i]+=word[i];
			else
				newword[i]+=(word[i]-32);
		}
	}
	else if(count1>=(strlen(word)/2))
	{
		for(i=0;i<strlen(word);i++)
		{
			if(word[i]>=97&&word[i]<=122)
				newword[i]+=word[i];
			else
				newword[i]+=(word[i]+32);
		}
	}
	printf("%s",newword);
	return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
    int i,j=0,k=0;
    char str[100];
    gets(str);
    for(i=0; i<strlen(str); i++)
    {
        if(str[i] >= '65' || str[i] <= '90')    j++;
        else if(str[i] >= '97' || str[i] <= '122') k++;
    }

    //.printf("%d %d", j,k);
    if(j < k)
    {
        for(i=0; i<strlen(str); i++)
        {
            str[i] = toupper(str[i]);
        }
        printf("%s", str);
    }
    else
    {
        for(i=0; i<strlen(str); i++)
        {
            str[i] = tolower(str[i]);
        }
        printf("%s", str);
    }
    return 0;
}

#include<stdio.h>
int main()
{
    int n, a, b, i, w, q, y;
    scanf("%d %d %d",&n,&a,&b);
    if (b>1&&b<=6)
    {
        for (i=a ;i<n-1 ;i++)
        {
            i=i;
        }
        printf("%d",i);
    }
    if (b<1)
    {
        y=n+a+b;
        printf("%d",y);
    }
    if (b>n)
    {
        q=b-n;
        w=q-a+1;
        printf("%d",w);
    }
    return 0;
}

#include <stdio.h>
#include <string.h>
int main()
{
    char s[101];
    int x=0,y=0,l,i,j;
    scanf("%s",s);
    l=strlen(s);
    s[l];
    for(i=0;i<l;i++)
    {if(s[i] >= 'A' && s[i] <= 'Z')
    x++;
    if(s[i] >= 'a' && s[i] <= 'z')
    y++;
    }

    if(x>y) {for(j=0;j<l;j++) putchar (toupper(s[j]));printf("%c",s[j]);}
    else {for(j=0;j<l;j++) putchar (tolower(s[j]));printf("%c",s[j]);}

    return 0;
}

#include<stdio.h>
int main()
{
	int i,j,o=0,count=0;
	char string[100],array[100];
	scanf("%s",string);
	for(i=0;string[i]!='\0';i++)
	{
		if(string[i]<=122 && string[i]>=97)
			count++;
	}
//	printf("%d\n",i );
//	printf("%d\n",count );
	//char array[i];
	if(count>=i/2)
	{
		for(j=0;string[j]!='\0';)
		{
			if(string[j]<97)
				{
					array[o]=string[j]+32;
					o++;
					j++;
				}
			else
				{
					array[o]=string[j];
					o++;
					j++;
				}
		}
	}
	else
	{
	for(j=0;string[j]!='\0';j++)
		{
			if(string[j]>90)
				{
					array[o]=string[j]-32;
					o++;
				}
			else
				{
					array[o]=string[j];
					o++;
				}
		}
	}
	printf("%s\n",array);
	return 0;
}

#include <stdio.h>
#include <ctype.h>
#include <string.h>
int main()
{
    char ch [1000];
    int i,m,maj,min ;
    scanf ("%s" , ch);
    m=strlen(ch);
    maj==0 ;
    min==0;
    for (i=0;i<m;i++)
    {
     if (isupper (ch[i])){
     maj=maj+1 ;}
     else
     min=min+1;
    }
    if (maj>min)
    {
    for (i=0;i<m;i++)

        ch[i]=toupper (ch[i]);
    }

    else if (maj<min)
    {
    for (i=0;i<m;i++)
    ch[i]=tolower (ch[i]);
    }
    else
    {
    for (i=0;i<m;i++)
    {
    ch[i]=tolower (ch[i]);
    }
    }
    printf ("%s",ch);

    return 0;
}

#include <stdio.h>
#include <string.h>
int main(void) {
    int i,l,u,n,k,j;
    char s[100];
    scanf("%s",s);
    n=strlen(s);
    i=0;
    while(i<=n){
        if (s[i]<'a'){u++;}
        else {l++;}
        i++;
    }
    printf("%d %d ",u,l);

    if (l>=u){j=0;
        while(j<n){
        if (s[j]<'a'){ s[j]=tolower(s[j]);}
        j++;}}
    else if (l<u){
        k=0;
        while(k<n){
            if(s[k]>='a')
        {s[k]=toupper(s[k]);}
        k++;}}

    printf("%s",s);
    return 0;
}

#include<stdio.h>
#include<string.h>

int main()
{
	char word[102];
	int i, small=0, capital=0;
	for(i=0; word[i-1] != '\n'; i++)
	{
		scanf("%c",&word[i]);
		if(word[i] <97 && word[i] >=65)
		capital++;
		else if(word[i] >=97 && word[i] <=122)
		small++;

	}
	if(small < capital )
	{
		 printf("%s\n",strupr(word));
	}
	else
	{
		 printf("%s\n",strlwr(word));
	}
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
int main(){
    char a[100],b;
    int i,c=0;
    scanf("%s",a);
    for(i=0;i<=strlen(a);i++){
        if(isupper(a[i]))c++;
        else b++;
    }if(c-b>0)printf("%s\n", strlwr(a));
    else printf("%s\n", strupr(a));
    return 0;
}

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>

int main()
{
	char myString[101], str[101];
	int i, upper, lower;
	gets(myString);
	for(i = 0; i < strlen(myString); i++){
		if(myString[i] >= 'A' && myString[i] <= 'Z'){
			upper++;
		}
		else{
			lower++;
		}
	}
	//printf("%d %d\n", upper, lower);
	if(lower >= upper){
		for(i = 0; i < strlen(myString); i++){
			if(myString[i] >= 'A' && myString[i] <= 'Z'){
				str[i] = myString[i] + 32;
			}
			else if(myString[i] >= 'a' && myString[i] <= 'z'){
				str[i] = myString[i];
			}
		}
	}
	else if(upper > lower){
		for(i = 0; i < strlen(myString); i++){
			if(myString[i] >= 'A' && myString[i] <= 'Z'){
				str[i] = myString[i];
			}
			else{
				str[i] = myString[i] - 32;
			}
		}
	}
	puts(str);

	return 0;
}

#include<stdio.h>
#define maxsize 101
char str[maxsize];
void display(void)
{
    int i;
    i=0;
    while(str[i]!='\0')
    {
        printf("%c", str[i]);
        i++;
    }
}
int main()
{
    int i;
    int lcount,ucount;
    ucount=0;
    lcount=0;
    printf("enter the string\n");
    scanf("%s", str);
    i=0;
    while(str[i]!='\0')
    {
        if(str[i]>=65&&str[i]<=90)
            ucount++;
        else if(str[i]>=97&&str[i]<=122)
            lcount++;
           i++;
    }
    //printf("number of upper case letter is %d\n", ucount);
    //printf("number of lower case letter is %d\n", lcount);
   if(ucount>lcount)
   {
       i=0;
       while(str[i]!='\0')
       {
          if(str[i]>=97&&str[i]<=122)
               str[i]=str[i]-32;
           i++;
       }
    }
    else if(ucount<=lcount)
    {
       i=0;
       while(str[i]!='\0')
       {
          if(str[i]>=65&&str[i]<=90)
               str[i]=str[i]+32;
          i++;
       }
    }
    display();
getchar();
return 0;
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(){
    char pal[100];
    char minn[100];
    char maiu[100];
    int nn=0, mm=0;
    scanf("%s", pal);
    int tam= strlen(pal);
    for (int i =0; i<tam;++i){
        minn[i]=tolower(pal[i]);
        maiu[i]=toupper(pal[i]);
    }
    for (int i =0; i<tam;++i){
        if(pal[i]==minn[i])
            nn++;
        else if(pal[i]==maiu[i])
            mm++;
    }
    if(nn==mm)
        printf("%s", minn);
    else if(nn>mm)
        printf("%s", minn);
    else
        printf("%s", maiu);
    printf("\n");
    return 0;
}

#include<stdio.h>
int main()
{
	int i,j,o=0,count=0,l;
	char string[100],array[100];
	scanf("%s",string);
	for(i=0;string[i]!='\0';i++)
	{
		if(string[i]<=122 && string[i]>=97)
			count++;
	}
//	printf("%d\n",i );
//	printf("%d\n",count );
	//char array[i];
	if(count>i/2 && i%2!=0)
	{
		for(j=0;string[j]!='\0';)
		{
			if(string[j]<97)
				{
					array[o]=string[j]+32;
					o++;
					j++;
				}
			else
				{
					array[o]=string[j];
					o++;
					j++;
				}
		}
	}
	else if(count>=i/2 && i%2==0)
{
for(j=0;string[j]!='\0';)
		{
			if(string[j]<97)
				{
					array[o]=string[j]+32;
					o++;
					j++;
				}
			else
				{
					array[o]=string[j];
					o++;
					j++;
				}
		}
	}
	else
	{
	for(j=0;string[j]!='\0';j++)
		{
			if(string[j]>90)
				{
					array[o]=string[j]-32;
					o++;
				}
			else
				{
					array[o]=string[j];
					o++;
				}
		}
	}
	//for(l=0;l<o;l++)
	//printf("%c",array[l]);
	printf("%s",array);
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main()
{

    char str1[110];
    int i,j,l,flagLow=0,flagHigh=0,m,n;

    scanf("%s",str1);
    l=strlen(str1);

    for(i=0; i<l; i++)
    {
        m=isupper(str1[i]);
        if(m==1)
        {
            flagHigh++;
        }
        else
        {
            flagLow++;
        }
    }

    if(flagHigh>=flagLow)
    {
        for(j=0; j<l; j++)
        {
            str1[j]=toupper(str1[j]);
        }
        printf("%s",str1);
    }

    else if(flagHigh<=flagLow)
    {
        for(j=0; j<l; j++)
        {
            str1[j]=tolower(str1[j]);
        }
        printf("%s",&str1);

    }

    return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
    int i,j,k,l,count=0,count1=0;

    char str[100];

    l=strlen(str);

    for(i=0;i<l;i++)
    {
      if(str[i]>='a'&& str[i]<='z')
     { count++;}

      if(str[i]>='A'&& str[i]<='Z')

     { count1++;}

    }

    if(count>count1 && count==count1)
    {
        for(j=0;j<l;j++)

        str[j]=tolower(str[j]);
    }
   else
     {
        for(k=0;k<l;k++)

        str[k]=toupper(str[k]);
    }

    printf("%d",str);

}

#include<stdio.h>
#include<string.h>
#include<ctype.h>

int main()
{
    char s[101];
    gets(s);
    int len=strlen(s);
    char x[len];
    int cap=0;
    int sma=0;
    for(int i=0; i<len; i++)
    {
        if(s[i]>='A' && s[i]<='Z')
            cap++;

        if(s[i]>='a' && s[i]<='z')
            sma++;
    }
    if(cap>sma)
    {
        for(int i=0; i<len; i++)
        {
            x[i]=toupper(s[i]);
        }
        printf("%s\n", x);
    }
    else
    {
        for(int i=0; i<len; i++)
        {
            x[i]=tolower(s[i]);
        }
        printf("%s\n", x);
    }
    return 0;
}

#include<stdio.h>
#include<math.h>
#include<string.h>
int main ()
{
    char str[100];
    int value=0;
    int num;
    scanf("%s",str);
    num=strlen(str);
    for(int i=0;i<num;i++)
    {
        if(str[i]>97)
        {
            value++;
        }
    }
    if(value>num-value)
    {
        printf("%s",strlwr(str));
    }
    else
    {
        printf("%s",strupr(str));
    }

}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
	char str[100];
	scanf("%s",str);
	int i=0,l=strlen(str);
	char *ch=calloc(1,l);
	int up=0,lw=0;
	while(i<l)
	{
		up=(str[i]>='A'&&str[i]<='Z')?up+1:up;
		lw=(str[i]>='a'&&str[i]<='z')?lw+1:lw;
		i++;
	}
	i=0;
        while(i<l)
        {
		if(lw>=up)
                	ch[i]=(str[i]>='A'&&str[i]<='Z')?str[i]+32:str[i];
		else
			ch[i]=(str[i]>='A'&&str[i]<='Z')?str[i]:str[i]-32;
                i++;
        }
	printf("%s\n",ch);
}

#include<stdio.h>
#include<string.h>
main()
{
    int r,i,up,lw;
	char a[101];
	gets(a);
	r=strlen(a);
	for(i=0;i<r;i++)
	if(a[i]<'a')
       {
  up++;
}else
{
	lw++;
}

	if(up>=lw)
	printf("%s",strupr(a));
	else
	printf("%s",strlwr(a));
}

#include<stdio.h>
#include<string.h>

int main()
{
     int i=0,t=0;
     float n;
   char A[100];
   gets(A);
   n=strlen(A);
   while(A[i]!='\0')
   {
       if((char)A[i]>97)
       t++;
       i++;
   }i=0;
   if((n-t)<=t)
   {
       while(A[i]!='\0')
       {
           if((char)A[i]<97)
           A[i]=(char)A[i]+32;
           i++;
       }
   }
   else
   {
       while(A[i]!='\0')
       {
           if((char)A[i]>97)
           A[i]=(char)A[i]-32;
           i++;
       }
   }
   printf("%s",A);
    return 0;
}

#include <stdio.h>
main()
{
    int icount=0;
    char s[101];
    scanf("%s",s);
    for (int i=0;i<strlen(s);i++){
        if (s[i]>90)
            ++icount;
        else
            --icount;
    }
    if(icount>0){
    for(int i=0;i<=strlen(s);i++){
      if(s[i]>=65&&s[i]<=90)
         s[i]=s[i]+32;
   }}
    else{
        for(int i=0;i<=strlen(s);i++){
      if(s[i]>=96&&s[i]<=122)
         s[i]=s[i]-32;
    }

   }
   printf("%s",s);
return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include<string.h>

int Fn_Mm(char ch[100])
{
 int l,i,M=0,m=0;
 l=strlen(ch);
   for (i=0;i<l;i++)
   {
      if(isupper(ch[i]))
      {
          M++;
      }
      else
        {
        m++;
        }

   }
      if(M>m)
      {
          return 1;
      }
      else
      {
          return 0;
      }

}

int main()
{
    int c,i;
    char ch[100];
    scanf("%s",&ch);

c=Fn_Mm(ch);
if (c)
{
    for (i=0 ;i<strlen(ch);i++)
    {
        if (islower(ch[i]))
        {
            ch[i]=(toupper(ch[i]));
        }
    }
}
else
{
    for (i=0 ;i<strlen(ch);i++)
    {
        if (isupper(ch[i]))
        {
            ch[i]=(tolower(ch[i]));
        }
    }

}
return 0 ;
}

#include<stdio.h>
#include<string.h>

int main(){

	char str[500];

	int c1 = 0, c2 = 0;

	scanf("%s",str);

for(int i = 0;i < strlen(str);i++){

	if(str[i] >= 'A' && str[i] <= 'Z')
	c1++;

	if(str[i] >= 'A' && str[i] <= 'Z')
	c2++;

}

if(c1 > c2){

for(int i = 0;i < strlen(str);i++){

	str[i] = toupper(str[i]);

	printf("%c",str[i]);
}
}

else{

for(int i = 0;i < strlen(str);i++){

	str[i] = tolower(str[i]);

	printf("%c",str[i]);
}

}

}

#include<stdio.h>
#include<string.h>
int main()
{
    char str[100],str1[100],str2[100];
    int l,i,a=0,b=0;
    gets(str);
    l=strlen(str);
    for(i=0; i<l; i++)
    {
        if(str[i]>='a' && str[i]<='z')
        {
            a++;
        }
        else if(str[i]>='A' && str[i]<='Z')
        {
            b++;
        }
    }

   for(i=0; i<l; i++)
    {
        if(a>=b)
        {
            str1[i]=tolower(str[i]);
        }
        else if(b>a)
        {
            str2[i]=toupper(str[i]);
        }

    }
    if(a>=b)
   {
       int len=strlen(str1);
       str1[len+1]='\0';
       puts(str1);
   }
   else if(b>a)
   {
       int len=strlen(str2);
       str2[len+1]='\0';
       puts(str2);
   }

}

#include<stdio.h>
#include<string.h>
int main()
{
	int i,count=0,count1=0;
	char str1[120];
	gets(str1);
	int length=strlen(str1);
	for(i=0;i<length;i++)
	{
		if(str1[i]>64 && str1[i]<=90)
		{
			count++;   // A to Z
		}
		if(str1[i]>=97 && str1[i]<=122)
		{
			count1++;     // a to z
		}
	}
	/*if(count1=count)
	{
		for(i=0;i<length;i++)
		{
			if(str1[i]>64 && str1[i]<=90)
			{
			str1[i]=str1[i]+32;
			}
		}
	}*/

	if(count1 >= count)
	{
		for(i=0;i<length;i++)
		{
			if(str1[i]>64 && str1[i]<=90)
			{
			str1[i]=str1[i]+32;
			}
		}
	}

	else
	{
		for(i=0;i<length;i++)
		{
			if(str1[i]>97 && str1[i]<=122)
			{
			str1[i]=str1[i]-32;
			}
		}
	}
	puts(str1);

}

#include<stdio.h>
#include<string.h>
int main(void)
{
  char str1[100];
  scanf("%s", str1);
  for(int i=0; i<strlen(str1); i++){
    if(str1[i]<=90)
      str1[i] += 32;
  }
  printf("%s", str1);
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>

    int main(int argc, const char * argv[]) {

        char string[100];
        int upper=0,lower=0;
        int len = strlen(string);
        scanf("%s",string);
        for (int i =0;i<len;i++){
            if (isupper(string[i])) upper++;
            else if (islower(string[i]))lower++;
        }

        if (upper>lower){

            for (int i =0;i<len;i++){
                string[i] =toupper(string[i]);

            }

        }
        else {

            for (int i =0;i<len;i++){
               string[i]=tolower(string[i]);

            }

        }

        for (int i =0;i<len;i++){
            printf("%c",string[i]);
        }

        return 0;
    }

#include<stdio.h>
#include<string.h>

int main ()
{
char word[100];
int i;
int countlower=0,countupper=0;
scanf("%s",word);

for(i=1;i<=strlen(word);i++)
{
    if(islower(word[i])){
        countlower++;
    }
    else {
        countupper++;
    }
}
if(countlower>countupper)
{
    for(i=1;i<=strlen(word);i++)
    {
        word[i]=tolower(word[i]);
    }
    }else
     {
	 for(i=1;i<=strlen(word);i++)
     {
        word[i]=toupper(word[i]);
    }
}

printf("%s",word);
return 0;
}

#include<stdio.h>
#include <string.h>

int main()
{
    int lowercase , uppercase ;
    lowercase = uppercase = 0;
    char string[1000];
    int i = 0 ;

    do{
        scanf("%c" , &string[i]);
        if ( string[i] > 96  )
            lowercase++;
        else
            uppercase++;
    }while( string[i++] != '\n');
    i = 0;
    if(lowercase >= uppercase)
        while (string[i] != '\n')
        printf("\n%d %c" ,tolower(string[i]) ,tolower(string[i++]) );
    else
        while (string[i] != '\n')
        printf("%c" , toupper(string[i]), toupper(string[i++]) );
    return 0;
}

#include <stdio.h>
#include <ctype.h>
#include <string.h>
int main()
{
    char ch [1000];
    int i,m,maj,min ;
    scanf ("%s" , ch);
    m=strlen(ch);
    maj==0 ;
    min==0;
    for (i=0;i<m;i++)
    {
     if (isupper (ch[i])){
     maj=maj+1 ;}
     else
     min=min+1;
    }
    if (maj>min)
    {
    for (i=0;i<m;i++)

        ch[i]=toupper (ch[i]);
    }

    else{
    if (maj<=min)
    {
    for (i=0;i<m;i++)
    ch[i]=tolower (ch[i]);
    }
    }
    printf ("%s",ch);

    return 0;
}

#include<stdio.h>

int main(){
  char ch;
  char str[10000];
  int lower=0,count = 0,upper,index=0;
  while((ch = getchar())!='\n'){
    if(ch>=97)
      lower++;
    str[count++] = ch;
  }
  upper = count-lower;
  if(upper>lower){
    for(int itr=0;str[itr];itr++){
      if(str[itr]>=97){
        str[itr] = str[itr]-32;
      }
    }
  }else{
    for(int itr=0;str[itr];itr++){
      if(str[itr]<=97){
        str[itr] = str[itr]+32;
      }
    }
  }
  printf("%s",str);
  return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
     char c[100];
     int i, a, b;
     scanf("%s", &c);
     a=0;
     b=0;
     for(i=0;i<strlen(c); i++)
     {
         if(c[i]>=65 && c[i]<= 90)
            a++;
         else if(c[i]>=97 && c[i]<=122)
            b++;
     }
     if(a>b)
     printf("%s", toupper(c));
     else if(a<b)
        printf("%s", tolower(c));

    return 0;
}

#include <stdio.h>
#include <string.h>
#include<ctype.h>
int k;
int main(){
    char s[101]; scanf("%d\n",&s);
    int l=0,u=0;
    int len=strlen(s);
    for(k = 0; k <len; k++){if(s[k]>=97&&s[k]<=122)
                                l++;

                              if (s[k]>=65&&s[k]<=90)
                                u++;
                                }
     if(l>=u){
                for(k = 0; k <len; k++){s[k]=tolower(s[k]);}
            }
     else if (u>l){
                    for(k = 0; k <len; k++){s[k]=toupper(s[k]);}
                    }
    printf("%s",s);
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[101];
    scanf("%s",s);
    char su[strlen(s)+1],sl[strlen(s)+1];
    int u=0,l=0;
    for(int i=0;i<strlen(s);i++)
    {
     if(s[i]>=65&&s[i]<=92)
     {
         su[i]=s[i];
         sl[i]=s[i]+32;
         u++;
     }
     else
     {
         sl[i]=s[i];
         su[i]=s[i]-32;
         l++;
     }
    }
    u>l?printf("%s",su):printf("%s",sl);
}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[1000];
    int i,a=0,b=0;
    gets(s);
    for(i=0;i<strlen(s);i++)
    {
        if(s[i]<'Z')
        {
          a++;
        }
        else
        {
            b++;
        }
    }
    if(a<b)
    {
        printf("%s",strlwr(s));
    }
    else
    {
        printf("%s",strupr(s));
    }
    return 0;
}

#include <stdio.h>
//#include<string.h>
int main()
{
    char str[100];
    int len,count=0,n;
    len=strlen(str);
    scanf("%s",str);
    for(int i=0;i<len;i++)
    {
        if(str[i]<91)
        count++;
    }
    if(count>len/2)
    {
        for(int i=0;i<len;i++)
        {
            if(str[i]>=97)
            {
                str[i]=str[i]-32;
            }
        }
    }
    else
    {
        for(int i=0;i<len;i++)
        {
            if(str[i]<=90)
            {
                str[i]=str[i]+32;
            }
        }
    }
    printf("%s",str);

    return 0;
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(){
    char pal[100];
    int nn=0, mm=0;
    scanf("%s", pal);
    int tam= strlen(pal);
    char maiu[tam-1];
    char minn[tam-1];
    for (int i =0; i<tam-1;++i){
        minn[i]=tolower(pal[i]);
        maiu[i]=toupper(pal[i]);
    }
    for (int i =0; i<tam-1;++i){
        if(pal[i]==minn[i])
            nn++;
        else if(pal[i]==maiu[i])
            mm++;
    }
    if(nn==mm)
        printf("%s", minn);
    else if(nn>mm)
        printf("%s", minn);
    else
        printf("%s", maiu);
    printf("\n");

    return 0;
}

#include <stdio.h>
#include <string.h>
int main(void) {
    int i,l,u,n,k,j;
    char s[100];
    scanf("%s",s);
    n=strlen(s);
    i=0;
    while(i<=n){
        if (s[i]<'a'){u++;}
        else {l++;}
        i++;
    }

    if (l>=u){j=0;
        while(j<n){
        if (s[j]>='A' && s[j]<='Z'){ s[j]=tolower(s[j]);}
        j++;}}
    else if (l<u){
        k=0;
        while(k<n){
            if(s[k]>='a')
        {s[k]=toupper(s[k]);}
        k++;}}

    printf("%s",s);
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char word[100] ;
    int i , len , count_upr = 0 , count_low = 0 ;
    gets(word) ;
    len = strlen(word) ;
    for(i = 0 ; i < len ; i++){
        if(word[i] >= 'a' && word[i] <= 'z'){
            count_low++ ;
        }
        else if(word[i] >= 'A' && word[i] <= 'Z'){
            count_upr++ ;
        }
    }
    if(count_upr > count_low){
        for(i = 0 ; i < len ; i++){
            word[i] = (word[i] - 'a') + 'A' ;
        }
    }
    else{
        for(i = 0 ; i < len ; i++){
            word[i] = (word[i] - 'A') + 'a' ;
        }
    }
    printf("%s\n", word);
    printf("\n");

    return 0;
}

#include<stdio.h>
#include<string.h>
int main(){

    char s[101];
    int i,j,m=0,n=0;
    gets(s);
    for (i=0 ; i<strlen(s) ; i++ ){
            if ( s[i]>'A' && s[i]<'Z' ) m++;
            else n++;
    }
    if (m>n){
            for ( j=0 ; j<strlen(s) ; j++ ){
                    if ( s[j] > 'Z' ) s[j] = s[j] - 32;
            }
            printf(s);
    }
    else {
        for ( j=0  ; j<strlen(s) ; j++ ){
                if ( s[j]<'a') s[j] = s[j] + 32;
        }
        printf(s);
    }
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char c[200];
    scanf("%s",c);
    int len,i,low=0;
    len=strlen(c);
    for(i=0;i<len;i++)
    {
        if(c[i]>='97')
            low++;
    }
    if(low>=(len-low))
    {
        for(i=0;i<len;i++)
        {
            if(c[i]<97)
                c[i]=c[i]+32;
            printf("%c",c[i]);
        }
    }
    else
    {
        for(i=0;i<len;i++)
        {
            if(c[i]>=97)
                c[i]=c[i]-32;
            printf("%c",c[i]);
        }
    }
}

#include<stdio.h>
#include<string.h>
int main(){
    char str[101];
    scanf("%s",str);
    int n,c=0,d=0;
    n=strlen(str);
    for(int i=0;i<n;i++){
        if(str[i]>='a'&&str[i]<='z'){
            c++;
        }else{
            d++;
        }
    }
    for(int i=0;i<n;i++){
        if(c>=d){
            if(str[i]<='Z'&&str[i]<='A'){
                str[i]=str[i]+32;
            }
        }else{
            str[i]=str[i]-32;
        }
    }
    printf("%s",str);
    return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
    int i,j,k,l,count=0,count1=0;

    char str[100];

    l=strlen(str);

    for(i=0;i<l;i++)
    {
      if(str[i]>='a'&& str[i]<='z')
     { count++;}

      if(str[i]>='A'&& str[i]<='Z')

     { count1++;}

    }

    if(count>count1 && count==count1)
    {
        for(j=0;j<l;j++)

        str[j]=tolower(str[j]);
    }
   else
     {
        for(k=0;k<l;k++)

        str[k]=toupper(str[k]);
    }

    printf("%d",str);

}

#include<stdio.h>

int main()
{
    char m[101];
    int c=0;
    scanf("%s",m);
    for(int i=0;i<strlen(m);i++)
    {
    if(m[0]>='a'&&m[0]<='z')
    c++;
    }
    if(c>=strlen(m)/2)
    {
    strlwr(m);
    printf("%s",m);
    }
    else
    {
    strupr(m);
    printf("%s",m);
    }
    return 0;
}

#include<stdio.h>
#include<string.h>

int main()
{
	int i,c,s,len;

	char ch[101];
	scanf("%s",ch);
	len=strlen(ch);
	for(i=0;i<len;i++)
	{
		if(ch[i]>='A' && ch[i]<='Z')
		c++;
		else if(ch[i]>='a' && ch[i]<='z')
		s++;
	}
	if(s>=c)
	{
		for(i=0;i<len;i++)
		{
			if(ch[i]>='A' && ch[i]<='Z')
			ch[i]='a'+(ch[i]-'A');
		}
		printf("%s",ch);
	}
	else
	{
		for(i=0;i<len;i++){
			if(ch[i]>='a' && ch[i]<='z')
		ch[i]='A'+(ch[i]-'a');}
		printf("%s",ch);
	}
return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[101];
    int i,l,lo=0,u=0;
    while(scanf("%s",&s)!=EOF)
    {
    l=strlen(s);
    for(i=0;i<l;i++)
    {
        if(s[i]>'a'&&s[i]<'z')
            lo++;
        else if(s[i]>'A'&&s[i]<'Z')
            u++;
    }
    if(lo>u)
    {
        printf("%s\n",strlwr(s));
    }
    else if(u>lo)
    {
        printf("%s\n",strupr(s));
    }
    else if(lo==u)
    {
        printf("%s\n",strlwr(s));
    }
    lo=0,u=0;
    }
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(){
    char pal[100];
    int nn=0, mm=0;
    scanf("%s", pal);
    int tam= strlen(pal);
    char maiu[tam];
    char minn[tam];

    for (int i =0; i<tam;++i){
        minn[i]=tolower(pal[i]);
        maiu[i]=toupper(pal[i]);
    }
    for (int i =0; i<tam;++i){
        if(pal[i]==minn[i])
            nn++;
        else if(pal[i]==maiu[i])
            mm++;
    }
    if(nn==mm)
        printf("%s", minn);
    else if(nn>mm)
        printf("%s", minn);
    else
        printf("%s", maiu);
    printf("\n");

    return 0;
}

#include<stdio.h>
#include<string.h>

int main()
{
char s[102];
scanf("%s",s);
int l,i;
l=strlen(s);
int up=0,low=0;
for(i=0;i<l;i++)
{
if(s[i]>=67 && s[i]<=92)
{
up++;
}
else
low++;
}
if(low<up)
{
        for(i=0;i<l;i++)
                s[i]=toupper(s[i]);
}

else
for(i=0;i<l;i++)
s[i]=tolower(s[i]);

printf("%s",s);
return 0;
}