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

class Program
{
    private static void Main(string[] args)
    {
        int n = 1000;
        int m = 1000;
        int d = 1000000000;

        var sb = new StringBuilder();
        sb.AppendLine(n + " " + m + " " + d);

        for (int i = 1; i <= n; i++)
            sb.AppendLine(i + " " + i);
        for (int i = 1; i <= m; i++)
            sb.AppendLine(i + " " + i);
        var str = sb.ToString();

        Console.Write(str);

    }

    private const int Mod = 1000000000 + 7;

    #region Data Read
    private static char ReadSign()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (ans == '+' || ans == '-' || ans == '?')
                return (char)ans;
        }
    }

    private static long GCD(long a, long b)
    {
        if (a % b == 0) return b;
        return GCD(b, a % b);
    }

    private static List<int>[] ReadGraph(int n, int m)
    {
        List<int>[] g = new List<int>[n];
        for (int i = 0; i < g.Length; i++) g[i] = new List<int>();
        for (int i = 0; i < m; i++)
        {
            int a = RI() - 1;
            int b = RI() - 1;

            g[a].Add(b);
            g[b].Add(a);
        }

        return g;
    }

    private static int[,] ReadGraphAsMatrix(int n, int m)
    {
        int[,] matrix = new int[n + 1, n + 1];
        for (int i = 0; i < m; i++)
        {
            int a = RI();
            int b = RI();
            matrix[a, b] = matrix[b, a] = 1;
        }

        return matrix;
    }

    private static void Sort(ref int a, ref int b)
    {
        if (a > b) Swap(ref a, ref b);
    }

    private static void Swap(ref int a, ref int b)
    {
        int tmp = a;
        a = b;
        b = tmp;
    }

    private const int BufferSize = 1 << 16;
    private static StreamReader consoleReader;
    private static MemoryStream testData;

    private static int RI()
    {
        int ans = 0;
        int mul = 1;
        do
        {
            ans = consoleReader.Read();
            if (ans == -1)
                return 0;
            if (ans == '-') mul = -1;
        } while (ans < '0' || ans > '9');

        ans -= '0';
        while (true)
        {
            int chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans * mul;
            ans = ans * 10 + chr - '0';
        }
    }

    private static ulong RUL()
    {
        ulong ans = 0;
        int chr;
        do
        {
            chr = consoleReader.Read();
            if (chr == -1)
                return 0;
        } while (chr < '0' || chr > '9');

        ans = (uint)(chr - '0');
        while (true)
        {
            chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans;
            ans = ans * 10 + (uint)(chr - '0');
        }
    }

    private static long RL()
    {
        long ans = 0;
        int mul = 1;
        do
        {
            ans = consoleReader.Read();
            if (ans == -1)
                return 0;
            if (ans == '-') mul = -1;
        } while (ans < '0' || ans > '9');

        ans -= '0';
        while (true)
        {
            int chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans * mul;
            ans = ans * 10 + chr - '0';
        }
    }

    private static int[] RIA(int n)
    {
        int[] ans = new int[n];
        for (int i = 0; i < n; i++)
            ans[i] = RI();
        return ans;
    }

    private static long[] RLA(int n)
    {
        long[] ans = new long[n];
        for (int i = 0; i < n; i++)
            ans[i] = RL();
        return ans;
    }

    private static char[] ReadWord()
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));

        List<char> s = new List<char>();
        do
        {
            s.Add((char)ans);
            ans = consoleReader.Read();
        } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));

        return s.ToArray();
    }

    private static char[] ReadString(int n)
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));

        char[] s = new char[n];
        int pos = 0;
        do
        {
            s[pos++] = (char)ans;
            if (pos == n) break;
            ans = consoleReader.Read();
        } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));

        return s;
    }

    private static char[] ReadStringLine()
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (ans == 10 || ans == 13);

        List<char> s = new List<char>();

        do
        {
            s.Add((char)ans);
            ans = consoleReader.Read();
        } while (ans != 10 && ans != 13 && ans != -1);

        return s.ToArray();
    }

    private static char ReadLetter()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'))
                return (char)ans;
        }
    }
    private static char ReadNonLetter()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')))
                return (char)ans;
        }
    }

    private static char ReadAnyOf(IEnumerable<char> allowed)
    {
        while (true)
        {
            char ans = (char)consoleReader.Read();
            if (allowed.Contains(ans))
                return ans;
        }
    }

    private static char ReadDigit()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (ans >= '0' && ans <= '9')
                return (char)ans;
        }
    }

    private static int ReadDigitInt()
    {
        return ReadDigit() - (int)'0';
    }

    private static char ReadAnyChar()
    {
        return (char)consoleReader.Read();
    }

    private static string DoubleToString(double x)
    {
        return x.ToString(CultureInfo.InvariantCulture);
    }

    private static double DoubleFromString(string x)
    {
        return double.Parse(x, CultureInfo.InvariantCulture);
    }

    static Program()
    {
        //Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
        consoleReader = new StreamReader(Console.OpenStandardInput(BufferSize), Encoding.ASCII, false, BufferSize);
    }

    private static void PushTestData(StringBuilder sb)
    {
        PushTestData(sb.ToString());
    }
    private static void PushTestData(string data)
    {
#if TOLYAN_TEST
        if (testData == null)
        {
            testData = new MemoryStream();
            consoleReader = new StreamReader(testData);
        }

        var pos = testData.Position;
        var bytes = Encoding.UTF8.GetBytes(data);
        testData.Write(bytes, 0, bytes.Length);
        testData.Flush();
        testData.Position = pos;
#endif
    }
    #endregion
}


function f1(left, right, t) {
  if(left >= right) return left;
  let mid = right - (right - left) / 2;
  if(taskT[mid] < k) left = mid + 1;
  else right = mid - 1;
  f1(left, right, t);
}

function main() {
  let input = readline().split(' ');
  let [n, k] = input,  T = 240, t = T - k, taskT = [0];
  for(let i = 1; i < 11; i++) taskT[i] = 5 * i + taskT[i - 1];
  print(f1(0, n, t));
}
main();


let input = readline().split(' ');
let n = input[0], k = input[1],  T = 240, t = T - k, taskT = [0];
for(let i = 1; i < 11; i++) taskT[i] = 5 * i + taskT[i - 1];
let left = 0, right = n;
while(left <= right) {
  let  mid = parseInt(right - (right - left) / 2);
  if(taskT[mid] >= t) right = mid - 1;
  else left = mid + 1;
}
if(t === taskT[right + 1]) right ++;
print(Math.min(right,n));


var input = readline().split(' ');
var [n, k] = input,  T = 240, t = T - k, taskT = [0];
for(var i = 1; i < 11; i++) taskT[i] = 5 * i + taskT[i - 1];
var left = 0, right = n;
while(left <= right) {
  var  mid = parseInt(right - (right - left) / 2);
  if(taskT[mid] >= t) right = mid - 1;
  else left = mid + 1;
}
if(t === taskT[right + 1]) right ++;
print(Math.min(right,n));


var t = readline();
var q = readline();
var str = readline();
var arr = str.split("");
var check = false;
for (let i = 0; i < q; ++i) {
  arr.forEach((kid, index) => {
    if (check) {
      check = false;
      return;
    }
    if (kid === "B") {
      if (arr[index + 1] === "G") {
        var temp = arr[index];
        arr[index] = arr[index + 1];
        arr[index + 1] = temp;
        check = true;
      }
    }
  });
}
print(arr.join(""));


no = readline().split(" ");
txt = readline();
var loop = parseInt(no[1]);
var cnt  = parseInt(no[0]);
for (var k = 0; k < loop; k++) {
      for (var i = 0; i < cnt; i++) {
               if(txt[i] == 'B' && txt[i+1] == 'G'){
                         txt[i+1] = [txt[i],txt[i] = txt[i+1]][0],++i;
                         continue;
               }
}
write(txt);


var t = readline();
var q = readline();
var str = readline();
var arr = str.split("");
var check = false;
for (let i = 0; i < q; ++i) {
  arr.forEach((kid, index) => {
    if (check) {
      check = false;
      return;
    }
    if (kid === "B") {
      if (arr[index + 1] === "G") {
        [arr[index], arr[index + 1]] = [arr[index + 1], arr[index]];
        check = true;
      }
    }
  });
}
print(arr.join(""));


var r = +readline().split(' ')[2];
var s = readline();
whiel(r--){
    s=s.replace(/BG/g, 'GB');
}
print(s);


var num = readline()
var luckyNumbers = [4, 7, 44, 47, 77, 74, 444, 447, 474, 777, 774,]
for( var i = 0; i < luckyNumbers.length; i++){
    if(num % luckyNumbers[i] == 0){
        break
        print("YES")
    }
}else{
    print("NO")
}


a = readline();
if (a % 4 === 0 || a % 7 === 0) {
    print('YES')
}
else {

    if (a.includes('1') || a.includes('2') || a.includes('3') || a.includes('5') || a.includes('6') || a.includes('8') || a.includes('9') || a.includes('0')) {

     print('NO');
}
else {
     print('YES');
}


var input = readline();
var n = parseInt(input);
function isLucky(n){
	while (n > 0) {
		unit = n % 10;
		n = n / 10;
		if (unit != 4 && unit != 7)
			return false;
	}
	return true;
}

function isAlmostLucky(n){
	if isLucky(n)
		return 'YES';
	for (i = 4; i < n; i++){
		if (isLucky(i)){
			if (n % i == 0)
				return 'YES';
		}
	}
	return 'NO';
}
print(isAlmostLucky(n));


/**
 * Created by Det on 24.05.2015.
 */
(function main() {
    var line = readline().split(' ');
    var k = line[0],
        n = line[1],
        w = line[2];
    var answer = parseInt(k * w * (1 + +w) / 2 - n);

    answer = answer ? answer :| 0;
    print(answer);
})();


var input = parseInt(readline().split(' '));
var k = input[0];//coste primera banana
var n = input[1];//dinero que tiene
var w = input[2];//numero bananas que quiere
var preciototal = 0;
var precioinferior=0;
for (var i=1; i<=w;i++){
    var preciototal += k*i;
    k++;
}
if(preciototal-n >=0){
    print (preciototal-n);
}else{
    print(precioinferior);
}


var input = readline().split(" ").map(x=>parseInt(x));
var [k,n,w] =  input;
var total = 0;
var amount = k;
for(var i=0; i< w; i++){
    total += k;
    k*=2;
}
print(total-n);


var l1 = readine();
var l2 = readine();
for(i in l1){
 if(l1[i].toLowerCase() < l2[i].toLowerCase()){
write(-1);
}if(l1[i].toLowerCase() < l2[i].toLowerCase()){write(1)}else{
write(0)}
}

}


let inputString = readline()

inputString = inputString.toLowerCase();

let strings = inputString.split(' ');
let firstStrCounter = 0,
    secondStrCounter = 0;

for (let i = 0; i < strings[0].length; i++) {
    if (strings[0].charCodeAt(i) > strings[1].charCodeAt(i)) {
        firstStrCounter++;
    } else if (strings[0].charCodeAt(i) < strings[1].charCodeAt(i)) {
        secondStrCounter++;
    }
}

print(firstStrCounter - secondStrCounter)


let inputString = readline().toLowerCase();
let strings = inputString.split(' ');

let firstStrCounter = 0,
    secondStrCounter = 0;

for (let i = 0; i < strings[0].length; i++) {
    if (strings[0].charCodeAt(i) > strings[1].charCodeAt(i)) {
        firstStrCounter++;
    } else if (strings[0].charCodeAt(i) < strings[1].charCodeAt(i)) {
        secondStrCounter++;
    }
}

print(firstStrCounter - secondStrCounter)


    str1 = readline().split();
    str2 = readline().split();
    let output = 0;
    for (i = 0; i < str1.length; i++) {
    char1 = str1[i].toLowerCase();
    char2 = str2[i].toLowerCase();

    if(char1 == char2){
      continue;
    } else if(char1 > char2){
      output++;
      break;
    } else {
    output--;
    break
    }
    }
    print(output);


let firstString = readline().toLowerCase();
let secondLine = readline().toLowerCase();
print(firstString < secondLine ? -1 : (firstString > secondLine ? 1 : 0));


var Fstring = readline().toLowerCase();
var Sstring = readline().toLowerCase();
var first = Fstring.charCodeAt(0) - "a".charCodeAt(0);
var second = Sstring.charCodeAt(0)- "a".charCodeAt(0);
if(first == second) print(0);
elseif(first < second) print(-1);
else print(1);


  var stringA = readline()
  var stringB = readline()

  var countA = 0
  var countB = 0

  for (let i = 0; i < stringA.length; i++) {
    countA += stringA.toLowerCase().charCodeAt(i)
    countB += stringB.toLowerCase().charCodeAt(i)
  }

  if (countA === countB) {
    print(0)
  } else if (countA < countB) {
    print(-1)
  } else {
    print(1)
  }


let inputString = readline().toLowerCase(),
    strings = inputString.split(' ');

let firstStrCounter = 0,
    secondStrCounter = 0;

for (let i = 0; i < strings[0].length; i++) {
    if (strings[0].charCodeAt(i) > strings[1].charCodeAt(i)) {
        firstStrCounter++;
    } else if (strings[0].charCodeAt(i) < strings[1].charCodeAt(i)) {
        secondStrCounter++;
    }
}

print(firstStrCounter - secondStrCounter);


let string1 = readline()
let string2 = readline()
// var string1 = "aaaa"
// var string2 = "aaaA"

if(string1.toLowerCase()<string2.toLowerCase()){
  print(-1)
}
else if(string1.toLowerCase()>string2.toLowerCase()){
  print(1)
}
else{
  print(0)
}


//Petya and Strings

var cadena_uno=readline().toLowerCase();	// guardamos la entrada de datos a minúsculas.
var cadena_dos=readline().toLowerCase();

var abecedario=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","u","v","w","x","y","z"];

function posicionletra(letra){
	for(x=0;x<abecedario.length;x++){
		if(letra==abecedario[x]){
			return x;		// la posición en que está la letra en el abecedario sita.
		}
	}
)

for(i=0;i<cadena_uno.length;i++){
	if (cadena_uno[i]==cadena_dos[i]){
		print(0);
	}
	else if(posicionletra(cadena_uno[i])>posicionletra(cadena_dos[i])){
		print(1);
	}
	else{
		print(-1);
	}

}


var str1 = readline().toLowerCase();
var str2 = readline().toLowerCase();

var firstStrCounter = 0,
    secondStrCounter = 0;

for (let i = 0; i < str1.length; i++) {
    if (str1.charCodeAt(i) > str2.charCodeAt(i)) {
        firstStrCounter++;
    } else if (str1.charCodeAt(i) < str2.charCodeAt(i)) {
        secondStrCounter++;
    }
}

print(firstStrCounter - secondStrCounter)


readline()
let input = readline().split(" ")
let found = false
for(let i in input)
	if(input[i] === "1"){
		found = true
		print("HARD")
	}

if(!found)
	print("EASY")


<script>
var x =readline() ;
var y =readline();
if (y.includes(1)){print('HARD')}else(print('EASY'));
</script>


readline();
var a = readline();
var b = a.length;
var c = 'EASY';

print c;


var n = readline().split(" ");
while(n[0]--)
(n[1] == 1)? print("HARD"): print("EASY");
break;


readline();
var a = readline();
var b = a.length;
var c = 'EASY';
for (; b; b--) {
  if (a[b - 1] == 1) {
     c = 'HARD';
     break;
  }
}
print c;


'use strict'
readline();
let a = readline();
let b = a.length - 1;
let c = 'EASY';
for (; b; b--) {
  if (a[b] == 1) {
     c = 'HARD';
     break;
  }
}
write c;


let
    n = Number (prompt ()),
    a = prompt ().split ('')

for (let i = 0; i <= n; i++) {
    if (Number (a[i]) == 0) {
        console.log (i)
        if (i == n - 1) {
            alert ('EASY')
        }
    }
    if (Number (a[i]) == 1) {
        alert ('HARD')
        break
    }
}


readline();
var data = readline().split(" ").map( x=> parseInt(x));
var answer;
for(var i=0;i<data.length;i++){
    if(data[i]===1){
        answer = "HARD"
        break;
    } else {
        answer = "EASY"
    }
}
}

