import java.util.*;
import java.io.*;
public class Main{
public static void main(String args[])
{
    Scanner sc = new Scanner(System.in);
    int n,d,sum=0;
    n = sc.nextInt();
    d = sc.nextInt();
    int arr[] = new int[n];
    for(int i=0;i<n;i++)
    {
        sum += sc.nextInt();
    }
     int chu=sum+(n-1)*d;
     if(d<chu)
     {
         System.out.println("-1");
     }
     else
     {
         chu = d - sum;
         d = chu/5;
         System.out.println("d");
     }
}


import java.math.BigInteger;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner r = new Scanner(System.in);

        int n = r.nextInt();
        long[] a = new long[n];
        for(int i = 0; i < n; i++)
            a[i] = r.nextInt();

        Arrays.sort(a);

        for(int i = 0; i < n-1; i++)
            if(a[i] == a[i+1])continue;
            if(overflow(a[i], a[i+1])){System.out.println("YES");System.exit(0);}
        System.out.println("NO");

    }

    private static boolean overflow(long a, long b) {
        if(a == 1)return false;
        else{
            if(2*a > b)return true;
            else return false;
        }
    }
}


import java.util.*;
import java.math.*;
import java.lang.*;
import java.io.*;
public class Main{
  static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s1 = sc.readLine();
    String s2 = sc.readLine();
    String s = "";
    for(int i = 0 ; i< s1.length() ; i++){
      if(s1.charAt(i) == s2.charAt(i)){
        s += 0;
      }
      else{
        s += 1;
      }
    }
    System.out.println(s);
  }
}


public class aedhf
{
	static long x,s;

public static void step1(){
	if(s==0||x==0){

		stop();
	}else{
	step2();
	}
}
	public static void main(String[] args)
	{
		Scanner a1 = new Scanner(System.in);
		 s=a1.nextLong();
		 x=a1.nextLong();
		step1();
	}
	public static void step2(){
		if (s>=2*x){
			s=s%(2*x);

			step1();
		}else{
		step3();
		}}
		public static void step3(){
			if(x>=2*s){
				x=x%(2*s);
				step1();
			}else{
				stop();
			}
		}
	public static void stop(){
	System.out.println((long)s+" "+(long)x);
	}
}


public class qwe {
    private static int count(int n, String s) {
        int result;
        String maxString = "";

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            sb.append(s.charAt(i));
            if (s.startsWith(sb.toString() + sb.toString()) && sb.toString().length() > maxString.length()) {
                maxString = sb.toString();
            }
        }

        if (maxString.isEmpty() || maxString.length() == 1) {
            result = s.length();
        } else {
            result = s.length() - maxString.length() + 1;
        }

        return result;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String s = in.next();

        int result = count(n, s);
        System.out.println(result);
        in.close();
    }
}


import java.io.*;
public class Main
{
	public static void main(String[] args)
	{
		new Main().start(args[0]);
	}
	public void start() throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String inp=br.readLine();
		String ans="";
		String low=inp.toLowerCase();
		for(int i=0;i<inp.length();i++)
		{
			char x=low.charAt(i);
			if(x=='a' || x=='o' || x=='y' || x=='e' || x=='u' || x=='i')
			continue;
			else
			{
				ans+=((""+"."+x).toLowerCase());
			}
		}
		System.out.println(ans);
	}
}


import java.util.Scanner;
import java.util.Arrays;

public class SampleA497
{

	public static void main(String[] args)
	{	Scanner s = new Scanner(System.in);
             //   int n = s.nextInt();
             //   int m = s.nextInt();

                int i=0,sum=0,j=0,temp=0,h=0,r=0,t=0;
                String s1 = s.next();
              //  System.out.println(s1.length());
                int len = s1.length();
                if(len==1){
                   if(s1.charAt(0)=='a' ||s1.charAt(0)=='e' ||s1.charAt(0)=='i' ||s1.charAt(0)=='o' ||s1.charAt(0)=='u' ){
                     h=0
                   }{
                     h=1;
                   }
                }
                else{
                 for(i=0;i<len-1;i++){
                 char l = s1.charAt(i);
                 char y = s1.charAt(i+1);
                 t=0;
                   if(l !='a' && l !='e' && l !='i' && l !='o' && l !='u' ){
                     t=1;
                     h++;
                   //  System.out.println(l);
                   }
                   if(t==1){
                     if(y =='a' || y =='e' || y =='i' || y =='o' || y =='u' || l =='n'){
                         r++;
                     }else{

                     }
                   }
              //  System.out.println(l);
                }
               }
              //  System.out.println(h);
              //  System.out.println(r);
                if(h==r ){
                   System.out.println("YES");
                }else{
                   System.out.println("NO");
                }

	}
}


//package com.company;
import java.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class Main
{
    public static void main(String[] args)throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String str=br.readLine();    //reads String like 10<enter>
        long t=Long.parseLong(str);
        System.out.println(t==1?"-1":t-t%2+" 2");
    }

}


import java.util.*;
public class shubh{
    public static void main(String args[])
    {
     Scanner s=new Scanner(System.in);

            int arr[]=new int[26];
            String str=s.next();
            for(int i=0;i<str.length();i++)
            {
                char ch=str.charAt(i);
                arr[ch-'a']++;
            }

            for(int i=0;i<26;i++)
            {
                if(arr[i]!=0)c++;
            }
            if(c%2!=0)
            System.out.println("IGNORE HIM!);
            else
            System.out.println("CHAT WITH HER!");

    }

}


import java.util.*;

public class P544_a {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner scan = new Scanner(System.in);
        int k=scan.nextInt();
        String s=scan.nextLine();
        s=scan.nextLine();
        int l=s.length();
        char x[]=s.toCharArray();
        if(l<k){
            System.out.println("NO");
        }
        else{
            int hash[] = new int[26];
            Arrays.fill(hash,0);
            String temp="";
            int count=0;
            List<String> strings = new Vector<String>();
            for(char i : x){
                if(hash[(int)i-97]==0){
                    if(count==k){
                        temp+=i;
                        continue;
                    }
                    if(temp.length()>0){z
                        strings.add(temp);
                    }
                    temp="";
                    temp+=i;
                    hash[(int)i-97]++;
                    count++;

                }
                else{
                    temp+=i;
                }
            }
            if(temp.length()>0){
                strings.add(temp);
            }
            if(count<k){
                System.out.println("NO");
            }
            else{
                System.out.println("YES");
                for(String y : strings){
                    System.out.print(y+" ");
                }
                System.out.println();
            }
        }
        scan.close();

    }

}


import java.util.*;
import java.io.*;
public class file{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[] arr = new int[n];
        for(int i=0; i<n; i++){
            arr[i] = scan.nextInt();
        }
        Arrays.sort(arr);
        int result =  1;
        int count = 1;
        int x = arr[0];
        for(int j=1; j<n; j++){
            if(x==arr[j]){
                count++;
            }else{
                x=arr[j];
                if(count>result){
                    result=count;
                    count=1;
                }
            }
    }
    System.out.println(result);
}


import java.util.Scanner;

public class Game{
  public static void main(String[] args){
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    int[] a = new int[n];
    for(int i=0;i<n;i++)
     a[i]=in.nextInt();
    int max = 0;
    for(int i=0;i<n;i++){
     for(int j=0;j<n;<j++){
       int[] b = new int[n];
       for(int k=0;k<n;k++)
        b[k]=a[k];
       for(int s=i;s<=j;s++)
        b[s] = 1-b[s];
       int count =0;
       for(int m =0;m<n;m++){
        if(b[m]==1) cont++;
       }
       if (count>max)
        max=count;
     }
    }
    System.out.print(max);
  }
 }


import java.util.*;

public class Main
{
   public static void main(String[] args)
   {
      Scanner sc = new Scanner(System.in);

      int n = sc.nextInt();
      int[] blocks = new int[n];
      for (int i = 0; i < n; i++)
      {
          blocks[i] = sc.nextInt();
      }
      Arrays.sort(blocks);
      String result = "";
      for (int i = 0; i < n; i++)
      {
          x += blocks[i] + " ";
      }
      System.out.println(result);
   }
}


import java.io.*;
import java.util.*;
public class edu12_1
{
   public static void main(String args[])throws IOException
   {
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	   Scanner sc = new Scanner(System.in);
	   int a = sc.nextInt();
	   int ta = sc.nextInt();

	   int b = sc.nextInt();
	   int tb = sc.nextInt();

	   String s  =  br.readLine();

	   int hr = Integer.parseInt(s.substring(0,2));
	   int mins = Integer.parseInt(s.substring(3));

	   //System.out.println(mins);
	   int min_calcu  = hr*60 + mins;
	   //int time  = min_calcu;
	   int count = 0;

		int elapse_time = min_calcu + ta;

	   for(int i = 5*60 ; i < 12*60 ; i=i+b)
	   {
		  int time = i + tb;

            if (time > min_calcu && elapse_time > i)
				count++;
	   }
	   System.out.println(count);

   }

}


import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;

import java.util.StringTokenizer;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.MathContext;
import java.util.ArrayList;
import java.util.Collections;
import java.util.TreeSet;
import java.util.*;

public class  Main {

    public static void main(String[]args)
    {
       FastReader in=new FastReader();

       int n=in.nextInt();

       int a=in.nextInt();

       int b=in.nextInt();

       boolean[]x=new boolean[n];

       boolean[]y=new boolean[n];

       int i=0;

       StringBuilder sb=new StringBuilder();
       while(i<a)
       {
           x[in.nextInt()-1]=true;
           i++;
           sb.append(1+" ");
       }

       i=0;

       while(i<b)
       {
           int c=in.nextInt()-1;

           if(!x[c]){
               y[c]=true;
               sb.append(2+" ");
           }
           i++;
       }

        System.out.println(sb.toString().trim());

    }
}

