using System;
using System.Linq;
public class Kata
{
public static bool XO (string input)
string xo;
int totalX = 0;
int totalO = 0;
for (int i = 0; i < input.Length; i++){
xo = input.Substring(i,1);
if(xo =="x"){
totalX++;
}if(xo=="o"){
totalO++;
}
if(totalX == totalO){
return true;
else{
return false;
public class Program
public static void Main()
string text;
Console.WriteLine("Input text");
text = Console.ReadLine().ToLower();
Console.WriteLine(Kata.XO(text));