print(answer)


readline();
var a = readline();
var b = a.length - 1;
var c = 'EASY';
for (; b; b--) {
  if (a[b] == 1) {
     c = 'HARD';
     break;
  }
}
print c;


readline();
var a = readline();
var b = a.length - 1;
var c = 'EASY';
for (; b; b--) {
  if (a[b] == 1) {
     c = 'HARD';
     break;
  }
}
write c;


var year = readline();
var result = function(n)
    {
        for (var i = 0; i < n.length; i++)
        {
            for (var i1 = i + 1; i1 < n.length; i1++)
            if (n[i] === n[i1]) return false;
        }
        return true;
    }
while (result(year) === false)
    result(year);
    year = +year + 1;
    year = year + '';
}
print(year);


let i = readline();

while(i<=9000){
  i++;
  b = false;
  let year = i.toSting();

  for(let j=0;j<4;j++)
  {
    let s = year;
    s[j] = 'n'
    if (~s.indexOf(year[j])){
      b = true;
      break;
    }
  }
  if (b === false) break;
}
print(i);


let str = readline();
let i = 1 + str;
while(i <= 9000){
  let b = false;
  for(let j=0 ; j<4 ; j++)
  {
    let s = String(i);
    s[j] = 'n'
    if (~s.indexOf(i[j])){
      b = true;
      break;
    }
  }
  if (b === false) break;
  i++;
}
print(i);


let i = 0;
i += readline();
while(i <= 9000){
  i++;
  let b = false;
  for(let j=0 ; j<4 ; j++)
  {
    let s = String(i);
    s[j] = 'n'
    if (~s.indexOf(i[j])){
      b = true;
      break;
    }
  }
  if (b === false) break;
}
print(i);


var input_year = parseInt(readline());
input_year++;
var str = input_year.toString();
while(true){
    var bool = true;
    for(let i = 0; i < str.length-1; i++){
        if(str.indexOf(str[i],i) ==-1){
            bool = false;
            break;
        }
        input_year++;
        str = input_year.toString();
    }
    if(bool){
        print(input_year);
        break;
    }
}


let i = readline();
i = Number(i);

while(i <= 9000){
  i++;
  b = false;
  let year = i.toString();

  for(let j=0;j<4;j++)
  {
    let s = year;
    s[j] = 'n'
    if (~s.indexOf(year[j])){
      b = true;
      break;
    }
  }
  if (b === false) break;
}
print(i);


let numbersPressed = (appartment) => {

  let count = 0;
  for (let i = 1; i <= 9; i++) {
    let found = false;
    for (let j = 1; j <= 4; j++) {
      let apt = i.toString().repeat(j);
      count += apt.length;
      if (apt === appartment) {
        found = true;
        break;
      }
    }
    if (found) break;
  }

  return count;
}


var numbersPressed = function(appartment) {

  let count = 0;
  for (let i = 1; i <= 9; i++) {
    let found = false;
    for (let j = 1; j <= 4; j++) {
      let apt = i.toString().repeat(j);
      count += apt.length;
      if (apt === appartment) {
        found = true;
        break;
      }
    }
    if (found) break;
  }

  return count;
}


let lines = +readline();

let mult = [1, 3, 6, 10];

for (let x = 0; x < lines; x++) {
  let f = readline[0];
  let res = (f - 1) * 10 + mult[readline.length - 1];
  print(res);
}


let lines = parseInt(readline());

let mult = [1, 3, 6, 10];

for (let x = 0; x < lines; x++) {
  let num = readline;
  let f = +num[0];
  let res = (f - 1) * 10 + mult[num.length - 1];
  print(res);
}


let _inputLines;
let _lineNumber = 0;
let inputReader = _inputReader ();

function _main() {

	_inputLines = _inputData.trim().split('\n').map((string) => {
		return string.trim();
	});;
	var t = inputReader.readNumber();
	function print(x) { console.log(x); }
	while (t--) {
	    var n = inputReader.readNumber();
	    var cnt = 0;
	    var f = 0;
	    for (var i = 1; i <= 9; ++i) {
	        for (var j = i, time = 1; j < 10000+1; j = j * 10 + i, ++time) {
	            cnt += time;
	            if (j == n) {
	                f = 1;
	                break;
	            }
	        }
	        if (f) break;
	    }
	    print(cnt);
	}

}

var _inputData = '';
function cacheInput(data) {
	_inputData += data;
}

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', cacheInput).on('end', _main);

function _inputReader () {
	function readNumber(){
		return Number(_inputLines[_lineNumber++]);
	}

	return {
		readNumber,
	}
}


const N = parseInt(readline());
const m = [0, 1, 3, 6, 10];

for (let i = 0; i < N; ++i) {
  const s = readline();
  const u = parseInt(s[0]);
  return (u - 1) * 10 + m[s.length];
}


const ввод=readline().split(" ").map(a=>+a.trim());let счетчик=0;for(let b,a=1;a<ввод[1];a*=3){for(b=a;b<ввод[0];)b*=2;for(let c=b;c<ввод[1];c*=2)счетчик++}print(0|счетчик);


function get(x)
{
    var res = 0;
    for (var i = 1; i <= x; i *= 2)
        for (var j = 1; j * i <= x; j *= 3)
            res++;
    return res;
}

var str = readline().split(' ');
var l = str[0], str[1];

print(get(r) - get(l - 1));


var in = readline().split(" ");
var l = parseInt(in[0]);
var r = parseInt(in[1]);

var ans = 0

for( i = 1; i <= r; i *= 2)
  for( j = 1; j * i <= r; j *= 3)
    if(i * j >= l){
      ans++
    }

print(ans)


const BBOD = readline().split(" ").map(v => +v.trim());

let C4ET4uK = 0;
for (let TPOE4KA = 1; TPOE4KA < BBOD[1]; TPOE4KA *= 3) {
	let DBA = TPOE4KA;
	while (DBA < BBOD[0]) {
		DBA *= 2;
	}

    for (let TEKyLLIuu = DBA; TEKyLLIuu < BBOD[1]; TEKyLLIuu *= 2)  {
        C4ET4uK++;
    }
}
print(C4ET4uK|0);


var in = readline().split(' ')
var l = parseInt(in[0]);
var r = parseInt(in[1])

var ans = 0

for( i = 1; i <= r; i *= 2)
  for( j = 1; j * i <= r; j *= 3)
    if(i * j >= l){
      ans++
    }

print(ans)


const BBOD=readline().split(" ").map(a=>+a.trim());let C4ET4uK=0;for(let b,a=1;a<BBOD[1];a*=3){for(b=a;b<BBOD[0];)b*=2;for(let c=b;c<BBOD[1];c*=2)C4ET4uK++}print(0|C4ET4uK);


function wrongSubstraction(input) {
  input = input.split(' ');
  let n = parseInt(input[0]), k = parseInt(input[1]);
  while (k > 0) {
    if (n.toString()[n.toString().length - 1] === '0') n = Math.floor(n / 10);
    else n--;
    k--;
  }
  alert(n);
}


function solve() {
    var input = readline().split(' ').map(Number),
            n = input[0],
            k = input[1];
    for (;k--;) {
        if (n % 10) {
            n--;
        } else {
            n /= 10;
        }
    }
    print(n);
}

if (typeof readline !== 'function') {
    let input = [],
            i = 0;
    function print() {
        console.log.apply(null, arguments);
    }
    function readline() {
        return input[i++];
    };

    const RL = require('readline').createInterface({
       input : process.stdin,
       output : process.stdout
    });

    RL.on('line', (line) => {
       input.push(line);
    });

    RL.on('close', solve);
} else {
    solve();
}


let arr=readline().split(" ");

for (let i=0;i<+arr[1];i++)
console.log(arr[1]);
print(+arr[0]);


let input = readline().split(" ").map(function(x) { return parseInt(x); });

for(let i=0; i < input[1]; i++){
	if(input[0] % 10 == 0)
		input[0] /= 10
	else input[0] -= 1;
}

print(input[0]);


const result = (n, k) => {
  for (let i = k; i >= 0; i--) {
    if (k % 10 === 0) k = k/10;
    else k--;
  }
  return k;
}


var num = readline().split(" ").map(x => parseInt(x));
var n,k;
n=num[0],k=num[1];

let result = n;
for(let i=0; i<k; i++){
	if(result % 10 === 0){
		result = result / 10;
	}
	else {
		result = result - 1;
	}
}
console.log(result);


function test(){
    let n=prompt()
let k=prompt()
    for(let i=0; i<k; i++){
        let e=n.toString()
        if(e.includes(0)){
            console.log(e)
            n=parseInt(e)/10;
        } else n=n-1
    }
    return n;
}


let x = parseInt(prompt());
let k = parseInt(prompt());

while (k-- > 0) {
    if (x % 10 == 0) {
        x /= 10;
    } else {
        x--;
    }
}

console.log(x);


let input = readline().split(' ');
let n = parseInt(input[0]), k = parseInt(input[1]);
while (k > 0) {
  if (n.toString()[n.toString().length - 1] === '0') n = Math.floor(n / 10);
  else n--;
  k--;
}
print(n);


const wrongSubstractions = (n, k) => {
  res = n;
  const getLastDigit = (d) => {
   last = d%10;
   return +last;
  };

  for (i = 0; i < k; i++){
    let lastDigit = getLastDigit(res);
  //if the last digit of the number is non-zero, she decreases the number by one;
  // the last digit of the number is zero, she divides the number by 10 (i.e. removes the last digit).
    if (lastDigit !== 0) {
      res--;
    } else {
      res = res/10;
    }
  }
  return res;
};


function solve() {
    let input = readline().split(' ').map(Number),
            n = input[0],
            k = input[1];
    for (;k--;) {
        if (n % 10) {
            n--;
        } else {
            n /= 10;
        }
    }
    print(n);
}

solve();


function solve() {
    let input = readline().split(' ').map(Number),
            n = input[0],
            k = input[1];
    for (;k--;) {
        if (n % 10) {
            n--;
        } else {
            n /= 10;
        }
    }
    print(n);
}

if (typeof readline !== 'function') {
    let input = [],
            i = 0;
    function print() {
        console.log.apply(null, arguments);
    }
    function readline() {
        return input[i++];
    };

    const RL = require('readline').createInterface({
       input : process.stdin,
       output : process.stdout
    });

    RL.on('line', (line) => {
       input.push(line);
    });

    RL.on('close', solve);
} else {
    solve();
}