class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
}


import java.util.*;
public class Main{
	public static void main (String[] args)
	{
	    Scanner in = new Scanner(System.in);
	    int n = in.nextInt();
	    String s = in.next();
	    int count = 0 , max = 0;
	    String res ="";
	    for(int i = 0 ; i < n-1 ; i++){
	       // String ch = s.substring(i,i+2);
	        System.out.println(ch);
	        for(int j = i+1; j < n -1 ; j++){
	            if(ch.equals(s.substring(j,j+2)))count++;
	        }
	        if(count > max){
	            max = count;
	            res = ch;
	            count = 0;
	        }
	    }
	    if(res.equals(""))res=s.substring(0,2);
	    System.out.println(res);
	}
}


import java.util.*;
import java.io.*;
public class Codeforces{
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static StringTokenizer st;
    static String next(){
        while(st==null || !st.hasMoreElements()){
            try{
                st = new StringTokenizer(br.readLine().trim());

            }
            catch(Exception e){
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }
    static int nextInt(){
        return Integer.parseInt(next());
    }
    public static void main(String[] argh){
            int n, m, temp1=0, temp2, count = Integer.MAX_VLAUE;
             n = nextInt();
             m = nextInt();
             temp2 = n-1;
            int[] arr = new int[m];
            for(int i = 0; i < m; i++)arr[i] = nextInt();

            Arrays.sort(arr);

            for(int i = 0; temp2 < m; i++)
            {
                if(arr[temp2] - arr[temp1] < count)
                   count = arr[temp2] - arr[temp1];

                   temp1++;
                   temp2++;
            }

            System.out.println(count);

    }
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Scanner;

public class CF_PetrolSum {

	public static void main(String args[])
	{
		Scanner s=new Scanner(System.in);
		int num=s.nextInt();
		int[] rotations;
		rotations=new int[num];

		for(int i=0;i<num;i++)
			rotations[i]=s.nextInt();

		System.out.println(GenerateSubsets(rotations,0,0)? "YES": "NO");
	}

	private static boolean GenerateSubsets(int[] a, int index, int sum)
	{

		if(index==a.length)
		{
			if(abs(sum)%360==0)
				return true;
			return false;
		}

		return GenerateSubsets(a,index+1,sum+a[index])||
		GenerateSubsets(a,index+1,sum-a[index]);
	}
}


import java.util.*;
public class Button{
    public static void main(String args[])
    {
        Scanner n=new Scanner(System.in);
        int b=n.nextInt();
        int sum=0;

        if(1<=b && b<=2000)
        {
           if(b%2==0)
           {
               while(b>0)
               {
                   sum+=(b+1);
                   b--;
               }
                System.outprintln(sum);
           }

           else{

               while(b>0)
               {
                   sum+=(b);
                   b--;
               }
               System.out.println(sum+1);

           }

        }
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int k = in.nextInt();
            int max = answer(k - (k % 2), out);
            if (k % 2 == 1) out.print(" " + max);
        }

        int answer(int k, PrintWriter out) {
            int max = (k - 1) << 1;
            out.println((max * 3) + " " + 2);
            out.print(3 + " " + 2);
            return max * 3;
        }

    }

    static class InputReader {
        private int lenbuf = 0;
        private int ptrbuf = 0;
        private InputStream in;
        private byte[] inbuf = new byte[1024];

        public InputReader(InputStream in) {
            this.in = in;
        }

        private int readByte() {
            if (lenbuf == -1) throw new InputMismatchException();
            if (ptrbuf >= lenbuf) {
                ptrbuf = 0;
                try {
                    lenbuf = in.read(inbuf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (lenbuf <= 0) return -1;
            }
            return inbuf[ptrbuf++];
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

    }
}


pa
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class A {

    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader buf = new BufferedReader(
                new InputStreamReader(System.in));
        int n = Integer.parseInt(buf.readLine());
        n *= 2;
        int x = 1;
        boolean yes = false;
        while (x < n && !yes) {
            int y = x * (x + 1);
            int z = n - y;
            if (z < 0)
                break;
            int w = (int) Math.sqrt(z);
            if (w * (w + 1) == z)
                yes = true;
            x++;
        }
        if (yes)
            System.out.println("YES");
        else
            System.out.println("NO");
    }
}


import java.util.Scanner;
public class D {
public static void main(String[] args){
	Scanner scan = new Scanner(System.in);
	int n = scan.nextInt();
	int m =n ;
	int count=0;
	for(int i =4;i<=n;i++){
		if (islucky(i)){count++;}
	}
	System.out.print(count);
	break;
}
public static boolean islucky(int num){
	int a;
	while (num!=0){
		a=num%10;
		if(a!=7&&a!=4){return false ;}
		num/=10;
	}
	return true;

}
}


/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc=new Scanner(System.in);
		int n,a,b,i,cola,bars,x=0,check=0;
		n=sc.nextInt();
		a=sc.nextInt();
		b=sc.nextInt();
		check=0;
		x=0;
		for(i=0;a*i<=n;i++)
		{
			cola=a*i;
			if((n-cola)%b==0)
			{
			      check=1;
			      x=i;
			      bars=(n-cola)/b;
			}
		}
		if(check==0)
		System.out.println("NO");
		else
		{
		System.out.println("YES");
		System.out.println(x+" "+bars);
	}}


import java.awt.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
import java.util.List;

import static java.lang.Math.max;
import static java.lang.Math.min;

public class A implements Runnable{

    // SOLUTION!!!
    // HACK ME PLEASE IF YOU CAN!!!
    // PLEASE!!!
    // PLEASE!!!
    // PLEASE!!!

    private final static Random rnd = new Random();
    private final static String fileName = "";

    private void solve() {
        int n = readInt();
        if (n != 3 && n < 15) throw new RuntimeException();
        else out.println(n * 9);

    }

    /////////////////////////////////////////////////////////////////////

    private final static boolean FIRST_INPUT_STRING = false;
    private final static boolean MULTIPLE_TESTS = true;
    private final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    private final static int MAX_STACK_SIZE = 128;

    private final static boolean OPTIMIZE_READ_NUMBERS = false;

    /////////////////////////////////////////////////////////////////////

    public void run(){
        try{
            timeInit();
            Locale.setDefault(Locale.US);

            init();

            if (ONLINE_JUDGE) {
                solve();
            } else {
                do {
                    try {
                        timeInit();
                        solve();
                        time();

                        out.println();
                    } catch (NumberFormatException e) {
                        break;
                    } catch (NullPointerException e) {
                        if (FIRST_INPUT_STRING) break;
                        else throw e;
                    }
                } while (MULTIPLE_TESTS);
            }

            out.close();
            time();
        }catch (Exception e){
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    /////////////////////////////////////////////////////////////////////

    private BufferedReader in;
    private OutputWriter out;
    private StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args){
        new Thread(null, new A(), "", MAX_STACK_SIZE * (1L << 20)).start();
    }

    /////////////////////////////////////////////////////////////////////

    private void init() throws FileNotFoundException{
        Locale.setDefault(Locale.US);

        if (ONLINE_JUDGE){
            if (fileName.isEmpty()) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new OutputWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader(fileName + ".in"));
                out = new OutputWriter(fileName + ".out");
            }
        }else{
            in = new BufferedReader(new FileReader("input.txt"));
            out = new OutputWriter("output.txt");
        }
    }

    ////////////////////////////////////////////////////////////////

    private long timeBegin;

    private void timeInit() {
        this.timeBegin = System.currentTimeMillis();
    }

    private void time(){
        long timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    private void debug(Object... objects){
        if (ONLINE_JUDGE){
            for (Object o: objects){
                System.err.println(o.toString());
            }
        }
    }

    /////////////////////////////////////////////////////////////////////

    private String delim = " ";

    private String readLine() {
        try {
            return in.readLine();
        } catch (IOException e) {
            throw new RuntimeIOException(e);
        }
    }

    private String readString() {
        try {
            while(!tok.hasMoreTokens()){
                tok = new StringTokenizer(readLine());
            }

            return tok.nextToken(delim);
        } catch (NullPointerException e) {
            return null;
        }
    }

    /////////////////////////////////////////////////////////////////

    private final char NOT_A_SYMBOL = '\0';

    private char readChar() {
        try {
            int intValue = in.read();

            if (intValue == -1){
                return NOT_A_SYMBOL;
            }

            return (char) intValue;
        } catch (IOException e) {
            throw new RuntimeIOException(e);
        }
    }

    private char[] readCharArray() {
        return readLine().toCharArray();
    }

    private char[][] readCharField(int rowsCount) {
        char[][] field = new char[rowsCount][];
        for (int row = 0; row < rowsCount; ++row) {
            field[row] = readCharArray();
        }

        return field;
    }

    /////////////////////////////////////////////////////////////////

    private long optimizedReadLong() {
        int sign = 1;
        long result = 0;
        boolean started = false;
        while (true) {
            try {
                int j = in.read();
                if (-1 == j) {
                    if (started) return sign * result;
                    throw new NumberFormatException();
                }

                if (j == '-') {
                    if (started) throw new NumberFormatException();
                    sign = -sign;
                }

                if ('0' <= j && j <= '9') {
                    result = result * 10 + j - '0';
                    started = true;
                } else if (started) {
                    return sign * result;
                }
            } catch (IOException e) {
                throw new RuntimeIOException(e);
            }
        }
    }

    private int readInt() {

        if (!OPTIMIZE_READ_NUMBERS) {
            return Integer.parseInt(readString());
        } else {
            return (int) optimizedReadLong();
        }
    }

    private int[] readIntArray(int size) {
        int[] array = new int[size];

        for (int index = 0; index < size; ++index){
            array[index] = readInt();
        }

        return array;
    }

    private int[] readSortedIntArray(int size) {
        Integer[] array = new Integer[size];

        for (int index = 0; index < size; ++index) {
            array[index] = readInt();
        }
        Arrays.sort(array);

        int[] sortedArray = new int[size];
        for (int index = 0; index < size; ++index) {
            sortedArray[index] = array[index];
        }

        return sortedArray;
    }

    private int[] readIntArrayWithDecrease(int size) {
        int[] array = readIntArray(size);

        for (int i = 0; i < size; ++i) {
            array[i]--;
        }

        return array;
    }

    ///////////////////////////////////////////////////////////////////

    private int[][] readIntMatrix(int rowsCount, int columnsCount) {
        int[][] matrix = new int[rowsCount][];

        for (int rowIndex = 0; rowIndex < rowsCount; ++rowIndex) {
            matrix[rowIndex] = readIntArray(columnsCount);
        }

        return matrix;
    }

    private int[][] readIntMatrixWithDecrease(int rowsCount, int columnsCount) {
        int[][] matrix = new int[rowsCount][];

        for (int rowIndex = 0; rowIndex < rowsCount; ++rowIndex) {
            matrix[rowIndex] = readIntArrayWithDecrease(columnsCount);
        }

        return matrix;
    }

    ///////////////////////////////////////////////////////////////////

    private long readLong() {
        if (!OPTIMIZE_READ_NUMBERS) {
            return Long.parseLong(readString());
        } else {
            return optimizedReadLong();
        }
    }

    private long[] readLongArray(int size) {
        long[] array = new long[size];

        for (int index = 0; index < size; ++index){
            array[index] = readLong();
        }

        return array;
    }

    ////////////////////////////////////////////////////////////////////

    private double readDouble() {
        return Double.parseDouble(readString());
    }

    private double[] readDoubleArray(int size) {
        double[] array = new double[size];

        for (int index = 0; index < size; ++index){
            array[index] = readDouble();
        }

        return array;
    }

    ////////////////////////////////////////////////////////////////////

    private BigInteger readBigInteger() {
        return new BigInteger(readString());
    }

    private BigDecimal readBigDecimal() {
        return new BigDecimal(readString());
    }

    /////////////////////////////////////////////////////////////////////

    private Point readPoint() {
        int x = readInt();
        int y = readInt();
        return new Point(x, y);
    }

    private Point[] readPointArray(int size) {
        Point[] array = new Point[size];

        for (int index = 0; index < size; ++index){
            array[index] = readPoint();
        }

        return array;
    }

    /////////////////////////////////////////////////////////////////////

    @Deprecated
    private List<Integer>[] readGraph(int vertexNumber, int edgeNumber) {
        @SuppressWarnings("unchecked")
        List<Integer>[] graph = new List[vertexNumber];

        for (int index = 0; index < vertexNumber; ++index){
            graph[index] = new ArrayList<>();
        }

        while (edgeNumber-- > 0){
            int from = readInt() - 1;
            int to = readInt() - 1;

            graph[from].add(to);
            graph[to].add(from);
        }

        return graph;
    }

    private static class GraphBuilder {

        final int size;
        final List<Integer>[] edges;

        static GraphBuilder createInstance(int size) {
            List<Integer>[] edges = new List[size];
            for (int v = 0; v < size; ++v) {
                edges[v] = new ArrayList<>();
            }

            return new GraphBuilder(edges);
        }

        private GraphBuilder(List<Integer>[] edges) {
            this.size = edges.length;
            this.edges = edges;
        }

        public void addEdge(int from, int to) {
            addDirectedEdge(from, to);
            addDirectedEdge(to, from);
        }

        public void addDirectedEdge(int from, int to) {
            edges[from].add(to);
        }

        public int[][] build() {
            int[][] graph = new int[size][];
            for (int v = 0; v < size; ++v) {
                List<Integer> vEdges = edges[v];
                graph[v] = castInt(vEdges);
            }

            return graph;
        }
    }

    /////////////////////////////////////////////////////////////////////

    private static class IntIndexPair {

        static Comparator<IntIndexPair> increaseComparator = new Comparator<A.IntIndexPair>() {

            @Override
            public int compare(A.IntIndexPair indexPair1, A.IntIndexPair indexPair2) {
                int value1 = indexPair1.value;
                int value2 = indexPair2.value;

                if (value1 != value2) return value1 - value2;

                int index1 = indexPair1.index;
                int index2 = indexPair2.index;

                return index1 - index2;
            }
        };

        static Comparator<IntIndexPair> decreaseComparator = new Comparator<A.IntIndexPair>() {

            @Override
            public int compare(A.IntIndexPair indexPair1, A.IntIndexPair indexPair2) {
                int value1 = indexPair1.value;
                int value2 = indexPair2.value;

                if (value1 != value2) return -(value1 - value2);

                int index1 = indexPair1.index;
                int index2 = indexPair2.index;

                return index1 - index2;
            }
        };

        static IntIndexPair[] from(int[] array) {
            IntIndexPair[] iip = new IntIndexPair[array.length];
            for (int i = 0; i < array.length; ++i) {
                iip[i] = new IntIndexPair(array[i], i);
            }

            return iip;
        }

        int value, index;

        IntIndexPair(int value, int index) {
            super();
            this.value = value;
            this.index = index;
        }

        int getRealIndex() {
            return index + 1;
        }
    }

    private IntIndexPair[] readIntIndexArray(int size) {
        IntIndexPair[] array = new IntIndexPair[size];

        for (int index = 0; index < size; ++index) {
            array[index] = new IntIndexPair(readInt(), index);
        }

        return array;
    }

    /////////////////////////////////////////////////////////////////////

    private static class OutputWriter extends PrintWriter {

        final int DEFAULT_PRECISION = 12;

        private int precision;
        private String format, formatWithSpace;

        {
            precision = DEFAULT_PRECISION;

            format = createFormat(precision);
            formatWithSpace = format + " ";
        }

        OutputWriter(OutputStream out) {
            super(out);
        }

        OutputWriter(String fileName) throws FileNotFoundException {
            super(fileName);
        }

        int getPrecision() {
            return precision;
        }

        void setPrecision(int precision) {
            precision = max(0, precision);
            this.precision = precision;

            format = createFormat(precision);
            formatWithSpace = format + " ";
        }

        String createFormat(int precision){
            return "%." + precision + "f";
        }

        @Override
        public void print(double d){
            printf(format, d);
        }

        void printWithSpace(double d){
            printf(formatWithSpace, d);
        }

        void printAll(double...d){
            for (int i = 0; i < d.length - 1; ++i){
                printWithSpace(d[i]);
            }

            print(d[d.length - 1]);
        }

        @Override
        public void println(double d){
            printlnAll(d);
        }

        void printlnAll(double... d){
            printAll(d);
            println();
        }
    }

    /////////////////////////////////////////////////////////////////////

    private static class RuntimeIOException extends RuntimeException {

        /**
         *
         */
        private static final long serialVersionUID = -6463830523020118289L;

        RuntimeIOException(Throwable cause) {
            super(cause);
        }
    }

    /////////////////////////////////////////////////////////////////////
    //////////////// Some useful constants and functions ////////////////
    /////////////////////////////////////////////////////////////////////

    private static final int[][] steps = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
    private static final int[][] steps8 = {
            {-1, 0}, {1, 0}, {0, -1}, {0, 1},
            {-1, -1}, {1, 1}, {1, -1}, {-1, 1}
    };

    private static boolean checkCell(int row, int rowsCount, int column, int columnsCount) {
        return checkIndex(row, rowsCount) && checkIndex(column, columnsCount);
    }

    private static boolean checkIndex(int index, int lim){
        return (0 <= index && index < lim);
    }

    /////////////////////////////////////////////////////////////////////

    private static boolean checkBit(int mask, int bit){
        return (mask & (1 << bit)) != 0;
    }
    private static boolean checkBit(long mask, int bit){
        return (mask & (1L << bit)) != 0;
    }

    /////////////////////////////////////////////////////////////////////

    private static long getSum(int[] array) {
        long sum = 0;
        for (int value: array) {
            sum += value;
        }

        return sum;
    }

    private static Point getMinMax(int[] array) {
        int min = array[0];
        int max = array[0];

        for (int index = 0, size = array.length; index < size; ++index, ++index) {
            int value = array[index];

            if (index == size - 1) {
                min = min(min, value);
                max = max(max, value);
            } else {
                int otherValue = array[index + 1];

                if (value <= otherValue) {
                    min = min(min, value);
                    max = max(max, otherValue);
                } else {
                    min = min(min, otherValue);
                    max = max(max, value);
                }
            }
        }

        return new Point(min, max);
    }

    /////////////////////////////////////////////////////////////////////

    private static int[] getPrimes(int n) {
        boolean[] used = new boolean[n];
        used[0] = used[1] = true;

        int size = 0;
        for (int i = 2; i < n; ++i) {
            if (!used[i]) {
                ++size;
                for (int j = 2 * i; j < n; j += i) {
                    used[j] = true;
                }
            }
        }

        int[] primes = new int[size];
        for (int i = 0, cur = 0; i < n; ++i) {
            if (!used[i]) {
                primes[cur++] = i;
            }
        }

        return primes;
    }

    /////////////////////////////////////////////////////////////////////

    private static long lcm(long a, long b) {
        return a / gcd(a, b) * b;
    }

    private static long gcd(long a, long b) {
        return (a == 0 ? b : gcd(b % a, a));
    }

    /////////////////////////////////////////////////////////////////////

    private static class MultiSet<ValueType> {

        public static <ValueType> MultiSet<ValueType> createMultiSet() {
            Map<ValueType, Integer> multiset = new HashMap<>();
            return new MultiSet<>(multiset);
        }

        private final Map<ValueType, Integer> multiset;
        private int size;

        public MultiSet(Map<ValueType, Integer> multiset) {
            this.multiset = multiset;
            this.size = 0;
        }

        public int size() {
            return size;
        }

        public void inc(ValueType value) {
            int count = get(value);
            multiset.put(value, count + 1);

            ++size;
        }

        public void dec(ValueType value) {
            int count = get(value);
            if (count == 0) return;

            if (count == 1) multiset.remove(value);
            else multiset.put(value, count - 1);

            --size;
        }

        public int get(ValueType value) {
            Integer count = multiset.get(value);
            return (count == null ? 0 : count);
        }
    }

    /////////////////////////////////////////////////////////////////////

    private static class IdMap<KeyType> extends HashMap<KeyType, Integer> {

        /**
         *
         */
        private static final long serialVersionUID = -3793737771950984481L;

        public IdMap() {
            super();
        }

        int getId(KeyType key) {
            Integer id = super.get(key);
            if (id == null) {
                super.put(key, id = size());
            }

            return id;
        }
    }

    /////////////////////////////////////////////////////////////////////

    private static int[] castInt(List<Integer> list) {
        int[] array = new int[list.size()];
        for (int i = 0; i < array.length; ++i) {
            array[i] = list.get(i);
        }

        return array;
    }

    private static long[] castLong(List<Long> list) {
        long[] array = new long[list.size()];
        for (int i = 0; i < array.length; ++i) {
            array[i] = list.get(i);
        }

        return array;
    }

    /////////////////////////////////////////////////////////////////////

    /**
     * Generates list with values 0..<n
     * @param n - exclusive limit of sequence
     */
    private static List<Integer> order(int n) {
        List<Integer> sequence = new ArrayList<>();
        for (int i = 0; i < n; ++i) {
            sequence.add(i);
        }

        return sequence;
    }
}


import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.util.List;
import java.util.NoSuchElementException;
import java.math.BigInteger;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.IOException;
import java.util.Arrays;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.util.function.Function;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Stanislav Pak
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
		boolean[] isPrime = IntegerUtils.generatePrimalityTable(107);
		int a = in.readInt();
		int b = in.readInt();
		int k = in.readInt();
		int l = 1;
		int r = b - a + 1;
		while (l < r) {
			int m = (l + r) >> 1;
			if (exists(isPrime, a, b, k, m)) {
				r = m;
			} else {
				l = m + 1;
			}
		}
		if (!exists(isPrime, a, b, k, l)) {
			out.printLine(-1);
		} else {
			out.printLine(l);
		}
    }

	private boolean exists(boolean[] isPrime, int a, int b, int k, int l) {
		int balance = 0;
		for (int i = 0; i < l; ++i) {
			if (isPrime[a + i]) {
				++balance;
			}
		}
		if (balance < k) return false;
		for (int i = a + 1; i + l - 1 <= b; ++i) {
			if (isPrime[i - 1]) --balance;
			if (isPrime[i + l - 1]) ++balance;
			if (balance < k) return false;
		}
		return true;
	}
}

class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public void close() {
		writer.close();
	}

	public void printLine(int i) {
		writer.println(i);
	}
}

class IntegerUtils {

	public static boolean[] generatePrimalityTable(int upTo) {
		boolean[] isPrime = new boolean[upTo];
		if (upTo < 2)
			return isPrime;
		Arrays.fill(isPrime, true);
		isPrime[0] = isPrime[1] = false;
		for (int i = 2; i * i < upTo; i++) {
			if (isPrime[i]) {
				for (int j = i * i; j < upTo; j += i)
					isPrime[j] = false;
			}
		}
		return isPrime;
	}

}


 import java.util.*;
 public class love {
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        String str =s.nextLine();
        for(int i=0;i<str.length();i++) {
            int count=0;
            if(str.charAt(i)=='a') {
                count++;
            }
        }
        System.out.println(count);

    }
}


import java.util.Scanner;

public class p796a {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		int k = in.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) a[i] = in.nextInt();
		int j1 = m - 1, j2 = m + 1;
		while ((j1 >= 0) && ((a[j1] == 0) || (a[j1] > k))) j1--;
		while ((j2 < n) && ((a[j2] == 0) || (a[j2] > k))) j2++;
		System.out.printf("%d", min(j1 >= 0 ? m - j1 : Integer.MAX_VALUE, j2 < n ? j2 - m : Integer.MAX_VALUE));
	}
}