let data = readline().split(' ').map(x => parseInt(x, 10));
for (let i = data[1]; i > 0; i--) {
  if(data[0]%10 === 0) data[0] = data[0]/10;
  else data[0]--;
}
print(data[0]);


numbers = readLine().split("").map((num) => parseInt(num))

for(let i = 0; i < num; i++) {
  if (numbers[0] % 10 === 0)
    numbers[0] /= 10;
  else
    numbers[0]--;
}
print(numbers[0])


function wrongSubstraction(input) {
  input = input.split(' ');
  let n = parseInt(input[0]), k = parseInt(input[1]);
  while (k > 0) {
    if (n.toString()[n.toString().length - 1] === '0') n = Math.floor(n / 10);
    else n--;
    k--;
  }
  print(n);
}


function calc(data) {
  const arr = data.split(" ").map(x => parseInt(x, 10));
  for (let i = arr[1]; i >= 0; i--) {
    if (arr[0] % 10 === 0) arr[0] = arr[0]/10;
    else arr[0]--;
  }
  return arr[0];
}

var s1 = readline();

print(calc(s1));


const data = readline().split(' ').map(x => parseInt(x, 10));
for (let i = data[1]; i > 0; i--) {
  if(data[0]%10 === 0) {
    data[0] = data[0]/10;
  }
  else {
    data[0]--;
  }
}
print(data[0]);


let in = readline().split(' ');
let n = parseInt(in[0]), k = parseInt(in[1]);
while (k > 0) {
  if (n.toString()[n.toString().length - 1] === '0') n = Math.floor(n / 10);
  else n--;
  k--;
}
print(n);


function wrongSubstraction(input) {
  input = input.split(' ');
  let n = parseInt(input[0]), k = parseInt(input[1]);
  while (k > 0) {
    if (n.toString()[n.toString().length - 1] === '0') n = Math.floor(n / 10);
    else n--;
    k--;
  }
  console.log(n);
}


let arr=readline().split(" ");

for (let i=0;i<+arr[1];i++)
arr[0][arr[0].length-1]===0?String(+arr[0]/10):arr[0]=String(+arr[0]-1)
print(+arr[0]);


let arr=readline().split(" ");

for (let i=0;i<Number(arr[1]);i++)
console.log(arr[1]);
print(Number(arr[0]));


function test(n,k){
    for(let i=1; i<k; i++){
        let e=n.toString();
        if(e.includes(0)){
            console.log(e);
            n=parseInt(e)/10;
        } else n=n-1;
    }
    return n;
}


let [n, k] = readline().split(' ');
for (let i = 0; i < k; i++) {
  if (n % 10) {
    n--;
  }
  else {
    n /= 10;
  }
}
print(n);


var numbers = readline().split(" ").map(function(x) { return parseInt(x); });
for (let i = 0; i < numbers[1]; i++) {
    if (numbers[1] % 10 === 0)
        numbers[1] = numbers[1] / 10;
    else
        numbers[1]--;
}
write(numbers[1])


//根据codeforces给的v8编译环境，处理输入与输出

var inputs = readline().split(" ").map(x)=>+x;
var n = inputs[0];
var k = inputs[1];

// let n = 1000000000, k = 9;
function subtracte(n,k){

	for(var i = 0; i < k; i++){
		var last = n%10;
		if(last === 0){
			n /= 10;
		}else {
			n -= 1;
		}
	}
	// console.log(n);
	print(n);
}
subtracte(n, k);


var numbers = readline().split(" ")
var n = numbers[0]
var k = numbers[1]

for(var i=0; i<k; i++){
        let e=n.toString()
        if(e.includes(0)){
            n=parseInt(e)/10;
        } else n=n-1
    }
    return n;
}
print(n)


const readline = require('readline');

let nrs = [];
const rl = readline.createInterface({
	input: process.stdin,
	output: process.stdout
});

function wrongsubstraction(n,k){
	for(i=1;i<=k;i++)
	{
		if(parseInt((''+n).slice(-1)) > 0)
		{
			n -= 1;
		}else{
			n /= 10;
		}
	}
	return n;
}

rl.on('line', (line) => {
	nrs = line.split(' ');
}).on('close', () => {
	console.log(wrongsubstraction(nrs[0],nrs[1]));
});


function main () {
    const line = readline().split(' ');
    let n = parseInt(line[0]);
    const k = parseInt(line[1]);
    for (let i = 0; i < k; i++) {
        n % 10 === 0 ? n = n / 10 : n--;
    }

    print(n);
}

main();


function main(){
    let n;
    let k;
    k=readline().split(' ');
    print(k);
    //console.log(k);
    //for(let i = 1;i <= k;i++)
    //if(n%10==0){
    //    n=n/10
    //}
}

main();


var n = readline().split(' ')[0];
var k = readline().split(' ')[1];

function(a, b) {
  var result = a;
  for(var i = 0; i < b; i++) {
    if (!(a / 10).isInteger()) result = result / 10
    else result--
  }
  print(result);
}(n,k);


let data = readline().split(' ').map(x => Number(x));
let i = data[1];
for (i; i > 0; i--) {
  if(data[0]%10 === 0) data[0] = data[0]/10;
  else data[0]--;
}
print(data[0]);


var numbers = readline().split(" ").map(x => +x);
for(let i = 0; i < numbers[1]; i++)
{
   if(numbers[0] % 10 !== 0)
    {
        numbers[0]--;
    }else{
        numbers[0] = numbers[0]/10
    }
}
print(numbers[0])


n = 512
k = 4
while k > 0
    if (n % 10 == 0) {
        n = n / 10
    } else n--
    k--
output n


let input = readline().split(" ").map(function(x) { return parseInt(x); });

for(let i=0; i < input[1]; i++){
	if(input[0] % 10 == 0)
		input[0] /= 10;
	else input[0] -= 1;
}

console.log(input[0]);


const data = readline().split(' ').map((x) => (parseInt(x, 10)));
for (let i = data[1]; i > 0; i--) {
  if(data[0]%10 === 0) data[0] = data[0]/10;
  else data[0]--;
}
print(data[0]);


var toInt = x =>(parseInt(x));
var {a, b} = readline().split(' ').map(toInt);
print(a - b);


function subByOne(n,k){
  let result = n;
  for(let i=0; i<k; i++){
    if(result % 10 === 0){
        result = result / 10;
    }
    else {
        result = result - 1;
    }
  }
  return result;
}

var num = readline().split(" ").map(x => parseInt(x));
var n,k;
n=num[0],k=num[1];
print(subByOne(n,k));


let arr=readline().split(" ");

for (let i=0;i<+arr[1];i++)
arr[0][arr[0].length-1]===0?(+arr[0]/10).toString():(arr[0]=+arr[0]-1).toString()
print(+arr[0]);


let n;
let k;
let input=readline().split(' ');
n=parseInt(input[0]);
k=parseInt(input[1]);
console.log(k);
for(let i = 1;i <= k;i++){
    if(n%10==0){
        n=n/10;
    }
    if(n%10!=0){
        n=n-1;
    }
}
print(n);


let input = readline().split(" ");
let n = parseInt(input[0]);
let k = parseInt(input[1]);
while (k > 0) {
  if (n.toString()[n.toString().length - 1] === '0') n = Math.floor(n / 10);
  else n--;
  k--;
}
print(n);


let input = 1000000000
let times = 9
export default function decrease(num, times) {
  let numStr = num.toString()
  for (let i=0; i<times; i++) {
    if (numStr.endsWith('0')) {
      numStr = (numStr / 10).toString()
    } else {
      numStr = (numStr - 1).toString()
    }
  }
  return numStr
}

const output = decrease(input, times)
console.log(output)


const main = (n, k) => {
  res = n;
  const getLastDigit = (d) => {
   last = d%10;
   return +last;
  };

  for (i = 0; i < k; i++){
    let lastDigit = getLastDigit(res);
  //if the last digit of the number is non-zero, she decreases the number by one;
  // the last digit of the number is zero, she divides the number by 10 (i.e. removes the last digit).
    if (lastDigit !== 0) {
      res--;
    } else {
      res = res/10;
    }
  }
  return res;
};


let [n, k] = readline().split(' ');
for (let i = 0; i < k; i++) {
  if (n % 10) {
    n--;
  }
  else {
    n /= 10;
  }
}
console.log(n);


let data = readline().split(' ').map(x => Number(x));
for (let i = data[1]; i > 0; i--) {
  if(data[0]%10 === 0) data[0] = data[0]/10;
  else data[0]--;
}
print(data[0]);


function subByOne(n,k){
  let result = n;
  for(let i=0; i<k; i++){
    if(result % 10 === 0){
        result = result / 10;
    }
    else {
        result = result - 1;
    }
  }
  return result;
}


let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
    const {EOL} = require('os')
    const lines = i.split(EOL) /*your input text, split by lines*/
    const k = lines[0];
    const arr = lines.slice(1.lines.length - 1);

    console.log(arr);

   	function subseqs(arr, k) {
	  const n = arr.length;
	  const res = [];
	  let j = 0;

	  for (let mask = 0; mask < (1 << n); mask++) {
	    let num = 0;

	    for (let i = 0; i < n; i++) {
	      if (mask & (1 << i)) {
	        num++;
	      }
	    }

	    if (num === k) {
	      res[j] = [0, 0]

	      for (let i = 0; i < n; i++) {
	        if (mask & (1 << i)) {
	          res[j][0] += arr[i]
	        } else {
	          res[j][1] += arr[i];
	        }
	      }

	      j++;
	    }
	  }

	  return res;
	}

	for (let i = 1; i < arr.length; i++) {
	  subseqs(arr, i).map(ss => console.log(ss[0] == ss[1] ? "YES" : "NO"));
	}
});


let s = readLine().replace(/WUB/g, ' ').trim().replace(/[ ]+/, ' ');
print(s)


let s = readline().replace(/WUB/g, ' ').trim().replace(/[ ]+/, ' ');
print(s)


<script>
n = readline();
var bbcount = [];var k = 0;var gar = [];
var input = readline().split(' ');

for(var i = 0; i < input.length - 1; i++){gar.push( Math.abs( input[i] - input[(i+1)]))}

var bcount= 0 ;for (var i = 0; i < gar.length; i++)
{
	if(gar[i]!="1"){bbcount.push(k);k=0;}
	else if(gar[i]=="1"){k++;}
}

bbcount.push(k);bbcount[0]= Math.max(...bbcount);

if(bbcount[0] == (input.length -1)){alert(bbcount[0])}
	else{
if(bbcount[0] == 1){alert(bbcount[0])}else{alert(bbcount[0] - 1)}

}

</script>


let str1="",str2="",i=0,res="";

str1 = readline();
str2 = readline();

str1 = [...str1];
str2 = [...str2];

str1.forEach(el=>{
  res += el ^ str2[i];
  i++;
})

print(res);


var r =  readline();
var s =  readline();
var sum = 0;
var result = "";
for(var i = 0 ;; i++){
	sum += i;
	if(sum >= s.length){
		break;
	}
        result + = s.charAt(sum);
}
print(result);