import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        long Olesya = Math.pow(10,a-1);
        if(b>Olesya){
            System.out.println(-1);
        }
        else{
            int rem = Olesya % b;
            System.out.println(Olesya + b - rem);
        }
    }
}


import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class f
{
    public static void print(String str,int val){
        System.out.println(str+"  "+val);
    }

    public long gcd(long a, long b) {
        if (b==0L) return a;
        return gcd(b,a%b);
    }

    public static void debug(long[][] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(Arrays.toString(arr[i]));
        }
    }
    public static void debug(int[][] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(Arrays.toString(arr[i]));
        }
    }
    public static void debug(String[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(arr[i]);
        }
    }

    public static void print(int[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }
    public static void print(String[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }
    public static void print(long[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }
        public FastReader(String path) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(path));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args)
    {
        FastReader s=new FastReader();
        int n = s.nextInt();
        String str = s.nextLine();
        System.out.println(recur(str));

    }

    static int recur(String str){
        int len = str.length();
        int[] inc_dp = new int[len];
        Arrays.fill(inc_dp,1);
        int max_inc =1;
        int inc_index = -1;
        for(int i=len-2;i>=0;i--){
            if((char) (1+str.charAt(i))==(str.charAt(i+1))){
                inc_dp[i] = inc_dp[i+1]+1;
                if(inc_dp[i]>max_inc){
                    max_inc = inc_dp[i];
                    inc_index =i;
                }
            }
        }
//            print(inc_dp);
        int[] left_dp = new int[len];
        int max_left =1;
        int left_index =-1;
        Arrays.fill(left_dp,1);
        for(int i=1;i<len;i++){
            if((char)(1+str.charAt(i))==str.charAt(i-1)){
                left_dp[i] = left_dp[i-1]+1;
            }
            if(left_dp[i]>max_left){
                max_left = left_dp[i];
                left_index =i;
            }
        }

//        System.out.println(str+" "+max_inc+" "+max_left);

        if(max_inc==1 && max_left==1){
            return 0;
        }
        if(max_inc>max_left){
            String str1 = str.substring(0,inc_index+1)+str.substring(inc_index+inc_dp[inc_index]);
            return recur(str1)+max_inc-1;
        }
        else if(max_inc<max_left){
            String str2 = str.substring(0,left_index-left_dp[left_index]+1)+str.substring(left_index);
            return  recur(str2)+max_left-1;
        }
        else {
            String str1 = str.substring(0,inc_index+1)+str.substring(inc_index+inc_dp[inc_index]);
            String str2 = str.substring(0,left_index-left_dp[left_index]+1)+str.substring(left_index);
            return Math.max(max_inc-1+recur(str1),max_left-1+recur(str2));
        }
    }

//    OutputStream out = new BufferedOutputStream( System.out );
//        for(int i=1;i<n;i++){
//              out.write((arr[i]+" ").getBytes());
//         }
//        out.flush();
//  long start_time = System.currentTimeMillis();
//  long end_time = System.currentTimeMillis();
//  System.out.println((end_time - start_time) + "ms");

}


import java.io.BufferedReader;
import java.io.IOException;
import java.util.Arrays;

public class B{
    public static void main(String[] args) throws IOException{
        Reader.init(System.in);
        int n = Reader.nextInt();
        int[] factors = new int[n];

        int sol1 = -1, sol2 = -1;

        for(int i = 0; i < n; i++){
            factors[i] = Reader.nextInt();
        }

        Arrays.sort(factors);

        sol1 = factors[n-1];

        for(int i = n-2; i >= 0; i--){
            if(sol1 % factors[i] != 0) {
                sol2 = factors[i];
                break;
            }
        }

        System.out.println(sol1 + " " + sol2);
    }
}


import java.util.ArrayList;
import java.util.Scanner;

public class 915B{

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt(), curr = scan.nextInt(), l = scan.nextInt(), r = scan.nextInt(), ans = 0;
		boolean left = (l > 1), right = (r < n);

		if (!left && !right) {
			System.out.println(0);
		} else {
			if (right && !left) {
				System.out.println(Math.abs(r-curr) + 1);
			} else if (left && !right) {
				System.out.println(Math.abs(curr-l) +1);
			} else {
				System.out.println(2 + Math.min(Math.abs(curr-l), Math.abs(r-curr)) + r-l);
			}
		}
		scan.close();
	}

}


import java.util.Scanner;

public class CodeForces {

    public static void main(String[] args) throws IOException {

        Scanner reader;
        Long nCases,a,b,area;

        reader = new Scanner(System.in);

        nCases = reader.nextLong();

        for (Long k = 0L; k < nCases; k++) {

            a = reader.nextLong();
            b = reader.nextLong();

            if (a == b + 1) {
                System.out.println("YES");
            }
            else{
                System.out.println("NO");
            }
        }
    }

}