function enc() {
	var a = readLine();
	var r = readLine().split("");
	var x = ""
	var n = 1;
	for (var i = 0; n < parseInt(a); i++) {
		n += i;
		if (r[n-1] != undefined) {
			x += r[n-1];
		}
	}
	print(x);


var a = parseInt(readline());
var b = readline();
var array = [];
var count = 0;
function main() {

	for (let i = 0; i < b.length; i++) {
		if (b[i] == 'B') {
			count++;
		}
		if (b[i] == 'W') {
			if (count != 0)
				array.push(count);
			count = 0;
		}
	}
	if (count != 0) {
		array.push(count);
	}
	print(array.length);
	if (array.length != 0)
		print(array);
}
main();


var a = parseInt(readline());
var b = readline();
	var array = [];
	var count = 0;
	for(let i = 0; i < b.length; i++) {
		if(b[i] == 'B'){
			count++;
		}
		if(b[i] == 'W'){
			if(count != 0)
			array.push(count);
			count = 0;
		}
	}
	if(count != 0) {
		array.push(count);
	}
	print(array.length);
	if(array.length != 0)
		print(array);


var a = parseInt(readline()),
var b = readline(),
var array = [],
var count = 0,

	for (let i = 0; i < b.length; i++) {
		if (b[i] == 'B') {
			count++
		}
		if (b[i] == 'W') {
			if (count != 0)
				array.push(count)
			count = 0
		}
	}
	if (count != 0) {
		array.push(count)
	}
	print(array.length)
	if (array.length != 0) {
		print(array.join(' '))
	}


function main() {
	var a = parseInt(readline());
	var b = readline();
	var array = [];
	var count = 0;
	for (let i = 0; i < b.length; i++) {
		if (b[i] == 'B') {
			count++;
		}
		if (b[i] == 'W') {
			if (count != 0)
				array.push(count);
			count = 0;
		}
	}
	if (count != 0) {
		array.push(count);
	}
	print(array.length);
	if (array.length != 0)
		print(array);
}
main();


var a = parseInt(readline());
var b = readline();
var array = [];
var count = 0;
function main() {

	for (let i = 0; i < b.length; i++) {
		if (b[i] == 'B') {
			count++;
		}
		if (b[i] == 'W') {
			if (count != 0)
				array.push(count);
			count = 0;
		}
	}
	if (count != 0) {
		array.push(count);
	}
	print(array.length);
	if (array.length != 0) {
		for(i in array)
		print(array[i]);
	}

	return 0;
}
main();


var a = parseInt(readline());
var b = readline();
var array = [];
var count = 0;
function main() {

	for (let i = 0; i < b.length; i++) {
		if (b[i] == 'B') {
			count++;
		}
		if (b[i] == 'W') {
			if (count != 0)
				array.push(count);
			count = 0;
		}
	}
	if (count != 0) {
		array.push(count);
	}
	print(array.length);
	if (array.length != 0)
		print(array);
	return 0;
}
main();


var n = readline();
var res=0;

for (var i=0; i<n; i++){
var str += readline().split(" ");
	for (var j=0; j<i; j++){
		if (str[i]==str[j])
		res++;
	}
}
print(res);


const read = () => readline().split(' ')
const readInts = () => read().map(parseInt)

const [x] = readInts()

print(Math.ceil(x / 5))


let a = Number(+readLine());
if(a % 2 === 0){
    print((a / 2) ** 2);
}
else{
    print(0);
}


let a = +readline();
if(a % 2 === 0){
    print(Math.pow(a/2, 2));
}
else{
    print(0);
}


var a = Number(readLine());
if(a % 2 === 0){
    print((a / 2) ** 2);
}
else{
    print(0);
}


let a = +readLine()
if(a % 2 === 0){
    print(Math.pow(a/2, 2));
}
else{
    print(0);
}


let a = +readline()
if(a % 2 === 0){
    print(Math.pow(a/2, 2));
}
else{
    print(0);
}


let a = +readline()
if(a % 2 === 0){
    print(Math.pow(a/2, 2));
}
else{
    print(0  );
}


let a = Number(readLine());
if(a % 2 === 0){
    print((a / 2) ** 2);
}
else{
    print(0);
}


let data = readline().split(" ");

let a = parseInt(data[0]), b = parseInt(data[1]), c = parseInt(data[2]), d = parseInt(data[3]);

for(let i = 0; i < 2; ++ i) {
    for(let j = 0; j < 2; ++ j) {
        for(let e = 0; e < 2; ++ e) {
            for(let k = 0; k < 2; ++ k) {
                let A = i * a + j * b + e * c + k * d;
                let B = (i^1) * a + (j^1) * b + (e^1) * c + (k^1) * d;
                if(A == B) {
                    print("YES");
                }
            }
        }
    }
}
print("NO")


          var n = parseInt(readline());
                                 var uno = n[0];
                                 var dos = n[1];
                                 var tres = n[2];
                                 var cuatro = n[3];
                                 var a=uno+dos;
                                 var b=tres+cuatro;
                                 var c=uno+tres;
                                 var d= dos+cuatro;
                                 var e=dos+tres+cuatro;
                                 var f=uno+tres+cuatro;
                                 var g=uno+dos+cuatro;
                                 var h=uno+dos+tres;
                                 print uno;
                                 print a;
                            if (a == b){
                                print ("YES");
                            }
                            else if(c==d ){
                                print("YES");
                            }
                            else if(uno==e){
                                print("YES");
                            }
                            else if(dos==f){
                                print("YES");
                            }
                            else if(tres==g){
                                print("YES");
                            }
                            else if(cuatro==h){
                                print("YES");
                            }
                            else{
                                print("NO");
                            }


let data = readline().split(" ");

var a = parseInt(data[0]), b = parseInt(data[1]), c = parseInt(data[2]), d = parseInt(data[3]);

main : for(let i = 0; i < 2; ++ i) {
    for(let j = 0; j < 2; ++ j) {
        for(let e = 0; e < 2; ++ e) {
            for(let k = 0; k < 2; ++ k) {
                let A = i * a + j * b + e * c + k * d;
                let B = (i^1) * a + (j^1) * b + (e^1) * c + (k^1) * d;
                if(A == B) {
                    print("YES");
                    break main;
                }
            }
        }
    }
}


var input = readline().split(" ");
var count = 0;
for(let i=1; i<input.length;){
    if(input[i]==input[i-1]){
        count++;
        i==2;
    }else{
        i++
    }
}


minLength = parseInt(readline());
data = readline();
currentLength = 1;
currentColor = data.pop();

for (let i = data.length; i--;) {
	if (data[i] === currentColor) {
		currentLength++;
		continue;
	}

	if (minLength > currentLength) {
		minLength = currentLength;
	}

	currentLength = 1;
	currentColor = data[i];
}

print(minLength - 1);


minLength = parseInt(readline());
data = readline().split('');
currentLength = 1;
currentColor = data.pop();

for (let i = data.length; i--;) {
	if (data[i] === currentColor) {
		currentLength++;
		continue;
	}

	if (minLength > currentLength) {
		minLength = currentLength;
	}

	currentLength = 1;
	currentColor = data[i];
}

print(minLength - 1);


var n = readline();
var stones = readline().split('');
var prev = stones[0];
var res = 0;
for(let i = 1; i < n; ++i){
    if(stones[i] === stones[i - 1]) ++res;
}

print(res);


input = readline().split(' ');

minLength = parseInt(input[0]);
data = input[1].split('');
currentLength = 1;
currentColor = data.pop();

print(minLength + data);

for (let i = data.length; i--;) {
	if (data[i] === currentColor) {
		currentLength++;
		continue;
	}

	if (minLength > currentLength) {
		minLength = currentLength;
	}

	currentLength = 1;
	currentColor = data[i];
}

print(minLength - 1);


var [n,m] = readLine().split(' ').map(a=>parseInt(a));
   var count = 0;
   var target = n+m;
   for(var i = 0;i<=n+m;i++){
       for(var j = 0;j<=n+m;j++){
           if(i^2+j == n && j^2+i == m){
               count++
           }
       }
   }
    print(count);


function processData(input) {
    //Enter your code here
   var [n,m] = input.split(' ').map(a=>parseInt(a))
   var count = 0
   var target = n+m
   for(var i = 0;i<=n+m;i++){
       for(var j = 0;j<=n+m;j++){
           if(i**2+j == n && j**2+i == m){
               count++
           }
       }
   }
    console.log(count)
}

process.stdin.resume();
process.stdin.setEncoding("ascii");
_input = "";
process.stdin.on("data", function (input) {
    _input += input;
});

process.stdin.on("end", function () {
   processData(_input);
});


 var [n,m] = readLine().split(' ').map(a=>parseInt(a))
   var count = 0
   var target = n+m
   for(var i = 0;i<=n+m;i++){
       for(var j = 0;j<=n+m;j++){
           if(i**2+j == n && j**2+i == m){
               count++
           }
       }
   }
    print(count)
}


let print = require('lol-io').print;
let readline = require('lol-io').readline;

function calc(input) {
    var o = 0, _ = 0;
    for (i = 0; i < input.length; i++) {
        if (input.charAt(i) === 'o')
            o++;
        else
            _++;
    }
    return (_ === 0) || (_ % o === 0 && o > 0);
}

while ((x = readline()) && x !== 'undefined')
    console.log(calc(x) ? 'YES' : 'NO');


function calculateBillCount(n)
{
	let billCount = 0;

	billCount += n \ 100;
	n = n % 100;

	billCount += n \ 20;
	n = n % 20;

	billCount += n \ 10;
	n = n % 10;

	billCount += n \ 5;
	n = n % 5;

	billCount += n \ 1;
	n = n % 1;

	return billCount;
}

const numbers = readline().split(" ")
const n = +numbers[0];

print(calculateBillCount(n))


const readline = readline();
const input = parseInt(readline);
let countingInput = 0;
let answer = 0;
const countAnswer = (input) => {
  countingInput = input;
  if (countingInput >= 100) {
    do {
      countingInput -= 100;
      answer += 1;
    } while (countingInput >= 100);
  }
  if (countingInput >= 20) {
    do {
      countingInput -= 20;
      answer += 1;
    } while (countingInput >= 20);
  }
  if (countingInput >= 10) {
    do {
      countingInput -= 10;
      answer += 1;
    } while (countingInput >= 10);
  }
  if (countingInput >= 5) {
    do {
      countingInput -= 5;
      answer += 1;
    } while (countingInput >= 5);
  }
  if (countingInput >= 1) {
    do {
      countingInput -= 1;
      answer += 1;
    } while (countingInput >= 1);
  }

  return answer;
};
countAnswer(input);

print(answer);


let initialValue = 125;
let n100 = 0;
let n20 = 0;
let n10 = 0;
let n5 = 0;
let n1 = 0;

if (initialValue >= 100) {
  n100 = initialValue / 100;
  initialValue = initialValue - Math.floor(n100) * 100;
}
if (initialValue >= 20) {
  n20 = initialValue / 20;
  initialValue = initialValue - Math.floor(n20) * 20;
}
if (initialValue >= 10) {
  n10 = initialValue / 10;
  initialValue = initialValue - Math.floor(n10) * 10;
}
if (initialValue >= 5) {
  n5 = initialValue / 5;
  initialValue = initialValue - Math.floor(n5) * 5;
}
if (initialValue >= 1) {
  n1 = initialValue / 1;
  initialValue = initialValue - Math.floor(n1) * 1;
}

const result =
  Math.floor(n100) +
  Math.floor(n20) +
  Math.floor(n10) +
  Math.floor(n5) +
  Math.floor(n1);


const num = readline().split(' ').map(n => parseInt(n));
const n = num[0];

const getBills = (bill, n) => (Math.floor(n / bill)) ? Math.floor(n / bill) : 0;

const bills = [100, 20, 10, 5, 1];

let result = 0;
let tempN = n;

for (let i = 0; i <5; i++) {
  const chlen = getBills(bills[i], tempN);
  result += chlen;
  if (chlen) {
    tempN -= bills[i] * chlen;
  }
}

console.log(result);


var line = readline().split(' ');
print( getSum(line[0]) );
function getSum(number){
    let sum = 0;
    while (number >= 1) {
        number -= (num >= 100) ? 100 :
                  (num >= 20) ? 20 :
                  (num >= 10) ? 10 :
                  (num >= 5) ? 5 :
                  1;
        sum++;
    }
    return sum;
}


const num = readline();
const n = parseInt(num);

const getBills = (bill, n) => (Math.floor(n / bill)) ? Math.floor(n / bill) : 0;

const bills = [100, 20, 10, 5, 1];

let result = 0;
let tempN = n;

for (let i = 0; i <5; i++) {
  const chlen = getBills(bills[i], tempN);
  result += chlen;
  if (chlen) {
    tempN -= bills[i] * chlen;
  }
}

print(result);


let x = Number(readline());
function getSum(number){
    if (number == 1) return 1;
    if (number >= 100) {
        return 1 + getSum(number - 100);
    } else if (number >= 20) {
        return 1 + getSum(number - 20);
    } else if (number >= 20) {
        return 1 + getSum(number - 20);
    } else if (number >= 20) {
        return 1 + getSum(number - 20);
    } else {
        return 1 + getSum(number - 1);
    }
}


function calculateBillCount(n)
{
	var billCount = 0;

	billCount += n \ 100;
	n = n % 100;

	billCount += n \ 20;
	n = n % 20;

	billCount += n \ 10;
	n = n % 10;

	billCount += n \ 5;
	n = n % 5;

	billCount += n \ 1;
	n = n % 1;

	return billCount;
}

var numbers = readline().split(" ")
var n = +numbers[0];

print(calculateBillCount(n))


var numbers = readline().split(" ").map(function(x) { return parseInt(x); });

const set = new Set(numbers);

let result = set.size();

if (set.has(0)) {
  result -= 1;
}


var r = readline();
//sorting the array in an ascending order
var puzzles_pieces = readline().split(" ").sort(function(a, b){return a-b});
//var modified = puzzles_pieces;
var modified = puzzles_pieces.filter(function(a,b){a==b return puzzles_pieces.remove(b)})
// for(i = 0; i < puzzles_pieces; i++){
// 	if(puzzles_pieces[i] === puzzles_pieces[i+1]){
// 		modified = puzzles_pieces.remove(puzzles_pieces[i])
// 	}
// }
var minDiff = modified[1] - modified[0];
for(i = 2; i < modified.length; i++){
	//using the comparsion Math.min() offers with fixed value
	//while iterating on the remaining portion of the array
	//to achieve the minimum difference needed.
	minDiff = Math.min(minDiff, modified[i]-modified[i-1]);
}
print(minDiff);


var r = readline();

var puzzles_pieces = +readline();
//sorting the array in an ascending order
var sorted = puzzles_pieces.sort(function(a,b){return a-b});

var new_sorted = sorted.map(function(a,b){a===b return sorted.remove(b)})

var minDiff = new_sorted[1] - new_sorted[0];
for(i = 2; i < sorted.length; i++){
	//using the comparsion Math.min() offers with fixed value
	//while iterating on the remaining portion of the array
	//to achieve the minimum difference needed.
	minDiff = Math.min(minDiff, a[i]-a[i-1]);
}
print(minDiff);


var r = readline().split(" ");
var students = +r[0] - 1;
var puzzles = +r[1];

//sorting the array in an ascending order
var puzzles_pieces = readline().split(" ").map(function(v){return+v;});
puzzles_pieces.sort(function(a, b){return a-b;});
// var removeItem = function(array){array.filter(function(array){for(i = 0; i < array.length; i++){
// 	var modified = Math.abs(array[i] - array[i+1]) > 0;
// }return modified;})};
// for(i = 0; i < puzzles_pieces.length; i++){
// 	if(puzzles_pieces[i] == puzzles_pieces[i+1]){
// 		puzzles_pieces.remove(puzzles_pieces.puzzles_pieces[i]);
// 	}
// }

// var modified = [];
//var modified = puzzles_pieces;
// var removeItem = function(array,value){  //my clear function
//   if(Array.isArray(array)){  //for multi remove
//     	 for(var i = 0; i < array.length; i++) {
//         	if(array[i] === array[i+1]) {
//            		array.splice(i, 1);
//         }
//     }

// for(i = 0; i < puzzles_pieces.length; i++){
// 	if(puzzles_pieces[i] == puzzles_pieces[i+1]){

// 	}
// }

var minDiff = 3v8;
for(i = 0; i < puzzles - students; i++){
	//using the comparsion Math.min() offers with fixed value
	//while iterating on the remaining portion of the array
	//to achieve the minimum difference needed.

	minDiff = Math.min(minDiff, puzzles_pieces[i+students]-puzzles_pieces[i]);
}
print(minDiff);