public class Vitya {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] t = new int[n];
		for (int i=0;i<n;i++) {
		t[i]=scanner.nextInt();
		}
		if (n==1) {if(t[0]==15) {System.out.println("DOWN");}else if(t[0]==0) {System.out.println("UP");}else{System.out.println(-1);} }
		else { if((t[n-2]<t[n-1]&& t[n-1]!=15)||t[n-1]==0) {System.out.println("UP");}
		else{System.out.println("DOWN");}
		}

	}

}


import java.awt.*;
import java.io.*;
import java.math.*;
import java.util.*;
import static java.lang.Math.*;

public class BetaRound93_Div1_A implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        new Thread(null, new BetaRound93_Div1_A(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            Locale.setDefault(Locale.US);
            solve();
            in.close();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    /** http://pastebin.com/j0xdUjDn */
    static class Utils {

        private Utils() {}

        public static void mergeSort(int[] a) {
            mergeSort(a, 0, a.length - 1);
        }

        private static final int MAGIC_VALUE = 50;

        private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
            if (leftIndex < rightIndex) {
                if (rightIndex - leftIndex <= MAGIC_VALUE) {
                    insertionSort(a, leftIndex, rightIndex);
                } else {
                    int middleIndex = (leftIndex + rightIndex) / 2;
                    mergeSort(a, leftIndex, middleIndex);
                    mergeSort(a, middleIndex + 1, rightIndex);
                    merge(a, leftIndex, middleIndex, rightIndex);
                }
            }
        }

        private static void merge(int[] a, int leftIndex, int middleIndex, int rightIndex) {
            int length1 = middleIndex - leftIndex + 1;
            int length2 = rightIndex - middleIndex;
            int[] leftArray = new int[length1];
            int[] rightArray = new int[length2];
            System.arraycopy(a, leftIndex, leftArray, 0, length1);
            System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
            for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
                if (i == length1) {
                    a[k] = rightArray[j++];
                } else if (j == length2) {
                    a[k] = leftArray[i++];
                } else {
                    a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
                }
            }
        }

        private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
            for (int i = leftIndex + 1; i <= rightIndex; i++) {
                int current = a[i];
                int j = i - 1;
                while (j >= leftIndex && a[j] > current) {
                    a[j + 1] = a[j];
                    j--;
                }
                a[j + 1] = current;
            }
        }

    }

    // solution

    final double EPS = 1e-9;

    void solve() throws IOException {
        long t1 = readLong();
        long t2 = readLong();
        long x1 = readLong();
        long x2 = readLong();
        long t0 = readLong();
        long bestY1 = -1, bestY2 = -1;
        double bestT = -1;
        for (long y1 = x1; y1 >= 0; y1--) {
            long L = 0, R = x2, y2;
            while (L < R) {
                y2 = (L + R) / 2;
                double t = f(t1, t2, y1, y2);
                if (t0 > t + EPS) {
                    L = y2 + 1;
                } else {
                    R = y2;
                }
            }
            long mid = (L + R) / 2;
            for (y2 = max(0, mid - 10); y2 <= min(x2, mid + 10); y2++) {
                double t = f(t1, t2, y1, y2);
                if (t0 < t + EPS) {
                    if (bestT == -1 || bestT > t + EPS) {
                        bestY1 = y1;
                        bestY2 = y2;
                        bestT = t;
                    } else if (abs(bestT - t) < EPS) {
                        if (bestY1 + bestY2 < y1 + y2) {
                            bestY1 = y1;
                            bestY2 = y2;
                        }
                    }
                }
            }
        }
        out.println(bestY1 + " " + bestY2);
    }

    double f(long t1, long t2, long y1, long y2) {
        return (t1 * y1 + t2 * y2) / (y1 + y2 + 0.0);
    }

}


import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
	public static void main(String[] argv) {
		new Main().run();
	}

	Scanner in;
	PrintWriter out;

	void run() {
		in = new Scanner(System.in);
		out = new PrintWriter(System.out);
		try {
			solve();
		} finally {
			out.close();
		}
	}

	int rev(String s) {
		String res = "";
		for (int i = 0; i < s.length(); i++) {
			res = s.charAt(i) + res;
		}
		return Integer.parseInt(res);
	}

	void solve() {
		int n = in.nextInt();
		if (n == 3) {
			out.println(1);
		}
		if (n == 4) {
			out.println(1);
			//throw new Error();
		}
		if (n == 2) {
throw new Error();
			out.println(1);
		}

		if (n == 1) {
			out.println(1);
		}

		if (n == 5) {
			out.println(1);
		}

	}
}


import java.io.*;
import java.util.*;

public class A
{

	static StringBuilder st = new StringBuilder();

	static int [][][] memo ;
	static char [] s ;

	static int dp(int l , int r , int cnt)
	{
		if(l > r) return 0 ;

		if(memo[l][r][cnt] != -1)return memo[l][r][cnt] ;

		int ans  = dp(l + 1, r, 0) + 1 ;

		for(int i = l + 1 ; i <= r ; i++)
			if(s[l] == s[i])
				ans = Math.min(ans, dp(l + 1, i - 1, 0) + dp(i , r , cnt + 1 ));

		return memo[l][r][cnt] = ans ;
	}

	public static void main(String[] args) throws Exception
	{
		Scanner sc = new Scanner(System.in) ;
		PrintWriter out = new PrintWriter(System.out) ;

		int n = sc.nextInt() ;
		s = sc.next().toCharArray() ;
		memo = new int [n][n][n] ;

		for(int i = 0 ; i< n ; i++)
			for(int j = 0 ; j < n ; j++)
				Arrays.fill(memo[i][j], -1);

		out.println(dp(0, n - 1, 0));
		out.flush();
		out.close();
	}

	static class Scanner
	{
		BufferedReader br;
		StringTokenizer st;

		Scanner(InputStream in)
		{
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() throws Exception
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		int nextInt() throws Exception { return Integer.parseInt(next()); }

		long nextLong() throws Exception { return Long.parseLong(next()); }

		double nextDouble() throws Exception { return Double.parseDouble(next());}

	}

	static void shuffle(int[] a)
	{
		int n = a.length;
		for (int i = 0; i < n; i++)
		{
			int r = i + (int) (Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	}

}


import java.util.*;

public class Main
{
    public static void main(String[] args)
    {
    int a,b,c,d;
    Scanner scn=new Scanner(System.in);
    a=scn.nextInt();
    b=scn.nextInt();
    c=scn.nextInt();
    d=scn.nextInt();

    int x,y,z;
    if(a==c&&b==d)
        x=0;
else if(a==c||b==d)
    x=1;
    else
    x=2;
if(a==b&&b=c)
y=0;
else if((a+b)%2==(c+d)%2)
{
    if(Math.abs(c-a)==Math.abs(d-b))
    y=1;
    else
    y=2;
}
else
y=0;

z=max(Math.abs(c-a),Math.abs(d-b));
System.out.println(x+" "+y+" "+z);
}
}


import  java.util.*;
public class oneone{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int p=sc.nextInt();
		int q=sc.nextInt();
		int[] a=new int[n];
		for(int i=0;i<n;i++){
			a[i]=sc.nextInt();
		}
		Arrays.sort(a);
		int i=0;
		int min=Integer.MAX_VALUE;
		for(int j=0;j<n;j++){
			for(i=0;i<n;i++){
				if(a[i]-a[j]>q){
					break;
				}
			}
			min=Math.min(p-i+j,min);
		}
		System.out.println(min);
	}
}


import java.util.Scanner;
public class codes{
public static void main(String []args){
Scanner sc = new Scanner(System.in);
String museum = sc.next();
int count =0;
int start =0;
int ch;
int check;
for(int i=0; i<museum.length(); i++){
ch = ((int)museum.charAt(i)-97);
if(check <= 12)
count+=check;
else
count+=(26-check);
start =ch;
}
System.out.println(count);
}}


import java.io.*;
import java.util.*;

public class CodeForcesEducationRound13A{
   public static void main(String[] args) {
      MyScanner sc = new MyScanner();
      out = new PrintWriter(new BufferedOutputStream(System.out));
//
//      Long n = sc.nextLong();
//      Long a = sc.nextLong();
//      Long b = sc.nextLong();
//      Long p = sc.nextLong();
//      Long q = sc.nextLong();
//
//
//      for(Long i =n+1; i<s; i++){
//    	  if(i%k==0){
//    		  s=i;
//    		  break;
//    	  }
//      }
//		System.out.println(s);
//
//

      	  Long s = 1000000000L;
	      Long n = sc.nextLong();
	      Long k = sc.nextLong();
	      for(Long i =n+1; i<(k+n+1); i++){
	    	  if(i%k==0){
	    		  s=i;
	    		  break;
	    	  }
	      }
			System.out.println(s);

      /*    Long s = 1000000000L;
      Long n = sc.nextLong();
      Long k = sc.nextLong();
      for(Long i =n+1; i<s; i++){
    	  if(i%k==0){
    		  s=i;
    		  break;
    	  }
      }
		System.out.println(s);

    */

      // Start writing your solution here. -------------------------------------

      /*
      int n      = sc.nextInt();        // read input as integer
      long k     = sc.nextLong();       // read input as long
      double d   = sc.nextDouble();     // read input as double
      String str = sc.next();           // read input as String
      String s   = sc.nextLine();       // read whole line as String

      int result = 3*n;
      out.println(result);                    // print via PrintWriter
      */

      // Stop writing your solution here. -------------------------------------
      out.close();
   }


import com.sun.org.apache.bcel.internal.generic.ALOAD;
import java.util.*;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import javafx.util.Pair;
import jdk.nashorn.internal.ir.BreakNode;
public class Fff {