var r = readline();
//sorting the array in an ascending order
var puzzles_pieces = readline().split(" ").sort(function(a, b){return a-b});
// var modified = [];
// puzzles_pieces = puzzles_pieces.filter(function(a,b){a==b return puzzles_pieces.remove(b)})
var removeItem = function(array,value){  //my clear function
  if(Array.isArray(array)){  //for multi remove
    for(var i = 0; i < array.length; i++) {
      for(var j = 0; j < array.length; j++) {
          if(array[i] === value[j]) {
             array.splice(i, 1);
          };
      }
    }

for(i = 0; i < puzzles_pieces; i++){
	if(puzzles_pieces[i] == puzzles_pieces[i+1]){
		removeItem(puzzles_pieces, puzzles_pieces[i]);
	}
}

var minDiff = puzzles_pieces[1] - puzzles_pieces[0];
for(i = 2; i < puzzles_pieces.length; i++){
	//using the comparsion Math.min() offers with fixed value
	//while iterating on the remaining portion of the array
	//to achieve the minimum difference needed.
	minDiff = Math.min(minDiff, puzzles_pieces[i]-puzzles_pieces[i-1]);
}
print(minDiff);


var r = readline();
//sorting the array in an ascending order
var puzzles_pieces = readline().split(" ").sort(function(a, b){return a-b});
var modified = [];
// puzzles_pieces = puzzles_pieces.filter(function(a,b){a==b return puzzles_pieces.remove(b)})
var removeItem = function(array,value){  //my clear function
  if(Array.isArray(array)){  //for multi remove
    	 for(var i = 0; i < array.length; i++) {
        	if(array[i] === array[i+1]) {
           		array.splice(i, 1);
        }
    }

for(i = 0; i < puzzles_pieces.length; i++){
	if(puzzles_pieces[i] == puzzles_pieces[i+1]){
		modified.push(removeItem(puzzles_pieces, puzzles_pieces[i]));
	}
}

var minDiff = modified[1] - modified[0];
for(i = 2; i < modified.length; i++){
	//using the comparsion Math.min() offers with fixed value
	//while iterating on the remaining portion of the array
	//to achieve the minimum difference needed.
	minDiff = Math.min(minDiff, modified[i]-modified[i-1]);
}
print(minDiff);


function main() {
    const n = Number(process.argv[2]);
    const m = Number(process.argv[3]);
    const array = [];
    for (let i = 4; i < process.argv.length; i++) {
        array.push(Number(process.argv[i]));
    }
    const sorted = mergesort(array);
    let minDistance = sorted[n-1] - sorted[0];
    let i = 1;
    while (n+i-1 < m) {
        if(sorted[n+i-1] - sorted[i] < minDistance) {
            minDistance = sorted[n+i-1] - sorted[i];
        }
        i++;
    }
    return minDistance;
}

function merge(left, right) {
    const result = [];
    let i = 0;
    let j = 0;
    while(i < left.length && j < right.length) {
        if (left[i] < right[j]) {
            result.push(left[i]);
            i++;
        } else {
            result.push(right[j]);
            j++;
        }
    }
    while(j < right.length) {
        result.push(right[j]);
        j++;
    }
    while(i < left.length) {
        result.push(left[i]);
        i++;
    }
    return result;
}

function mergesort(arr) {
    if (arr.length <= 1) {
        return arr;
    }
    let a = arr.slice(0, arr.length/2);
    let b = arr.slice(arr.length/2, arr.length);
    const left = mergesort(a);
    const right = mergesort(b);
    const result = merge(left, right);
    return result;
}

main();


var r = readline();
//sorting the array in an ascending order
var puzzles_pieces = readline().split(" ").sort(function(a, b){return a-b}).filter(function(a,b){Math.abs(a-b) == 0 return remove(a)});
// var modified = [];
//var modified = puzzles_pieces;
// var removeItem = function(array,value){  //my clear function
//   if(Array.isArray(array)){  //for multi remove
//     	 for(var i = 0; i < array.length; i++) {
//         	if(array[i] === array[i+1]) {
//            		array.splice(i, 1);
//         }
//     }

// for(i = 0; i < puzzles_pieces.length; i++){
// 	if(puzzles_pieces[i] == puzzles_pieces[i+1]){

// 	}
// }

var minDiff = puzzles_pieces[1] - puzzles_pieces[0];
for(i = 2; i < puzzles_pieces.length; i++){
	//using the comparsion Math.min() offers with fixed value
	//while iterating on the remaining portion of the array
	//to achieve the minimum difference needed.
	minDiff = Math.min(minDiff, puzzles_pieces[i]-puzzles_pieces[i-1]);
}
print(minDiff);


function merge(left, right) {
    const result = [];
    let i = 0;
    let j = 0;
    while(i < left.length && j < right.length) {
        if (left[i] < right[j]) {
            result.push(left[i]);
            i++;
        } else {
            result.push(right[j]);
            j++;
        }
    }
    while(j < right.length) {
        result.push(right[j]);
        j++;
    }
    while(i < left.length) {
        result.push(left[i]);
        i++;
    }
    return result;
}

function mergesort(arr) {
    if (arr.length <= 1) {
        return arr;
    }
    let a = arr.slice(0, arr.length/2);
    let b = arr.slice(arr.length/2, arr.length);
    const left = mergesort(a);
    const right = mergesort(b);
    const result = merge(left, right);
    return result;
}

function main() {
    let numbers = readline().split(" ").map(function(x) { return parseInt(x); });
    const n = Number(numbers[0]);
    const m = Number(numbers[1]);
    const sorted = mergesort(readline().split(" ").map(function(x) { return parseInt(x); }));
    let minDistance = sorted[n-1] - sorted[0];
    let i = 1;
    while (n+i-1 < m) {
        if(sorted[n+i-1] - sorted[i] < minDistance) {
            minDistance = sorted[n+i-1] - sorted[i];
        }
        i++;
    }
    console.log(minDistance);
}

main();


function merge(left, right) {
    const result = [];
    let i = 0;
    let j = 0;
    while(i < left.length && j < right.length) {
        if (left[i] < right[j]) {
            result.push(left[i]);
            i++;
        } else {
            result.push(right[j]);
            j++;
        }
    }
    while(j < right.length) {
        result.push(right[j]);
        j++;
    }
    while(i < left.length) {
        result.push(left[i]);
        i++;
    }
    return result;
}

function mergesort(arr) {
    if (arr.length <= 1) {
        return arr;
    }
    let a = arr.slice(0, arr.length/2);
    let b = arr.slice(arr.length/2, arr.length);
    const left = mergesort(a);
    const right = mergesort(b);
    const result = merge(left, right);
    return result;
}

function main() {
    let numbers = readline().split(" ").map(function(x) { return parseInt(x); });
    const n = Number(numbers[0]);
    const m = Number(numbers[1]);
    const sorted = mergesort(readline().split(" ").map(function(x) { return parseInt(x); }));
    let minDistance = sorted[n-1] - sorted[0];
    let i = 1;
    while (n+i-1 < m) {
        if(sorted[n+i-1] - sorted[i] < minDistance) {
            minDistance = sorted[n+i-1] - sorted[i];
        }
        i++;
    }
    return minDistance;
}

main();


var a = nextline();
var b = nextline();
var c = nextline();
var arr = new array [26];
for(var i=0;i<26;i++){
    arr[i]=0;
}
for(var i = 0;i<26,i++){
    arr[c.charCodeAt(i)-'A'.charCodeAt(0)]++;
}
for(var i = 0;i<26,i++){
    arr[b.charCodeAt(i)-'A'.charCodeAt(0)]--;
}
for(var i = 0;i<26,i++){
    arr[a.charCodeAt(i)-'A'.charCodeAt(0)]--;
}
for(var i = 0; i<26;i++){
    if(arr[i]!=0){
        print("NO");
        return;
    }
}
print ("YES");


#include<bits/stdc++.h>
typedef long long int ll;
using namespace std;
int main()
{
        ll i,j,k;
        string s;
        bool flag=true;

        cin>>s;
        for(i=0;i<s.length();)
        {
            if(s[i]=='1' && s[i+1]=='4'  && s[i+2]=='4')
            {
                i+=3;//cout<<"144"<<endl;
            }

            else if(s[i]=='1' && s[i+1]=='4')
            {
                i+=2;//cout<<"14"<<endl;
            }

            else if(s[i]=='1')
            {
                i++;//cout<<"14"<<endl;
            }

            else
            {
                flag=false;
                break;
            }
        }

        if(flag)
            cout<<"YES";
        else
            cout<<"NO";

        return 0;
}


nabc = readline().split(' ').map(Number);
n = nabc[0];
l = nabc.slice(1).reduce((r, i) => r.includes(i) ? r : [ ...r, i ], []).sort((a, b) => a - b);
const ribbon = (n, l) => {
    if (n === 0) return 0;
    if (n < 0) return false;
    for (let i = 0; i < l.length; i++) {
        const x = ribbon(n - l[i], l);
        if (typeof x === 'number') return 1 + x;
    }
}
print(ribbon(n, l));


const [ n, a, b, c] = readline().split(' ').map(Number);
const l = [a, b, c].slice(1).reduce((r, i) => r.includes(i) ? r : [ ...r, i ], []).sort((a, b) => a - b);

const ribbon = (n, l) => {
    if (n === 0) return 0;
    if (n < 0) return false;
    for (let i = 0; i < l.length; i++) {
        const x = ribbon(n - l[i], l);
        if (typeof x === 'number') return 1 + x;
    }
};

print(ribbon(n, l));


getInt = () => parseInt(readline());
getFlt = () => parseFloat(readline());
getArrInt = () => readline().split(' ').map(x => parseInt(x));
getArrFlt = () => readline().split(' ').map(x => parseFloat(x));
Int = (x) => Math.floor(x);

nums = getArrInt();
n = nums[0], a = nums[1], b = nums[2], c = nums[3];

max = -1;

for(let i = 0; i <= 4000; i = i + 1){
	for(let j = 0; j <= 4000; j++){
		let tot = i * a + j * b;
		if(tot <= n){
			let rem = n - tot;
			if(rem % c === 0){
				let k = rem / c;
				max = Math.max(max, i + j + k);
			}
		}
	}
}

print(max)


nabc = readline().split(' ').map(Number);
var [ t, ...others ] = nabc;
n = nabc[0];
l = nabc.slice(1).reduce((r, i) => r.includes(i) ? r : [ ...r, i ], []).sort((a, b) => a - b);
function ribbon(n, l) {
    if (n === 0) return 0;
    if (n < 0) return false;
    for (var i = 0; i < l.length; i++) {
        var x = ribbon(n - l[i], l);
        if (typeof x === 'number') return 1 + x;
    }
}
print(ribbon(n, l));


let datos = readline().split(' ');
const tamano = Number(datos[0]);
const numero = Number(datos[1]);
let veces = 0;
for(let i=1; i<= tamano; i++){
  if((numero % i) === 0 && (numero / i) <= tamano ){
    veces++;
  }
}
print(veces);


const datos = readline().split(' ');
const tamano = Number(datos[0]);
const numero = Number(datos[1]);
let veces = 0;
for(let i=1; i<= tamano; i++){
  if((numero % i) === 0 && (numero / i) <= tamano ){
    veces++;
  }
}
print(veces);


var numbers = readline().split(" ").map(function(x) {return parseInt(x); });
console.log(numbers);

var n = numbers[0]
var x = numbers[1]

var count = 0;
for (i=0; i<n; ++i){
    if(x%i==0 and i*n>=x){
        count += 1;
    }
}
console.log(count);


var numbers = readline().split(" ").map(function(x) { return parseInt(x); });
let N = numbers[0];
let M = numbers[1];

  if(N == M) return 0;
  let flags = [];
  let queue = [];
  let c = 0;
  let size = 0;
  queue[0] = [N, 1];
  flags[N] = true;
  while(queue.length > 0){
      let node = queue[c++];

      let value = node[0];
      let count = node[1];

      let le = value - 1;
      let ri = value * 2;
      if(le == M || ri == M){
          return count;
      }
      if(!flags[le] && le >= 1){
          queue[++size] = [le, count + 1];
          flags[le] = true;
      }
      if(!flags[ri] && ri < 2*M){
          queue[++size] = [ri, count + 1];
          flags[ri] = true;
      }
  }


(() => {
    function FindC(N, M){
      if(N == M) return 0;
      let flags = [];
      let queue = [];
      let c = 0;
      let size = 0;
      queue[0] = [N, 1];
      flags[N] = true;
      while(queue.length > 0){
          let node = queue[c++];

          let value = node[0];
          let count = node[1];

          let le = value - 1;
          let ri = value * 2;
          if(le == M || ri == M){
              return count;
          }
          if(!flags[le] && le >= 1){
              queue[++size] = [le, count + 1];
              flags[le] = true;
          }
          if(!flags[ri] && ri < 2*M){
              queue[++size] = [ri, count + 1];
              flags[ri] = true;
          }
      }
    }

    let numbers = readline().split(" ");
    print(FindC(parseInt(numbers[0]), parseInt(numbers[1])));
})();


(() => {
    function FindC(N, M){
      if(N == M) return 0;
      let flags = [];
      let queue = [];
      let c = 0;
      let size = 0;
      queue[0] = [N, 1];
      flags[N] = true;
      while(queue.length > 0){
          let node = queue[c++];

          let value = node[0];
          let count = node[1];

          let le = value - 1;
          let ri = value * 2;
          if(le == M || ri == M){
              return count;
          }
          if(!flags[le] && le >= 1){
              queue[++size] = [le, count + 1];
              flags[le] = true;
          }
          if(!flags[ri] && ri < 2*M){
              queue[++size] = [ri, count + 1];
              flags[ri] = true;
          }
      }
    }

    let numbers = readline().split(" ");
    print(FindC(parseInt(numbers[0]), parseInt(numbers[1])));
}))();


function FindC(N, M){
  if(N == M) return 0;
  let flags = [];
  let queue = [];
  let c = 0;
  let size = 0;
  queue[0] = [N, 1];
  flags[N] = true;
  while(queue.length > 0){
      let node = queue[c++];

      let value = node[0];
      let count = node[1];

      let le = value - 1;
      let ri = value * 2;
      if(le == M || ri == M){
          return count;
      }
      if(!flags[le] && le >= 1){
          queue[++size] = [le, count + 1];
          flags[le] = true;
      }
      if(!flags[ri] && ri < 2*M){
          queue[++size] = [ri, count + 1];
          flags[ri] = true;
      }
  }
}

let numbers = readline().split(" ");
print(FindC(parseInt(numbers[0]), parseInt(numbers[1])));


function FindC(N, M){
  if(N == M) return 0;
  let flags = [];
  let queue = [];
  let c = 0;
  let size = 0;
  queue[0] = [N, 1];
  flags[N] = true;
  while(queue.length > 0){
      let node = queue[c++];

      let value = node[0];
      let count = node[1];

      let le = value - 1;
      let ri = value * 2;
      if(le == M || ri == M){
          return count;
      }
      if(!flags[le] && le >= 1){
          queue[++size] = [le, count + 1];
          flags[le] = true;
      }
      if(!flags[ri] && ri < 2*M){
          queue[++size] = [ri, count + 1];
          flags[ri] = true;
      }
  }
}

var numbers = readline().split(" ");
print(FindC(parseInt(numbers[0]), parseInt(numbers[1])));


function FindC(N, M){
  if(N == M) return 0;
  let flags = [];
  let queue = [];
  let c = 0;
  let size = 0;
  queue[0] = [N, 1];
  flags[N] = true;
  while(queue.length > 0){
      let node = queue[c++];

      let value = node[0];
      let count = node[1];

      let le = value - 1;
      let ri = value * 2;
      if(le == M || ri == M){
          return count;
      }
      if(!flags[le] && le >= 1){
          queue[++size] = [le, count + 1];
          flags[le] = true;
      }
      if(!flags[ri] && ri < 2*M){
          queue[++size] = [ri, count + 1];
          flags[ri] = true;
      }
  }
}

var numbers = readLine().split(" ");
print(FindC(parseInt(numbers[0]), parseInt(numbers[1])));


"use strict";
const fs = require("fs");
/let filename = "0.txt";
let filename = 0;
const input = fs.readFileSync(filename, "utf8").trim().split("\n");
let line = 0;
function readline() {
  return input[line++];
}
function iInpArr() {
  return readline()
    .trim()
    .split(" ")
    .map((cur) => parseInt(cur));
}
function BInpArr() {
  return readline()
    .trim()
    .split(" ")
    .map((cur) => BigInt(cur));
}
function string() {
  return readline().trim();
}
function stringArr() {
  return readline().trim().split("");
}

function stringArr1() {
  return readline().trim().split(" ");
}
function getValue() {
  return parseInt(readline());
}
function iInpArr1() {
  return readline()
    .trim()
    .split("")
    .map((cur) => parseInt(cur));
}
let mod = 1e9 + 7;
mod = BigInt(mod);
const pow = (num, exp, mod) => {
  if (exp === BigInt(0)) return BigInt(1);
  let x = pow(num, exp / BigInt(2), mod);
  if (exp % BigInt(2)) return (((x * x) % mod) * num) % mod;
  else return (x * x) % mod;
};
const inverse = (num, exp) => {
  return pow(BigInt(num), BigInt(exp), BigInt(mod));
};
const sqrt = (n) => {
  let low = 1n,
    high = n,
    ans;
  while (low <= high) {
    let mid = (low + high) / 2n;
    if (mid * mid <= n) {
      ans = mid;
      low = mid + 1n;
    } else high = mid - 1n;
  }
  return ans;
};

const solve = () => {
  let t = 1;
  while (t--) {
    let n = getValue();
    let ans = 6n,
      k = 4n;
    for (let i = 2; i <= n; i++) {
      ans = (ans * ((k * k) % mod)) % mod;
      k = (k * k) % mod;
    }
    console.log(ans + "");
  }
};
solve();


let keyboardline = "qwertyuiopasdfghjkl;zxcvbnm,./";

let direction = readline();
let modified = readline();
let original="";
if(direction =="R"){
    for(var i = 0;i<modified.length;i++) {
        original+=keyboardline[keyboardline.indexOf(modified[i])-1];
    }

}
else {
    for(var i = 0;i<modified.length;i++) {
        original+=keyboardline[keyboardline.indexOf(modified[i])+1];
    }
}
print(original);


let keyboardline = "qwertyuiopasdfghjkl;zxcvbnm,./";

let direction = readline();
let modified = readline();
let original="";


var r = ['wertyuiop',
         'sdfghjkl;',
         'xcvbnm,./']
var l = [' qwertyuiop',
         ' asdfghjkl;',
         ' zxcvbnm,./']
var d = ['qwertyuiop',
         'asdfghjkl;',
         'zxcvbnm,./']

function solve(str, x) {
  var ans = '';
  if (x == 'L') {
    for (var i = 0; i < str.length; i ++) {
      var s = str[i];
      for (var j = 0; j < 3; j ++)
        if (l[j].indexOf(s) !== -1) {s = d[j][l[j].indexOf(s)]; break;}
      ans += s;
    }
  }
  if (x == 'R') {
    for (var i = 0; i < str.length; i ++) {
      var s = str[i];
      for (var j = 0; j < 3; j ++)
        if (r[j].indexOf(s) !== -1) {s = d[j][r[j].indexOf(s)]; break;}
      ans += s;
    }
  }
  return ans;
}
urn ans;
}

var x = readline();
print(solve(readline(), x));


function getOutput(n, a, x, b, y) {
    const maxNumberOfSteps = n;
    for (let currentMinute = 0; currentMinute < maxNumberOfSteps; currentMinute++) {
        let danielCurrentStation = (a + currentMinute) % maxNumberOfSteps;
        if (danielCurrentStation === 0) {
            danielCurrentStation = n;
        }
        let vladCurrentStation = (b - currentMinute) % maxNumberOfSteps;
        if (vladCurrentStation < 0) {
            vladCurrentStation = n + vladCurrentStation;
        }
        if (vladCurrentStation === 0) {
            vladCurrentStation = n;
        }
        if (danielCurrentStation === vladCurrentStation) {
            return 'YES';
        }
        if (danielCurrentStation === x || vladCurrentStation === y) {
            break;
        }
    }
    return 'NO';
}

function main() {
    let line = readline().split(' ');
    let [n, a, x, b, y] = line.map(x => parseInt(x));
    console.log(getOutput(n, a, x, b, y));
}


function fat(n) {
  let res = 1;
  for(let i = 2; i <= n; i++) res*=i;
  return res;
}

function main(){
  let numbers = readline().split(" ").map(function(x) { return parseInt(x); });
  let a = numbers[0], b = numbers[1]
  // print(a,b);
  let res;
  if(a <= b) res = fat(a);
  else res = fat(b);
  print(res);
}

main()


function fat(n) {
  let res = 1;
  for(let i = 2; i <= n; i++) res=res*i;
  return res;
}

function main(){
  let numbers = readline().split(" ").map(function(x) { return parseInt(x); });
  let a = numbers[0], b = numbers[1]
  // print(a,b);
  let res;
  if(a <= b) res = fat(a);
  else res = fat(b);
  print(res);
}


// function fat(n) {
//   let res = 1;
//   for(let i = 2; i <= n; i++) res=res*i;
//   return res;
// }

function main(){
  let numbers = readline().split(" ").map(function(x) { return parseInt(x); });
  let a = numbers[0], b = numbers[1]
  // print(a,b);
  let res;
  if(a <= b) res = 1;
  else res = 1;
  print(res);
  return res;
}

main()


function fat(n) {
  let res = 1;
  for(let i = 2; i <= n; i++) res=res*i;
  return res;
}

function main(){
  let numbers = readline().split(" ").map(function(x) { return parseInt(x); });
  let a = numbers[0], b = numbers[1]
  // print(a,b);
  let res;
  if(a <= b) res = fat(a);
  else res = fat(b);
  print(res);
  return res;
}

main()


function fat(n) {
  var var = 1;
  for(let i = 2; i <= n; i++) res*=i;
  return res;
}

function main(){
  var numbers = readline().split(" ").map(function(x) { return parseInt(x); });
  var a = numbers[0], b = numbers[1]
  // print(a,b);
  var res;
  if(a <= b) res = fat(a);
  else res = fat(b);
  print(res);
}

main()


function fat(n) {
  let res = 1;
  for(let i = 2; i <= n; i++) res=res*i;
  return res;
}

function main(){
  let numbers = readline().split(" ").map(function(x) { return parseInt(x); });
  // let a = numbers[0], b = numbers[1]
  // // print(a,b);
  // let res;
  // if(a <= b) res = fat(a);
  // else res = fat(b);
  // print(res);
  // return res;
}

main()


function fat(n) {
  let res = 1;
  for(let i = 2; i <= n; i++) res*=i;
  return res;
}

function main(){
  var numbers = readline().split(" ").map(function(x) { return parseInt(x); });
  var a = numbers[0], b = numbers[1]
  // print(a,b);
  let res;
  if(a <= b) res = fat(a);
  else res = fat(b);
  print(res);
}

main()


function fat(n) {
  let res = 1;
  for(let i = 2; i <= n; i++) res=res*i;
  return res;
}

function main(){
  let numbers = readline().split(" ").map(function(x) { return parseInt(x); });
  let a = numbers[0], b = numbers[1]
  // print(a,b);
  let res = 0;
  if(a <= b) res = fat(a);
  else res = fat(b);
  print(res);
  return res;
}

main()


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    var str = readline();
    var helloArr = "hello".split("");
    function determineFlag(){
        var flag = true;
        var i = 0;
        while(flag & i < helloArr.length){
            var idx = str.indexOf(helloArr[i]);
            if(idx === -1){
                flag = false;
                break;
            }
            else {
                str = str.slice(idx + 1);
            }
            i++;
        }
        return flag;
    }
    function result() {
        if(determineFlag() === true) {
            return "Yes";
        }
        else {
            return "No";
        }
    }
    print(result());
    </script>
</body>
</html>


var m={'h','e','l','l','o'};
var s={};
var r=readline().toLowerCase().split('').map(function(k){s[k]=true;});
print(((Object.keys(s)) == (Object.keys(m)))? 'YES': 'NO');


let a = readline();
let count_h = 0;
let count_e = 0;
let count_l = 0;
let count_o = 0;
for (let i = 0; i < a.length; i++) {
  if (a[i] == "h") count_h++;
  else if (a[i] == "e") count_e++;
  else if (a[i] == "l") count_l++;
  else if (a[i] == "o") count_o++;
}
if (
  count_h >= 1 &&
  count_e >= 1 &&
  count_l >= 2 &&
  count_o >= 1 &&
  a.length > 5
)
  print("YES");
else print("NO");


<html>
<script>
var word = "hello";var r = 0;
var input = readline();

for (var x=0;x<input.length;x++){
	if(input[x] == word[r]){r+=1;}
}

if (r == 5){print('Yes');}else {print('no');}
</script>
</html>


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    var str = prompt();
    var helloArr = "hello".split("");
    function determineFlag(){
        var flag = true;
        var i = 0;
        while(flag & i < helloArr.length){
            var idx = str.indexOf(helloArr[i]);
            if(idx === -1){
                flag = false;
                break;
            }
            else {
                str = str.slice(idx + 1);
            }
            i++;
        }
        return flag;
    }
    function result() {
        if(determineFlag() === true) {
            return "Yes";
        }
        else {
            return "No";
        }
    }
    result();
    </script>
</body>
</html>


var string = readline();
    var greetings = ["h","e","l","l","o"];
    var i = 0;
    var result = string.split("").filter((letter) => {
        if(letter === greetings[i]) {
            i++;
            return true;
    }
    return false;
  }).join("") === "hello";
  if(result) print("YES");
  else print("NO");
}


var s = readline();

function shouldSayHello(s) {
    var word = 'hello';

    var prevIndex = 0;
    for (i = 0; i < word.length; i++) {
        let index = s.indexOf(word[i], prevIndex + 1);
        if (index === -1) {
            return 'NO';
        } else {
            prevIndex = index;
        }
    }
    return 'YES';
}

print(shouldSayHello(s));


function shouldSayHello(s) {
    var word = 'hello';

    var prevIndex = 0;
    for (i = 0; i < word.length; i++) {
        let index = s.indexOf(word[i], prevIndex + 1);
        if (index === -1) {
            return 'NO';
        } else {
            prevIndex = index;
        }
    }
    return 'YES';
}

var s = readline();
print(shouldSayHello(s));


var m={'h','e','l','l','o'};
var s={};
var x=m.map(function(w){m[w]=true;});
var r=readline().toLowerCase().split('').map(function(k){s[k]=true;});
print(((Object.keys(s)) == (Object.keys(m)))? 'YES': 'NO');


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    var str = prompt();
    var helloArr = "hello".split("");
    function determineFlag(){
        var flag = true;
        var i = 0;
        while(flag & i < helloArr.length){
            var idx = str.indexOf(helloArr[i]);
            if(idx === -1){
                flag = false;
                break;
            }
            else {
                str = str.slice(idx + 1);
            }
            i++;
        }
        return flag;
    }
    function result() {
        if(determineFlag() === true) {
            return "Yes";
        }
        else {
            return "No";
        }
    }
    console.log(result());
    </script>
</body>
</html>


let a = readline();
let count_h = 0;
let count_e = 0;
let count_l = 0;
let count_o = 0;
for (let i = 0; i < a.length; i++) {
  if (a[i] === "h") count_h++;
  else if (a[i] ==="e") count_e++;
  else if (a[i] === "l") count_l++;
  else if (a[i] === "o") count_o++;
}
if (
  count_h >= 1 &&
  count_e >= 1 &&
  count_l >= 2 &&
  count_o >= 1 &&
  a.length > 5
)
  print("YES");
else print("NO");


// function shouldSayHello(s) {
//     var word = 'hello';

//     var prevIndex = 0;
//     for (i = 0; i < word.length; i++) {
//         let index = s.indexOf(word[i], prevIndex + 1);
//         if (index === -1) {
//             return 'NO';
//         } else {
//             prevIndex = index;
//         }
//     }
//     return 'YES';
// }

var s = readline();

var word = 'hello';
var res = 'YES';

var prevIndex = 0;
for (i = 0; i < word.length; i++) {
    let index = s.indexOf(word[i], prevIndex + 1);
    if (index === -1) {
        res = 'NO';
        break;
    } else {
        prevIndex = index;
    }
}

print(res);


<html>
<body>
<script language="javascript" type="text/javascript">
<!--
 document.write ("25")
//-->
</script>
</body>
</html>


// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package quote collects pithy sayings.
package quote // import "rsc.io/quote"

import "rsc.io/quote/v3"

// Hello returns a greeting.
func Hello() string {
	return quote.HelloV3()
}

// Glass returns a useful phrase for world travelers.
func Glass() string {
	// See http://www.oocities.org/nodotus/hbglass.html.
	return quote.GlassV3()
}

// Go returns a Go proverb.
func Go() string {
	return quote.GoV3()
}

// Opt returns an optimization truth.
func Opt() string {
	// Wisdom from ken.
	return quote.OptV3()
}


var len = +readline();
var originSet = readline().split(' ');

var countMap = {}
originSet.forEach((num) => {
    if (!countMap[num]) {
        countMap[num] = 0;
    }
    countMap[num]++;
});

var niceGroupIndex = 0;
var niceDiff = 0;

var groupLabel = ['A', 'B'];
var label = groupLabel[0];

var result = [];
var isGood = {};
var goodCount = 0;
var labelForNum = {}
originSet.forEach((num, index) => {
    if (countMap[num] === 1) {
        result.push(label);
        // nice
        var group = niceGroupIndex % 2;
        niceDiff += group === 0 ? 1 : -1;

        niceGroupIndex++;

        group = niceGroupIndex % 2;
        label = groupLabel[group];
    } else {
        if (!labelForNum[num]) {
            labelForNum[num] = label;
        }
        result.push(labelForNum[num] ? labelForNum[num] : label);
    }
    if (countMap[num] > 2 && !isGood[num]) {
        isGood[num] = true;
        goodCount++;
    }
});

if (niceDiff === 0) {
    print('YES');
    print(result.join(''));
} else {
    var rest = Math.abs(niceDiff)
    if (rest <= goodCount) {
        print('YES');
        var labelNeeded = niceDiff < 0 ? 'B' : 'A';
        for (var i = 0, len = originSet.length; i < len; i++) {
            var num = originSet[i];
            if (labelNeeded !== result[i]) {
                if (countMap[num] === 1 && rest >= 2) {
                    result[i] = labelNeeded;
                    rest -= 2;
                } else if (isGood[num]) {
                    result[i] = labelNeeded;
                    isGood[num] = false;
                    rest--;
                }
            }
            if (rest === 0) {
                break;
            }
        }
        print(result.join(''));
    } else {
        print('NO');
    }
}

function check(result) {
    const groups = [[], []];
    result.forEach((label, index) => {
        if (label === 'A') {
            groups[0].push(originSet[index]);
        } else if (label === 'B') {
            groups[1].push(originSet[index]);
        }
    });

    const output = groups.map((group) => getNiceCount(group));
    function getNiceCount(group) {
        const map = {};
        group.forEach((num) => {
            if (!map[num]) {
                map[num] = 0;
            }
            map[num]++;
        });

        let sum = 0;
        Object.keys(map).forEach((num) => {
            if (map[num] === 1) {
                sum++;
            }
        });
        return sum;
    }
    console.log(output[0], output[1]);
}


var len = +readline();
var str = readline();

var i = 0;
for (; i < len - 1; i++) {
    var targetSum = 0;
    for (var j = 0; j <= i; j++) {
        targetSum += +str[j];
    }

    var k = i + 1;
    var sum = 0;
    while (k < len) {
        sum += +str[k];
        if (sum === targetSum) {
            sum = 0;
        } else if (sum > targetSum) {
            break;
        }
        k++;
    }

    if (k >= len && sum === 0) {
        break;
    }
}

var res = i < len - 1 ? 'YES' : 'NO';
print(res);


// http://codeforces.com/contest/977/problem/B

let length = parseInt(readline(), 10);
let string = readline();

function main(length, string) {
    let hash = {};

    for (let i = 0; i < length - 1; i++) {
        let substring = `${string[i]}${string[i + 1]}`;
        if (hash[substring]) {
            hash[substring] = hash[substring] + 1;
        } else {
            hash[substring] = 1;
        }
    }

    let twogrammaList = Object.keys(hash);
    let biggest = twogrammaList[0];

    for (let i = 1; i < twogrammaList.length; i++) {
        let tg = twogrammaList[i];

        if (hash[tg] > hash[biggest]) {
            biggest = twogrammaList[i];
        }
    }

    return biggest;
}

print(main(length, string));


let arg1 = readline().split(' ');
let arg2 = readline().split(' ');

let length = parseInt(arg1);
let string = arg2;

function main(length, string) {
    let hash = {};

    for (let i = 0; i < length - 1; i++) {
        let substring = `${string[i]}${string[i + 1]}`;
        if (hash[substring]) {
            hash[substring] = hash[substring] + 1;
        } else {
            hash[substring] = 1;
        }
    }

    let twogrammaList = Object.keys(hash);
    let biggest = twogrammaList[0];

    for (let i = 1; i < twogrammaList.length; i++) {
        let tg = twogrammaList[i];

        if (hash[tg] > hash[biggest]) {
            biggest = twogrammaList[i];
        }
    }

    return biggest;
}

print(main(length, string));


// http://codeforces.com/contest/977/problem/B

var args = readline().split(' ');

var length = parseInt(args[0], 10);
var string = args[1];

function main(length, string) {
    var hash = {};

    for (var i = 0; i < length; i++) {
        if (!string[i + 1]) {
            break;
        }

        var tg = `${string[i]}${string[i + 1]}`;
        if (hash[tg]) {
            hash[tg] = hash[tg] + 1;
        } else {
            hash[tg] = 1;
        }
    }

    var twogrammaList = Object.keys(hash);
    var biggest = twogrammaList[0];

    for (var j = 1; j < twogrammaList.length; j++) {
        let twogramma = twogrammaList[j];

        if (twogrammaList[twogramma] > twogrammaList[biggest]) {
            biggest = twogrammaList[j];
        }
    }

    return biggest;
}

print(main(length, string));


var length = parseInt(readline());
var string = readline();

function main(length, string) {
    var hash = {};

    for (var i = 0; i < length; i++) {
        if (!string[i + 1]) {
            break;
        }

        var tg = `${string[i]}${string[i + 1]}`;
        if (hash[tg]) {
            hash[tg] = hash[tg] + 1;
        } else {
            hash[tg] = 1;
        }
    }

    var twogrammaList = Object.keys(hash);
    var biggest = twogrammaList[0];

    for (var j = 1; j < twogrammaList.length; j++) {
        let twogramma = twogrammaList[j];

        if (twogrammaList[twogramma] > twogrammaList[biggest]) {
            biggest = twogrammaList[j];
        }
    }

    return biggest;
}

print(main(length, string));


// http://codeforces.com/contest/977/problem/B

let arg1 = readline();
let arg2 = readline();

print(arg1);
print(arg2);

//let length = parseInt(arg1);
//let string = arg2;

//function main(length, string) {
    //let hash = {};

    //for (let i = 0; i < length - 1; i++) {
        //let substring = `${string[i]}${string[i + 1]}`;
        //if (hash[substring]) {
            //hash[substring] = hash[substring] + 1;
        //} else {
            //hash[substring] = 1;
        //}
    //}

    //let twogrammaList = Object.keys(hash);
    //let biggest = twogrammaList[0];

    //for (let i = 1; i < twogrammaList.length; i++) {
        //let tg = twogrammaList[i];

        //if (hash[tg] > hash[biggest]) {
            //biggest = twogrammaList[i];
        //}
    //}

    //return biggest;
//}

//print(main(length, string));


// http://codeforces.com/contest/977/problem/B

let args = readline().split(' ');

let length = parseInt(args[0], 10);
let string = args[1];

function main(length, string) {
    let hash = {};

    for (let i = 0; i < length; i++) {
        if (!string[i + 1]) {
            break;
        }

        let twogramma = `${string[i]}${string[i + 1]}`;
        if (hash[twogramma]) {
            hash[twogramma] = hash[twogramma] + 1;
        } else {
            hash[twogramma] = 1;
        }
    }

    let twogrammaList = Object.keys(hash);
    let biggest = twogrammaList[0];

    for (let i = 1; i < twogrammaList.length; i++) {
        let twogramma = twogrammaList[i];

        if (twogrammaList[twogramma] > twogrammaList[biggest]) {
            biggest = twogrammaList[i];
        }
    }

    return biggest;
}

print(main(length, string));


let arg1 = readline();
let arg2 = readline();

let length = parseInt(arg1);
let string = arg2;

function main(length, string) {
    let hash = {};

    for (let i = 0; i < length - 1; i++) {
        let substring = `${string[i]}${string[i + 1]}`;
        if (hash[substring]) {
            hash[substring] = hash[substring] + 1;
        } else {
            hash[substring] = 1;
        }
    }

    let twogrammaList = Object.keys(hash);
    let biggest = twogrammaList[0];

    for (let i = 1; i < twogrammaList.length; i++) {
        let tg = twogrammaList[i];

        if (hash[tg] > hash[biggest]) {
            biggest = twogrammaList[i];
        }
    }

    return biggest;
}

print(main(length, string));


// http://codeforces.com/contest/977/problem/B

let arg1 = read();
let arg2 = read();

let length = parseInt(arg1, 10);
let string = arg2;

function main(length, string) {
    let hash = {};

    for (let i = 0; i < length - 1; i++) {
        let substring = `${string[i]}${string[i + 1]}`;
        if (hash[substring]) {
            hash[substring] = hash[substring] + 1;
        } else {
            hash[substring] = 1;
        }
    }

    let twogrammaList = Object.keys(hash);
    let biggest = twogrammaList[0];

    for (let i = 1; i < twogrammaList.length; i++) {
        let tg = twogrammaList[i];

        if (hash[tg] > hash[biggest]) {
            biggest = twogrammaList[i];
        }
    }

    return biggest;
}

print(main(length, string));


function foo(m, s) {
  if (m*9 < s || s === 0) {
    return { min: '-1', max: '-1' }
  }

  var maxArr = [];

  var i=0;
  while (i != m) {
    if (s/9 >= 1) {
      maxArr[i] = 9;
      s -= 9;
    } else {
      maxArr[i] = s;
      s -= s;
    }

    i++;
  }

  var max = '';
  for (var j=0; j<maxArr.length; j++) {
    max += maxArr[j];
  }

  var minArray = maxArr.reverse();

  if (s === maxArr[0]) {
    minArray[m-1]--;
    minArray[0] = 1;
  }

  var min = '';
  for (var k=0; k<minArray.length; k++) {
    min += minArray[k];
  }

  return { min: min, max: max };
}

var args = readline().split(" ").map(function(x) { return parseInt(x); });

var res = foo(args[0], args[1]);

write(res.min + ' ' res.max);


const fn = (M, S) => {
    if (S === 0) return M === 1 ? '0 0' : '-1 -1'
    if (S > 9 * M) return '-1 -1'
    const s = (S - 1) % 9 + 1;
    let r = Array((S - s) / 9 + 1).join('9');
    if (M - 1 === r.length) return `${s}${r} ${r}${s}`;
    const zzz = Array(M - 1 - r.length).join('0');
    return `1${zzz}${s-1}${r} ${r}${s}${zzz}0`;
}
const x = readline().split(' ');
print(fn(parseInt(x[0]), parseInt(x[1])));


const q = [];
const r = [];
const input = readline().split(' ').map(Number);
let x = { m: input[0], s: input[1], h: '' };
for(let i = 1; i < Math.min(10, x.s + 1); i++) q.push({ m: x.m - 1, s: x.s - i, h: `${i}` });
while(q.length) {
    x = q.pop();
    if (x.m === 0) {
        if (x.s === 0) r.push(x.h);
    } else {
        for(let i = 0; i < Math.min(10, x.s + 1); i++)
            q.push({ m: x.m - 1, s: x.s - i, h: `${x.h}${i}` });
    }
}
if (!r.length) print('-1 -1');
else print(Math.min(...r) + ' ' + Math.max(...r))


function foo(m, s) {
  if (m*9 < s || s === 0) {
    return { min: '-1', max: '-1' }
  }

  const maxArr = [];

  let i=0;
  while (i != m) {
    if (s/9 >= 1) {
      maxArr[i] = 9;
      s -= 9;
    } else {
      maxArr[i] = s;
      s -= s;
    }

    i++;
  }

  let max = '';
  for (let j=0; j<maxArr.length; j++) {
    max += maxArr[j];
  }

  const minArray = maxArr.reverse();

  if (s === maxArr[0]) {
    minArray[m-1]--;
    minArray[0] = 1;
  }

  let min = '';
  for (let k=0; k<minArray.length; k++) {
    min += minArray[k];
  }

  return { min, max };
}

const args = readline().split(" ").map(function(x) { return parseInt(x); });

const res = foo(args[0], args[1]);

print(res.min + ' ' res.max);


const q = [];
const r = [];
const input = readline().split(' ').map(Number);
let x = { m: input[0], s: input[1], h: '' };
for(let i = 1; i < Math.min(10, x.s + 1); i++) q.push({ m: x.m - 1, s: x.s - i, h: `${i}` });
while(q.length) {
    x = q.pop();
    if (x.m === 0) {
        if (x.s === 0) r.push(x.h);
        continue;
    }
	for(let i = 0; i < Math.min(10, x.s + 1); i++)
        q.push({ m: x.m - 1, s: x.s - i, h: `${x.h}${i}` });
}
if (!r.length) print('-1 -1');
else print(Math.min(...r) + ' ' + Math.max(...r))


function foo(m, s) {
  if (m*9 < s || s === 0) {
    return { min: '-1', max: '-1' }
  }

  var maxArr = [];

  var i=0;
  while (i != m) {
    if (s/9 >= 1) {
      maxArr[i] = 9;
      s -= 9;
    } else {
      maxArr[i] = s;
      s -= s;
    }

    i++;
  }

  var max = '';
  for (var j=0; j<maxArr.length; j++) {
    max += maxArr[j];
  }

  var minArray = maxArr.reverse();

  if (s === maxArr[0]) {
    minArray[m-1]--;
    minArray[0] = 1;
  }

  var min = '';
  for (var k=0; k<minArray.length; k++) {
    min += minArray[k];
  }

  return { min: min, max: max };
}

const args = readline().split(" ").map(function(x) { return parseInt(x); });

const res = foo(args[0], args[1]);

write(res.min + ' ' res.max);


<script>
    var n = prompt();
    var s = prompt();
    var str = new Set();
    for (var i = 0;i!=s.length;i++)
        str.add(s[i]);
    if (str.size >= 26)
        document.write("YES");
    else
        document.write("NO");

</script>


n = Number(readline());
s = readline().toLowerCase();
str = ""
for (var i = 0; i < n; i++) {
    if (str.indexOf(s.charAt(i)) == -1) {
        str += s[i]
    }
}
print(str.length >= 26 ? "YES" : "NO")n = Number(readline());
s = readline().toLowerCase();
str = ""
for (var i = 0; i < n; i++) {
    if (str.indexOf(s.charAt(i)) == -1) {
        str += s[i]
    }
}
print(str.length >= 26 ? "YES" : "NO")


function main
{
  var n;
  n = parseInt(readline());

  var a=[];
  a = parseInt(readline().split(' '));

  var x1 = 0, x2 = n, ed=0;

  var i;

  for(i=0; i<n; i++)
  {
    if(a[i]==0])ed++;
  }

  if(ed == 0 || ed = n-1)
  {
    print(n-1);
    return;
  }
  if(ed == 1 || ed == n)
  {
    print(n);
    return;
  }

  print(1);
}