   static BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
static   StringBuilder out=new StringBuilder();
 static  BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
 static PrintWriter pw=new PrintWriter(new OutputStreamWriter(System.out));
    static int I(String s) {return Integer.parseInt(s);}
    static long L(String s) {return Long.parseLong(s);}
    static double D(String s) {return Double.parseDouble(s);}
     static String[] SA() throws IOException {return bf.readLine().split(" ");}

    public static void main(String[] args) throws IOException {

        int n = I(bf.readLine());
     int a=0;
     int b=0;
     for(int i=1;i*i<=n;i++){
     if(n%i==0){
         if(lcm(i,n/i,n)){
     a=i;
     b=n/i;
     }}
     }
            System.out.print(a+" "+b);

    }
    static boolean lcm(int a,int b,int n){
    int gcd=gcd(a, b);
    if((a*b)/gcd==n){return true;}
    else{return false;}
    }

}


// Working program with FastReader
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Graph
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args)
    {
        FastReader s=new FastReader();
        long a,b,c;
	    if((b-a)%c==0)
	    	System.out.println("YES");
	    	else
	     System.out.println("NO");

    }
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.InputMismatchException;

/**
 * http://codeforces.com/contest/181/problem/C
 *
 * @author sultan.of.swing
 *
 */

public class TaskC {

	public FasterScanner mFScanner;
	public PrintWriter mOut;
	int planets;
	int types, capacity;
	int buy[][], sell[][], items[][];

	public TaskC() {
		mFScanner = new FasterScanner();
		mOut = new PrintWriter(System.out);
	}

	public void solve() {

		planets = mFScanner.nextInt();
		types = mFScanner.nextInt();
		capacity = mFScanner.nextInt();

		buy = new int[planets][types];
		sell = new int[planets][types];
		items = new int[planets][types];

		int i, j;

		for (i = 0; i < planets; i++) {
			mFScanner.nextLine();
			for (j = 0; j < types; j++) {
				buy[i][j] = mFScanner.nextInt();
				sell[i][j] = mFScanner.nextInt();
				items[i][j] = mFScanner.nextInt();
			}
		}

		int profit = 0;

		for (i = 0; i < planets; i++) {
			for (j = 0; j < planets; j++) {

				if (i == j)
					continue;

				profit = Math.max(profit, maxProfit(i, j));

			}
		}

		mOut.println(profit);

	}

	public int maxProfit(int planetBuy, int planetSell) {
		ArrayList<Items> items = new ArrayList<>();
		int profit;

		for (int i = 0; i < types; i++) {
			profit = sell[planetSell][i] - buy[planetBuy][i];
			items.add(new Items(profit, this.items[planetBuy][i]));
		}

		Collections.sort(items);
		profit = 0;
		int capacity = 0;
		int remCap = this.capacity;

		for (int i = 0; i < items.size(); i++) {

			capacity = items.get(i).capacity;
			capacity = Math.min(capacity, remCap);

			profit += (capacity * items.get(i).profit);
			remCap -= capacity;

		}

		return profit;

	}

	class Items implements Comparable<Items> {
		int profit;
		int capacity;

		public Items(int profit, int capacity) {
			this.profit = profit;
			this.capacity = capacity;
		}

		@Override
		public int compareTo(Items o) {
			// TODO Auto-generated method stub
			return Integer.compare(o.profit, this.profit);
		}
	}

	public void flush() {
		mOut.flush();
	}

	public void close() {
		mOut.close();
	}

	public static void main(String[] args) {
		TaskC mSol = new TaskC();
		mSol.solve();
		mSol.flush();
		mSol.close();
	}

	class FasterScanner {
		private InputStream mIs;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public FasterScanner() {
			this(System.in);
		}

		public FasterScanner(InputStream is) {
			mIs = is;
		}

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = mIs.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public String nextString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public double nextDouble() {
			Double next;
			next = Double.parseDouble(nextString());
			return next;
		}

		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public char[] nextCharArray(int N) {
			int i;
			char[] array;
			String str;

			array = new char[N];

			i = 0;

			str = nextLine();

			for (i = 0; i < N && i < str.length(); i++) {
				array[i] = str.charAt(i);
			}

			return array;
		}

		public char[][] nextChar2DArray(int M, int N) {
			int i;
			char[][] array;

			array = new char[M][N];

			i = 0;

			for (i = 0; i < M; i++) {
				array[i] = nextCharArray(N);
			}

			return array;
		}

		public int[] nextIntArray(int N) {
			int i;
			int[] array;

			array = new int[N];

			i = 0;

			for (i = 0; i < N; i++) {
				array[i] = nextInt();
			}

			return array;
		}

		public int[][] nextInt2DArray(int M, int N) {
			int i;
			int[][] array;

			array = new int[M][N];

			i = 0;

			for (i = 0; i < M; i++) {
				array[i] = nextIntArray(N);
			}

			return array;
		}

		public long[] nextLongArray(int N) {
			int i;
			long[] array;

			array = new long[N];

			i = 0;

			for (i = 0; i < N; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public long[][] nextLong2DArray(int M, int N) {
			int i;
			long[][] array;

			array = new long[M][N];

			i = 0;

			for (i = 0; i < M; i++) {
				array[i] = nextLongArray(N);
			}

			return array;
		}

		public double[] nextDoubleArray(int N) {
			int i;
			double[] array;

			array = new double[N];

			for (i = 0; i < N; i++) {
				array[i] = nextDouble();
			}

			return array;
		}

		public double[][] nextDouble2DArray(int M, int N) {
			int i;
			double[][] array;

			array = new double[M][N];

			for (i = 0; i < M; i++) {
				array[i] = nextDoubleArray(N);
			}

			return array;
		}

	}
}


//problem: https://codeforces.com/problemset/problem/1025/A

import java.util.Scanner;
import java.util.Arrays;

public class Doggo{
    public static void main(String[] args){
        Scanner sObj = new Scanner(System.in);
        int size = Integer.parseInt(sObj.nextLine());
        if(size==1){
            System.out.prinln("Yes");
            return;
        }
        int[] arr = new int[128];
        for(char c: sObj.nextLine().toCharArray()){
            arr[c]++;
            if(arr[c] >= 2){
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
}


import java.io.*;
import java.util.*;

public class Main {
    static PrintWriter out = new PrintWriter(new BufferedWriter(
            new OutputStreamWriter(System.out)));

    public static void main(String[] args) throws IOException {
        // PrintStream out = new PrintStream(new
        // FileOutputStream("out.out"));
        Scan scan = new Scan();
        int n = scan.nextInt();
        out.println(solve(n));
        out.flush();
    }
    static String solve(int c){
        if(c==1)
            return "one";
        if(c==2)
            return "two";
        if(c==3)
            return "three";
        if(c==4)
            return  "four";
        if(c==5)
            return "five";
        if(c==6)
            return "six";
        if(c==7)
            return "seven";
        if(c==8)
            return "eight";
        if(c==9)
            return "nine";
        if(c==10)
            return "ten";
        if(c==11)
            return "eleven";
        if(c==12)
            return "twelve";
        if(c==13)
            return "thirteen";
        if(c==14)
            return "fourteen";
        if(c==15)
            return "fifteen";
        if(c==16)
            return "sixteen";
        if(c==17)
            return "seventeen";
        if(c==18)
            return "eighteen";
        if(c==19)
            return  "nineteen";
        if(c==20)
            return "twenty";
        if(c==21)
            return "twenty-one";
        if(c==22)
            return "twenty-two";
        if(c==23)
            return  "twenty-three";
        if(c==24)
            return  "twenty-four";
        if(c==25)
            return "twenty-five";
        if(c==26)
            return  "twenty-six";
        if(c==27)
            return "twenty-seven";
        if(c==28)
            return "twenty-eight";
        if(c==29)
            return "twenty-nine";
        if(c==30)
            return  "thirty";
        if(c==31)
            return "thirty-one";
        if(c==32)
            return "thirty-two";
        if(c==33)
            return  "thirty-three";
        if(c==34)
            return  "thirty-four";
        if(c==35)
            return "thirty-five";
        if(c==36)
            return  "thirty-six";
        if(c==37)
            return "thirty-seven";
        if(c==38)
            return "thirty-eight";
        if(c==39)
            return "thirty-nine";
        if(c==40)
            return  "forty";
        if(c==41)
            return "forty-one";
        if(c==42)
            return "forty-two";
        if(c==43)
            return  "forty-three";
        if(c==44)
            return  "forty-four";
        if(c==45)
            return "forty-five";
        if(c==46)
            return  "forty-six";
        if(c==47)
            return "forty-seven";
        if(c==48)
            return "forty-eight";
        if(c==49)
            return "forty-nine";
        if(c==50)
            return "fifty";
        if(c==51)
            return "fifty-one";
        if(c==52)
            return "fifty-two";
        if(c==53)
            return  "fifty-three";
        if(c==54)
            return  "fifty-four";
        if(c==55)
            return "fifty-five";
        if(c==56)
            return  "fifty-six";
        if(c==57)
            return "fifty-seven";
        if(c==58)
            return "fifty-eight";
        if(c==59)
            return "fifty-nine";
        if(c==60)
            return "sixty";
        if(c==61)
            return "sixty-one";
        if(c==62)
            return "sixty-two";
        if(c==63)
            return  "sixty-three";
        if(c==64)
            return  "sixty-four";
        if(c==65)
            return "sixty-five";
        if(c==66)
            return  "sixty-six";
        if(c==67)
            return "sixty-seven";
        if(c==68)
            return "sixty-eight";
        if(c==69)
            return "sixty-nine";
        if(c==70)
            return "seventy";
        if(c==71)
            return "seventy-one";
        if(c==72)
            return "seventy-two";
        if(c==73)
            return  "seventy-three";
        if(c==74)
            return  "seventy-four";
        if(c==75)
            return "seventy-five";
        if(c==76)
            return  "seventy-six";
        if(c==77)
            return "seventy-seven";
        if(c==78)
            return "seventy-eight";
        if(c==79)
            return "seventy-nine";
        if(c==80)
            return "eighty";
        if(c==81)
            return "eighty-one";
        if(c==82)
            return "eighty-two";
        if(c==83)
            return  "eighty-three";
        if(c==84)
            return  "eighty-four";
        if(c==85)
            return "eighty-five";
        if(c==86)
            return  "eighty-six";
        if(c==87)
            return "eighty-seven";
        if(c==88)
            return "eighty-eight";
        if(c==89)
            return "eighty-nine";
        if(c==90)
            return "ninety";
        if(c==91)
            return "ninety-one";
        if(c==92)
            return "ninety-two";
        if(c==93)
            return  "ninety-three";
        if(c==94)
            return  "ninety-four";
        if(c==95)
            return "ninety-five";
        if(c==96)
            return  "ninety-six";
        if(c==97)
            return "ninety-seven";
        if(c==98)
            return "ninety-eight";
        if(c==99)
            return "ninety-nine";
        return "zero";
;
    }
}

class Scan {

    BufferedReader buffer;
    StringTokenizer tok;

    Scan() {
        buffer = new BufferedReader(new InputStreamReader(System.in));
        // FileReader filereader=null;
        // try {
        // filereader = new FileReader("in.in");
        // } catch (FileNotFoundException e) {
        // // TODO Auto-generated catch block
        // e.printStackTrace();
        // }
        // buffer = new BufferedReader(filereader);
    }

    boolean hasNext() {
        while (tok == null || !tok.hasMoreElements()) {
            try {
                tok = new StringTokenizer(buffer.readLine());
            } catch (Exception e) {
                return false;
            }
        }
        return true;
    }

    String next() {
        if (hasNext())
            return tok.nextToken();
        return null;
    }

    String nextLine() {
        String s = null;
        try {
            s = buffer.readLine();
        } catch (Exception e) {
            return null;
        }
        return s;
    }

    char nextChar() {
        try {
            return ((char) buffer.read());
        } catch (Exception e) {
        }
        return '\0';
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }
}


import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Collection;

public class D extends Driver {
  public static void main(String[] args) {
    new D().run();
  }

  @Override
  public void solveOne() {
    OutputUtils.yn(out, canSolve());
  }

  boolean canSolve() {
    int n = in.nextInt(), m = in.nextInt(), k = in.nextInt();
    if (n % 2 == 0) {
      return k % 2 == 0;
    } else {
      return m%2 == 0 && (k - m / 2) % m == 0;
    }
  }
}

class Driver {
  public static final boolean LOCAL = System.getProperty("ONLINE_JUDGE") == null;

  public final PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out), LOCAL);

  public final FastScanner in = new FastScanner();

  public final void run() {
    try {
      solve();
    } finally {
      close();
    }
  }

  public void solve() {
    int tt = in.nextInt();
    while (tt-- > 0) {
      if (LOCAL) {
        out.println("--------------------------------------");
      }
      solveOne();
    }
  }

  public void solveOne() {
    throw null;
  }

  protected void close() {
    out.close();
  }

  protected void print(Object... objects) {
    for (int i = 0; i < objects.length; i++) {
      if (i > 0) {
        out.print(' ');
      }
      out.print(objects[i]);
    }
  }

  protected void println(Object... objects) {
    print(objects);
    out.println();
  }
}

class FastScanner {
  BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