main();


var n;
n = parseInt(readline());

var a=[];
a = parseInt(readline().split(' '));

var x1 = 0, x2 = n, ed=0;

var i;

for(i=0; i<n; i++)
{
  if(a[i]==0])ed++;
}

if(ed == 0 || ed = n-1)
{
  print(n-1);
  return;
}
if(ed == 1 || ed == n)
{
  print(n);
  return;
}

/*

var d= n/2 + n%2;

for(i=0; i<d; i++)
{

}
*/

  print(1);


function main()
{
  var n;
  n = parseInt(readline());

  var a=[];
  a = parseInt(readline().split(' '));

  var x1 = 0, x2 = n, ed=0;

  var i;

  for(i=0; i<n; i++)
  {
    if(a[i]==0])ed++;
  }

  if(ed == 0 || ed = n-1)
  {
    print(n-1);
    return;
  }
  if(ed == 1 || ed == n)
  {
    print(n);
    return;
  }

  print(1);
}

main();


readline()
A=readline().split(' ').map(Number)
T=new Array(A.length)
for (i=0;i<A.length;++i) T[i]=(new Array(A.length)).fill(0)

var q = (x,y) =>

for (i=0;i<A.length;++i) {
    for (j=i;j<A.length;++j) {

    }
}

const f(x,y) => {
    f(x,y-1)
    f(x+1,y)
}

print(T)
// f(0, A.length-1)


body input{border:1px solid transparent;display:block;margin:5px}body .logo-wrapper{display:inline-block;width:0;height:48px;background-color:black;border-radius:0 0 15px 0;overflow:hidden}body .logo{font-family:sans-serif;font-weight:bold;background:-webkit-linear-gradient(#000 35%, blue 42%, #fff 46%, #000 55%, #9922D2 65%, #fff 80%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;-webkit-text-stroke:0.5px white;text-shadow:5px 5px 40px #0000FF;display:none;margin-left:10px}body .button{color:white}
/*# sourceMappingURL=style.css.map */


// Getting Problem Data from Codeforces.
let inputString = readline();
// Setting up and populating HashMap.
let nineteenHashMap = {'n':0,'i':0,'e':0,'t':0};
for (let index = 0;index<inputString.length;++index)
   nineteenHashMap[inputString[index]]+=1;
// For Counting Number of Nineteens.
let nineteenCount = 0;
// Algorithm.
m = nineteenHashMap;
while (m['n']>=3 && m['i']>=1 && m['e']>=3 && m['t']>=1){
  //Increasing count and removing from HashMap.
  m['n']-=2;m['i']-=1;m['e']-=3;m['t']-=1;
  nineteenCount+=1
}
print(nineteenCount);


function getCm(text) {
	const target = "nineteen".split("");
	const map = {};
    for(var i = 0; i < text.length; i++)
		map[text[i]] = (map[text[i]]||0)+1;

	let c = 0;
	_break:
	while(1) {
		for(let i = 0; i < target.length; i++) {
			if ( !map[target[i]]-- ) {
				break _break;
			}
		}
		c++;
	}
	return c;

	return Math.min(map["n"]/2|0, map["e"]/3|0, map["t"], map["i"]);

	//const arr = target.map(c => map[c]);
	//return Math.min.apply(null, arr);
}


var letters = readline().split("");
    var n = 3;
    var i = 1;
    var e = 3;
    var t = 1;
    var countedN = 0;
    var countedI = 0;
    var countedE = 0;
    var countedT = 0;

    for (var j = 0; j < letters.length; j++) {
      switch(letters[j]) {
        case 'n':
          countedN++;
          break;
        case 'i':
          countedI++;
          break;
        case 'e':
          countedE++;
          break;
        case 't':
          countedT++;
          break;
        default:
          break;
      }
    }
    if (countedN >= n) {
      countedN++;
    }
    // console.log(countedN);
    // console.log(countedI);
    // console.log(countedE);
    // console.log(countedT);
    let num = (Math.min(Math.floor(countedN / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));
    num = (Math.min(Math.floor((countedN + num) / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));
    print(num);


let t = +readline();
for(let i=0;i<t;i++){
    let sum = +readline();
    let x=9;
    if(sum<=9){
        print(sum);
    }
    else{
        let ans='';
        while(sum>0){
            sum=sum-x;
            ans=x+ans;
            x=x-1;
        }
        ans=sum+ans;
        print(ans);
    }
}


var line = readline().split(" ");
var min = Math.min(...line);
var max = Math.max(...line);

var ret = 0;

// if (min >= 2 || max >= 2) {
  // ret = (min - min % 2) * max / 2 + Math.floor((min % 2) * max / 2);
// }
ret = Math.floor(min * max / 2);

print(ret);


let lines = readline().split(" ");
let output = Math.floor(lines[0] / 2) * Math.floor(lines[1] / 2) * 2;
output += (lines[0] % 2 == 1) ? (lines[1] % 2 == 1) ? 2 : 1 : 0;
print(output);


var [m, n] = readline().split(' ')

print(parseInt(m * n / 2))


var args = readline().split(" ");
print(((args[0] * args[1]) - (args[0] * args[1] mod 2))/2);


var input = readline()split(' ');
var height = input[0];
var width = input[1];
var result = 0;

while(height>1){
    result+= width;
    height-=2;
}

if(height === 1){
    result+= width/2;
}

print(result);


# A. Укладка доминошками
###### [ссылка на задачу](https://codeforces.com/problemset/problem/50/A)

### Концепт решения:

### Приложение:
```
'use strict';
const inputData = readline().split(' ');
var width = parseInt(inputData[0]);
var height = parseInt(inputData[1]);

write(Math.floor(width*height/2));

```


var inputs = readline().split(" ");

print(Math.floor(inputs[0] * inputs[1]) / 2))


var needToBuy = 4·
var horsesShoeOwned = {}

  var horsesShoe = readline().split(' ').map(Number)

  for (var i = 0; i < horsesShoe.length; i++) {
    if (!horsesShoeOwned.hasOwnProperty(horsesShoe[i])) {
      horsesShoeOwned[horsesShoe[i]] = 0
      needToBuy -= 1
    }
  }

  print(needToBuy)


var n = parseInt(readline());
var m = parseInt(readline());
var arr = [];
for(let i = 0; i<n; i++) { arr.push(parseInt(readline())); }
arr.sort();
var maxppl = arr[n-1];
var maxk = maxppl+m;
for(let i = 0; i<n; i++) {
    if(m===0) break;
    let remain = maxppl-arr[i];
    m -= Math.min(m, remain);
}
var mink = maxppl;
mink += parseInt(m/n);
if(m%n>0) {
    mink += 1;
}
print(`${mink} ${maxk}`);


var n = parseInt(readline());
var m = parseInt(readline());
var arr = [];
for(let i = 0; i<n; i++) { arr.push(parseInt(readline())); }
arr.sort();
var maxppl = arr[n-1];
var maxk = maxppl+m;
for(let i = 0; i<n; i++) {
    if(m===0) break;
    let remain = maxppl-arr[i];
    m -= Math.min(m, remain);
}
var mink = maxppl;
mink += parseInt(m/n);
if(m%n>0) {
    mink += 1;
}
print(mink+" "+maxk);


var par = readline().split(" ").map( (x) => parseInt(x));
var n = parseInt(readline());
var m = parseInt(readline());
var arr = [];
for(var i = 0; i<n; i++) { arr.push(parseInt(readline())); }
arr.sort();
var maxppl = arr[n-1];
var maxk = maxppl+m;
for(i = 0; i<n; i++) {
    if(m===0) break;
    let remain = maxppl-a[i];
    m -= Math.min(m, remain);
}
var mink = maxppl;
mink += parseInt(m/n);
if(m%n>0) {
    mink += 1;
}
print(mink+" "+maxk);