  StringTokenizer st = new StringTokenizer("");

  public String next() {
    while (!st.hasMoreElements()) {
      try {
        st = new StringTokenizer(br.readLine());
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
    return st.nextToken();
  }

  public int nextInt() {
    return Integer.parseInt(next());
  }

  public char nextChar() {
    return next().charAt(0);
  }

  public int[] nextArray(int n) {
    int[] a = new int[n];
    for (int i = 0; i < n; i++) {
      a[i] = nextInt();
    }
    return a;
  }

  public char[] nextCharArray(int n) {
    char[] a = new char[n];
    for (int i = 0; i < n; i++) {
      a[i] = nextChar();
    }
    return a;
  }

  public long[] nextLongArray(int n) {
    long[] a = new long[n];
    for (int i = 0; i < n; i++) {
      a[i] = nextLong();
    }
    return a;
  }

  public long nextLong() {
    return Long.parseLong(next());
  }
}

class OutputUtils {
  public static void yn(PrintWriter out, boolean y) {
    out.println(y ? "YES" : "NO");
  }

  public static void printMany(PrintWriter out, Object a) {
    if (a instanceof int[]) {
      printArray(out, (int[]) a);
    } else if (a instanceof long[]) {
      printArray(out, (long[]) a);
    } else if (a instanceof double[]) {
      printArray(out, (double[]) a);
    } else if (a instanceof Object[]) {
      printArray(out, (Object[]) a);
    } else if (a instanceof Collection<?>) {
      printCollection(out, (Collection<?>) a);
    } else {
      throw null;
    }
  }

  private static void printArray(PrintWriter out, long[] a) {
    for (int i = 0; i < a.length; i++) {
      if (i > 0) {
        out.print(' ');
      }
      out.print(a[i]);
    }
    out.println();
  }

  private static <E> void printArray(PrintWriter out, E[] a) {
    for (int i = 0; i < a.length; i++) {
      if (i > 0) {
        out.print(' ');
      }
      out.print(a[i]);
    }
    out.println();
  }

  private static void printArray(PrintWriter out, int[] a) {
    for (int i = 0; i < a.length; i++) {
      if (i > 0) {
        out.print(' ');
      }
      out.print(a[i]);
    }
    out.println();
  }

  private static void printArray(PrintWriter out, double[] a) {
    for (int i = 0; i < a.length; i++) {
      if (i > 0) {
        out.print(' ');
      }
      out.print(a[i]);
    }
    out.println();
  }

  private static <E> void printCollection(PrintWriter out, Collection<E> a) {
    int i = 0;
    for (E x : a) {
      if (i++ > 0) {
        out.print(' ');
      }
      out.print(x);
    }
    out.println();
  }
}

class E extends Driver {
  public static void main(String[] args) {
    new E().run();
  }

  @Override
  public void solve() {
    int n = in.nextInt();
    char[] cs = in.next().toCharArray();
    int[] pacmans, food;
    int npacman = 0, nfood = 0;
    {
      int ipacman = 0, ifood = 0;
      for (int i = 0; i < n; i++) {
        if (cs[i] == 'P') {
          npacman++;
        }
        if (cs[i] == '*') {
          nfood++;
        }
      }
      pacmans = new int[npacman];
      food = new int[nfood];
      for (int i = 0; i < n; i++) {
        if (cs[i] == 'P') {
          pacmans[ipacman++] = i;
        }
        if (cs[i] == '*') {
          food[ifood++] = i;
        }
      }
    }
    int lo = 0, hi = 3 * n;
    while (lo < hi) {
      int mid = (lo + hi) / 2;
      int leftMost = 0;
      for (int i = 0; i < npacman; i++) {
        int rightDist;
        if (pacmans[i] < food[leftMost]) {
          rightDist = mid;
        } else {
          int leftDist = pacmans[i] - food[leftMost];
          if (leftDist > mid) {
            break;
          }
          // 2 cases:
          // 1.  *...P.*   go to the right first
          // 1.  *.P...*   go to the left first
          rightDist = Math.max(mid - 2 * leftDist, (mid - leftDist) / 2);
        }
        while (leftMost < nfood && food[leftMost] <= pacmans[i] + rightDist) {
          leftMost++;
        }
        if (leftMost == nfood) {
          break;
        }
      }
      if (leftMost == nfood) {
        hi = mid;
      } else {
        lo = mid + 1;
      }
    }
    out.println(lo);
  }
}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{
		Scanner s= new Scanner(System.in);
		int p = s.nextInt();
		int y = s.nextInt();

		int flag = 0 ;
		while(y--)
		{
			int chkflag =0 ;
			for(int j=0;j*j<= y && j<=p ;j++)
			{
				if(y%j ==0)
				{
				chkflag = 1;
				break;
				}
			}
			if(chkflag == 0)
			{
			System.out.println(y);
			flag = 1;
			break;
			}
			y--;
		}
		if(flag == 0)
		System.out.println(-1);

	}
}


import java.util.*
public class tatti{

          public static void main(String dsgs[]){
                    Scanner s = new Scanner(System.in);
                    int n;
                    n = s.nextInt();
                    int a[] =new int[n];
                    for(int i=0;i<n;i++){
                              a[i] = s.nextInt();
                    }
                    int max =Integer.MAX_VALUE;
                    int x=0;y=0;
                    for(int i=0;i<n;i++){
                              for(int j=i+1;j<n;j++){
                                        if(max<(a[i]-a[j])){
                                                  x = i;
                                                  y = j;
                                                  max = a[i]-a[j];
                                        }
                              }
                    }
                    int temp = a[x];
                    a[x] = a[0];
                    a[0] = temp;
                    temp = a[n-1];
                    a[n-1] = a[y];
                    a[y] = temp;
                    Arrays.sort(a,1,n-1);
                    for(int i=0;i<n;i++)
                              System.out.println(a[i]+" ");
          }
}


import java.util.*;

public class Hello {
public static int count=1;
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		String str1 = in.nextLine();
		int result=0;
		int a=Integer.parseInt(str1.split(" ")[0]);
		int b=Integer.parseInt(str1.split(" ")[1]);
		int heap=Integer.parseInt(str1.split(" ")[3]);
		boolean b=true;
		int min=0;int max=0;
		while(b){
			if(count==1){
				if(heap>0)
				{
					count++;
			  		heap = heap-gcd(a,heap);
				}
			}else
			{
				if(heap>0)
				{
					count=1;
			  		heap = heap-gcd(a,heap);
				}

			}

		}
		System.out.print(count);
	}
	public static int gcd(int n1, int n2)
	{
	  	int gcd = 1;
	        for(int i = 1; i <= n1 && i <= n2; ++i)
        	{
            		if(n1 % i==0 && n2 % i==0)
                		gcd = i;
        	}
	return gcd;
	}
}


import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;

public class D {

	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok = new StringTokenizer("");

	void init() throws FileNotFoundException {
		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
	}

	String readString() throws IOException {
		while (!tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}

	long readLong() throws IOException {
		return Long.parseLong(readString());
	}

	double readDouble() throws IOException {
		return Double.parseDouble(readString());
	}

	int[] readArr(int n) throws IOException {
		int[] res = new int[n];
		for (int i = 0; i < n; i++) {
			res[i] = readInt();
		}
		return res;
	}

	long[] readArrL(int n) throws IOException {
		long[] res = new long[n];
		for (int i = 0; i < n; i++) {
			res[i] = readLong();
		}
		return res;
	}

	public static void main(String[] args) {
		new D().run();
	}

	public void run() {
		try {
			long t1 = System.currentTimeMillis();
			init();
			solve();
			out.close();
			long t2 = System.currentTimeMillis();
			System.err.println("Time = " + (t2 - t1));
		} catch (Exception e) {
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}

	void solve() throws Exception {
		double a = readInt();
		double b = readInt();
		double m = readInt();
		double vx = readDouble();
		double vy = readDouble();
		double vz = readDouble();
		double x = a * 1.0 / 2;
		double y = m;
		double z = 0;
		while (true) {
			double tmin = 10000000;
			int r = 0;
			if (vx > 0) {
				double curT = (a - x) / vx;
				if (tmin > curT) {
					r = 1;
					tmin = curT;
				}
			} else {
				double curT = -x / vx;
				if (tmin > curT) {
					r = 1;
					tmin = curT;
				}
			}

			if (vy > 0) {
				throw new Exception();
			} else {
				tmin = min(tmin, -y / vy);
			}

			if (vz > 0) {
				double curT = (b - z) / vz;
				if (tmin > curT) {
					r = 2;
					tmin = curT;
				}
			} else {
				double curT = -z / vz;
				if (tmin > curT) {
					r = 2;
					tmin = curT;
				}
			}
			x = x + tmin * vx;
			y = y + tmin * vy;
			z = z + tmin * vz;
			if(x < 0) x = 0.00000001;
			if(x > a) x = a-0.00000001;
			if(z < 0.0000001) z = 0.00000001;
			if(z > b) z = b - 0.00000001;

			if (abs(y) < 0.0000001 || y < 0) {
				break;
			}

			if(r == 1) vx = -vx;
			if(r == 2) vz = -vz;
		}
		out.println(x + " " + z);
	}

	void maxHepify(int[] a, int i, int length) {
		int l = (i << 1) + 1;
		int r = (i << 1) + 2;
		int largest = i;
		if (l < length && a[l] > a[largest])
			largest = l;
		if (r < length && a[r] > a[largest])
			largest = r;
		if (largest != i) {
			a[largest] += a[i];
			a[i] = a[largest] - a[i];
			a[largest] -= a[i];
			maxHepify(a, largest, length);
		}
	}

	void buildMaxHeap(int[] a) {
		for (int i = a.length / 2 - 1; i >= 0; i--) {
			maxHepify(a, i, a.length);
		}
	}

	void heapSort(int[] a) {
		buildMaxHeap(a);
		for (int i = a.length - 1; i > 0; i--) {
			a[i] += a[0];
			a[0] = a[i] - a[0];
			a[i] -= a[0];
			maxHepify(a, 0, i);
		}
	}

	int[] zFunction(char[] s) {
		int[] z = new int[s.length];
		z[0] = 0;
		for (int i = 1, l = 0, r = 0; i < s.length; ++i) {
			if (i <= r)
				z[i] = min(r - i + 1, z[i - l]);
			while (i + z[i] < s.length && s[z[i]] == s[i + z[i]])
				++z[i];
			if (i + z[i] - 1 > r) {
				l = i;
				r = i + z[i] - 1;
			}
		}
		return z;
	}

	int[] prefixFunction(char[] s) {
		int[] pr = new int[s.length];
		for (int i = 1; i < s.length; ++i) {
			int j = pr[i - 1];
			while (j > 0 && s[i] != s[j])
				j = pr[j - 1];
			if (s[i] == s[j])
				++j;
			pr[i] = j;
		}
		return pr;
	}

	int ModExp(int a, int n, int mod) {
		int res = 1;
		while (n != 0)
			if ((n & 1) != 0) {
				res = (res * a) % mod;
				--n;
			} else {
				a = (a * a) % mod;
				n >>= 1;
			}
		return res;
	}

	public static class Utils {

		private Utils() {
		}

		public static void mergeSort(int[] a) {
			mergeSort(a, 0, a.length - 1);
		}

		private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
			final int MAGIC_VALUE = 50;
			if (leftIndex < rightIndex) {
				if (rightIndex - leftIndex <= MAGIC_VALUE) {
					insertionSort(a, leftIndex, rightIndex);
				} else {
					int middleIndex = (leftIndex + rightIndex) / 2;
					mergeSort(a, leftIndex, middleIndex);
					mergeSort(a, middleIndex + 1, rightIndex);
					merge(a, leftIndex, middleIndex, rightIndex);
				}
			}
		}

		private static void merge(int[] a, int leftIndex, int middleIndex,
				int rightIndex) {
			int length1 = middleIndex - leftIndex + 1;
			int length2 = rightIndex - middleIndex;
			int[] leftArray = new int[length1];
			int[] rightArray = new int[length2];
			System.arraycopy(a, leftIndex, leftArray, 0, length1);
			System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
			for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
				if (i == length1) {
					a[k] = rightArray[j++];
				} else if (j == length2) {
					a[k] = leftArray[i++];
				} else {
					a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++]
							: rightArray[j++];
				}
			}
		}

		private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
			for (int i = leftIndex + 1; i <= rightIndex; i++) {
				int current = a[i];
				int j = i - 1;
				while (j >= leftIndex && a[j] > current) {
					a[j + 1] = a[j];
					j--;
				}
				a[j + 1] = current;
			}
		}
	}

	boolean isPrime(int a) {
		for (int i = 2; i <= sqrt(a); i++)
			if (a % i == 0)
				return false;
		return true;
	}

	static double distance(long x1, long y1, long x2, long y2) {
		return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
	}

	static long gcd(long a, long b) {
		if (min(a, b) == 0)
			return max(a, b);
		return gcd(max(a, b) % min(a, b), min(a, b));
	}

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

/*
 * class Treap<K extends Comparable<K>>{
 *
 * public K x; public double y; public Treap<K> left; public Treap<K> right;
 *
 * public Treap(K x, double y, Treap<K> left, Treap<K> right) { this.x = x;
 * this.y = y; this.left = left; this.right = right; }
 *
 * public static <K extends Comparable<K>> Treap<K> merge(Treap<K> l, Treap<K>
 * r){ if(l == null) return r; if(r == null) return l; if(l.y > r.y){ return new
 * Treap<K>(l.x, l.y, l.left, merge(l.right, r)); } else{ return new
 * Treap<K>(r.x, r.y, merge(l, r.left), r.right); } }
 *
 * public void split(K x, Treap<K> left, Treap<K> right){ Treap<K> newTreap =
 * null; if(this.x.compareTo(x) <= 0){ if(this.right == null){ right = null; }
 * else{ right.split(x, newTreap, right); } left = new Treap<K>(this.x, this.y,
 * left, newTreap); } else{ if(this.left == null){ left = null; } else{
 * left.split(x, left, newTreap); } right = new Treap<K>(x, y, newTreap, right);
 * } }
 *
 * public Treap<K> add(K x){ Treap<K> left = null, right = null; this.split(x,
 * left, right); Treap<K> temp = new Treap<K>(x, random(), null, null); return
 * merge(merge(left, temp), right); }
 *
 * @SuppressWarnings("null") public Treap<K> remove(K x){ Treap<K> left = null,
 * temp = null, right = null; this.split(x, left, right); right.split(x, temp,
 * right); return merge(left, right); }
 *
 * public static <K extends Comparable<K>> Treap<K> build(K[] a){ Treap<K> temp
 * = new Treap<K>(a[0], random(), null, null); for(int i = 1; i < a.length;
 * i++){ temp = temp.add(a[i]); } return temp; } }
 */


import java.util.*;
public class P721A {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		String[] B = sc.nextLine().split("W");
		ArrayList<Integer> nums = new ArrayList<Integer>();
		for (String s : B)
			if (s.length() > 0)
				nums.add(s.length());
		String ans = "";
		for (int i : nums)
			ans += " " + i;
		System.out.println(nums.length());
		System.out.println(ans.substring(1));
	}

}