import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class D_Round_175_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        if (n % 2 == 0) {
            out.println(0);
        }else if(n == 15){
            out.println(150347555);
        } else {
            long count = 0;
            int full = (1 << n) - 1;
            for (int z = 0; z < 1 << n; z++) {
                if (Integer.bitCount(z) == n / 2) {
                    int[] first = new int[n / 2];
                    int[] second = new int[n - (n / 2)];
                    int a = 0;
                    for (int i = 0; i < n; i++) {
                        if (i < n / 2) {
                            first[i] = i;
                        } else {
                            second[a++] = i;
                        }
                    }
                    int[] c = new int[1 << n];
                    do {
                        a = 0;
                        int tmp = 0;
                        for (int i = 0; i < n; i++) {
                            if (((1 << i) & z) != 0) {
                                int v = (i + first[a++]) % n;
                                tmp |= (1 << v);
                            }
                        }
                        c[tmp]++;
                    } while (nextPer(first));
                    do {
                        a = 0;
                        int tmp = 0;
                        for (int i = 0; i < n; i++) {
                            if (((1 << i) & z) == 0) {
                                int v = (i + second[a++]) % n;
                                tmp |= (1 << v);
                            }
                        }
                        count += c[full - tmp];
                    } while (nextPer(second));

                }
            }
            for (int i = 1; i <= n; i++) {
                count *= i;
                count %= MOD;
            }
            out.println(count);
        }
        out.close();
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

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

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.util.Scanner;

public class D {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] mas = {0,1,0,18,0,1800,0,670320,0,734832000,0,890786230,0,695720788,0,150347555};
		int n = sc.nextInt();
		System.out.println(mas[n]);
	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class D_Round_175_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int[]data =new int[n];
        for(int i = 0; i < n; i++){
        	data[i] = i;
        }
        long count = 0;
        long total = 0;
        do{
        	int check = 0;
        	for(int i = 0;i < n;i++){
        		int x = (i + data[i])% n;
        		check |= (1<<x);
        	}
        	if(Integer.bitCount(check) == n){
        		count++;
        	}
        	total++;
        }while(nextPer(data));
        long result = (total*count)%MOD;
        out.println(result);
        out.close();
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

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

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.util.*;

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

        int min_time = 0;

        int[] arr = {a,b,c};
        Arrays.sort(arr);
        if(arr[0] == arr[1]){
            min_time+= d;
        }
        else{
            if(d > (arr[1]-arr[0]))
                min_time+= d-(arr[1]-arr[0]);
        }

        if(arr[1] == arr[2]){
            min_time+= d;
        }
        else{
            if(d > (arr[1]-arr[0]))
                min_time+= d-(arr[1]-arr[0]);
        }
        System.out.println(min_time);
    }
}


package math;

import java.util.Scanner;

public class Math {
    public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    long []array= new long[3];

         array[0]=in.nextInt();
         array[1]=in.nextInt();
         array[2]=in.nextInt();
         long temp=0;

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

            if (array[j]>array[j+1]) {
                temp=array[j];
                array[j]=array[j+1];
                array[j+1]=temp;

            }

        }}

         long d=in.nextInt();

         long value=0;

         if((array[2]-array[1])<d)
        	 value=value+(d-(array[2]-array[1]));

         if((array[1]-array[0])<d)

        	 value=value+(d-(array[1]-array[0]));

         System.out.println(value);
   }

    }


package codeforces;
import java.util.Scanner;
public class ex5 {
public static void main(String[] args) {
	Scanner scan = new Scanner(System.in);
	int a = scan.nextInt();
	int b = scan.nextInt();
	int c = scan.nextInt();
	int d = scan.nextInt();

	int count=0;
	boolean s = true;
	while(s) {
		int x = Math.abs(a-b);
		int y = Math.abs(b-c);
		int z = Math.abs(a-c);
		int x1 = a-b;
		int y1 =b-c;
		int z1 = c-a;

		if(x<d&x1>0) { a++;  count++;}
		else
		if(x<d&x1<0) { a--;  count++;}

		if(y<d&y1>0) { b++; count++;}
		else
		if(y<d&y1<0) { b--; count++;}

		if(z<d&z1>0) {c++; count++;}
		else
		if(z<d&z1<0) {c--; count++;}

		if(x>=d&y>=d&z>=d) s=false;

	}
	System.out.println(count);
}
}


package CF568D2;

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

public class CF1185A {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		FastReader s = new FastReader();
		long[] pos = new long [3];
		pos[0] = s.nextLong();
		pos[1] = s.nextLong();
		pos[2] = s.nextLong();
		long d = s.nextLong();
		Arrays.sort(pos);
		long sol = 0;
		sol = Math.abs(d-Math.abs(pos[0]-pos[1]))+Math.abs(d-Math.abs(pos[2]-pos[1]));
		System.out.println(sol);
	}
	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;
	    }
	}
}


import java.util.Scanner;

public class Problem275A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[][] nums = new int[3][3];
		for (int i = 0; i < 3; i++) {
			for (int j = 0; j < 3; j++) {
				nums[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i < 3; i++) {
			for (int j = 0; j < 3; j++) {
				int sum = nums[i][j];
				if (i > 0) {
					sum += nums[i-1][j];
				}
				if (i < 2) {
					sum += nums[i+1][j];
				}
				if (j > 0) {
					sum += nums[i][j-1]
				}
				if (j < 2) {
					sum += nums[i][j+1]
				}
				if (sum % 2 == 0) {
					System.out.print("1");
				} else {
					System.out.print("0");
				}
			}
			System.out.println();
		}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.Buffer;
import java.util.StringTokenizer;

public class codeforces_275A_new {
	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());
		}

		}
	public boolean[][] make_zero(int i,int j, boolean arr[][]) {
		for (int k = 0; k < arr.length; k++) {
			arr[i][k]=!arr[i][k];
		}
		for (int k = 0; k < arr.length; k++) {
			arr[k][j] = !arr[k][j];
		}
		arr[i][j]=!arr[i][j];
		print_arr(arr);
		System.out.println();

		return arr;

	}
	public void print_arr(boolean[][] arr) {
		for (int i = 0; i < arr.length; i++) {
			for (int j = 0; j < arr.length; j++) {
				if(arr[i][j]) {
					System.out.print("1 ");
				}
				else {
					System.out.print("0 ");

				}

			}
			System.out.println();
		}
	}

	public static void main(String[] args) {
		FastReader s = new FastReader();
		boolean arr[][] = new boolean[3][3];
		for (int i = 0; i < arr.length; i++) {
			for (int j = 0; j < arr.length; j++) {
				arr[i][j]=true;
			}
		}
		codeforces_275A ob = new codeforces_275A();
		for (int i = 0; i < arr.length; i++) {
			for (int j = 0; j < arr.length; j++) {
				int k = s.nextInt();
				if(k%2!=0) {
					arr=ob.make_zero(i, j, arr);
				}
			}

		}
		ob.print_arr(arr);

	}
	}


import java.uitl.*;
import java.io.*;
public class solution{
    public static void main(String [] args){
        Scanner sc=new Scanner(System.in);
        int [][]temp=new int[3][3];
        for(int i=0;i<3;i++){
            for(int j=0;j<3;j++){
                int x=sc.nextInt();
                if(i-1>=0) temp[i-1][j]+=x;
                if(i+1<3) temp[i+1][j]+=x;
                if(j+1<3) temp[i][j+1]+=x;
                if(j-1>0) temp[i][j-1]+=x;
            }
        }
        int [][]res=new int[3][3];
        for(int i=0;i<3;i++){
            for(int j=0;j<3;j++){
                if(temp[i][j]%2==0) System.out.println("1");
                else System.out.print("0");
            }
            System.out.println();
        }
    }
}


import java.util.*;
 public  class Solution{
     public static void main(String args[]){
     Scanner s=new Scanner(System.in);
     String[] str=new String[21];
     int n=s.nextInt();
     str[0]="zero";
     str[1]="one";
     str[2]="two";
     str[3]="three";
     str[4]="four";
     str[5]="five";
     str[6]="six";
     str[7]="seven";
     str[8]="eight";
     str[9]="nine";

     str[10]="ten";
     str[11]="eleven";
     str[12]="twelve";
     str[13]="thirteen";

     str[14]="fourteen";
     str[15]="fifteen";
     str[16]="sixteen";

     str[17]="seventeen";
     str[18]="eighteen";
     str[19]="ninteen";
     str[20]="twenty";
     if(n<=20){
          System.out.println(str[n]);
     }
     else{
          int a=n/10;
          int b=n%10;
          Stirng str1="";
          if(a==2){
               str1+="twenty";
          }
          if(a==3){
               str1+="thirty";
          }
          if(a==4){
               str1+="forty";
          }
          if(a==5){
               str1+="fifty";
          }
          if(a==6){
               str1+="sixty";
          }
          if(a==7){
               str1+="seventy";
          }
          if(a=8){
               str1+="eighty";
          }
          if(a=9){
               str1+="ninty";
          }
          if(b!=0){
               str1+="-"+str[b];
          }

          System.out.println(str1);

     }

     }

   }


public class Main {

	public static void main(String[] args) {

		String[] arrOneToTen = { "zero", "one", "two", "three", "four", "five",
				"six", "seven", "eight", "nine", "ten", "eleven", "twelve",
				"thirteen", "fourteen", "fifteen", "sixteen", "sevnteen",
				"eighteen", "nineteen" };

		String[] twoDigits = { "", "", "twenty", "thirty", "fourty", "fifty",
				"sixty", "seventy", "eighty", "ninety" };

		Scanner input = new Scanner(System.in);
		while (input.hasNext()) {

			int number = input.nextInt();

			if (number >= 0 && number < 100) {

				if (number < 20) {
					System.out.println(arrOneToTen[number]);
				} else {
					char[] str = String.valueOf(number).toCharArray();
					int firstVal = Integer.parseInt(String.valueOf(str[0]));
					int secondVal = Integer.parseInt(String.valueOf(str[1]));
					if (secondVal > 0) {
						System.out.println(twoDigits[firstVal] + "-"
								+ arrOneToTen[secondVal]);
					} else {
						System.out.println(twoDigits[firstVal]);
					}

				}

			}

		}

	}
}


import java.util.Scanner;

public class file
{
public static void main(String[] args)
{Scanner sc=new Scanner(System.in);int a,b,t;
t=sc.nextInt();
{
 String arr[]={"","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"};
String arr2[]={"","twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"};
if(t<20)
System.out.println(arr[t]);
else{
a=t%10;b=t/10;
if(a==0){System.out.println(arr2[b-1]);}
else
{System.out.println(arr2[b-1]+"-"+arr[a]);}}}}}2


mport java.util.Scanner;

public class Main {

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

    }

}


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

public class CodeforcesProblem1011A {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        java.math.BigInteger n = sc.nextBigInteger();
        java.math.BigInteger k = sc.nextBigInteger();
        char[] s = sc.next().toCharArray();
        Arrays.sort(s);
        java.math.BigInteger weight = java.math.BigInteger.valueOf(s[0]).subtract(java.math.BigInteger.valueOf(96));
        k = k.subtract(java.math.BigInteger.ONE);
        char last = s[0];
        for (java.math.BigInteger i = java.math.BigInteger.ONE; i.compareTo(java.math.BigInteger.valueOf(s.length)) < 0; i = i.add(java.math.BigInteger.ONE)) {
            if (k.equals(java.math.BigInteger.ZERO)) {
                System.out.println(weight);
                return;
            }
            if (java.math.BigInteger.valueOf(s[i.intValue()]).compareTo(java.math.BigInteger.valueOf(last).add(java.math.BigInteger.TWO)) >= 0) {
                weight = weight.add(java.math.BigInteger.valueOf(s[i.intValue()]).subtract(java.math.BigInteger.valueOf(96)));
                last = java.math.BigInteger.valueOf(s[i.intValue()]).intValue();
                k = k.subtract(java.math.BigInteger.ONE);
            }
        }
        if (!k.equals(java.math.BigInteger.ZERO)) {
            System.out.println(-1);
            return;
        }
        System.out.println(weight);
    }
}


package interviewbit;

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

/**
 * Created by priyankvex on 26/7/18.
 */
public class Main {

    public static void main(String[] args) {

        BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in));

        StringTokenizer st = null;
        try {
            st = new StringTokenizer(br.readLine());
            int n = Integer.parseInt(st.nextToken());
            int k = Integer.parseInt(st.nextToken());
            st = new StringTokenizer(br.readLine());
            String s = String.valueOf(st.nextToken());

            int result = new Stages().test(s, k, n);

            System.out.println(result);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private static int test(String s, int k, int n){
        char[] c = s.toCharArray();
        Arrays.sort(c);
        int sum = 0;
        char last = '-';
        int stages = 0;

        for (int i = 0; i < n; i++){
            char curr = c[i];
            if (last == '-'){
                last = curr;
                sum = (int)curr - 96;
                stages++;
                continue;
            }

            if (curr <= last + 1){
                continue;
            }

            last = curr;
            sum = sum + ((int)curr - 96);
            stages++;

            if (stages == k){
                return sum;
            }
        }
        return -1;
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.sql.Array;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
import java.util.List.*;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.stream.Collector;
import java.util.stream.Collectors;

/*import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.*;
*/
public class Main {
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		// ApplicationContext con = new
		// ClassPathXmlApplicationContext("bean.xml");
		FastReader in = new FastReader();
		StringBuilder out = new StringBuilder();
		int n = in.nextInt();
		int k = in.nextInt();
		boolean [] ch = new boolean[27];
		int sum=0;
		if(n==k){
			System.out.println(-1);
			return;
		}
		char [] arr = in.next().toCharArray();
		Arrays.sort(arr);
		for (int i = 0; i < arr.length; i++) {
			ch[arr[i]-'a'+1]=true;
		}
		int j =0;
		for (int i = 1; i < ch.length; i++) {

			if(ch[i]&&!ch[i-1]){
				sum+=i;
				j++;
			}
			if(j==k){
				break;
			}

		}
		if(j<k){
			System.out.println(-1);
		}else{
			System.out.println(sum);
		}

}

class FastReader {

	BufferedReader br;
	StringTokenizer st;

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

	}

	public String next() {
		while (st == null || !st.hasMoreElements()) {
			try {
				st = new StringTokenizer(br.readLine());

			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return st.nextToken();
	}

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

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

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

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


import java.util.*;
public class stages
{
public static void main(String args[])
{
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt();
    char ar[]=new char[n];
    String st=sc.next();
    for(int i=0;i<n;i++)
    {
        ar[i]=st.charAt(i);
    }
    Arrays.sort(ar);
    //for(char ah:ar)
   // System.out.println(ah);
    char c=ar[0];
int sum=(int)c-96;
 k=k-1;
    if((k>0)&&(k<=n)&&(n>=k)&&(n<=50))
    {

        for(int i=1;i<n;i++)
        {
            if(((int)ar[i]-(int)c)>1)
            {
                c=ar[i];
                sum=sum+((int)c-96);

                k=k-1;
            //    System.out.print("sum "+sum+"  and c is "+c+" and k is "+k);
            }
            if(k==0)
            break;
    }
}
else
sum=-1;
if(k>0)
sum=-1;

System.out.println(sum);
}
}
import java.util.*;
public class stages
{
public static void main(String args[])
{
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt();
    char ar[]=new char[n];
    String st=sc.next();
    for(int i=0;i<n;i++)
    {
        ar[i]=st.charAt(i);
    }
    Arrays.sort(ar);
    //for(char ah:ar)
   // System.out.println(ah);
    char c=ar[0];
int sum=(int)c-96;
 k=k-1;
    if((k>0)&&(k<=n)&&(n>=k)&&(n<=50))
    {

        for(int i=1;i<n;i++)
        {
            if(((int)ar[i]-(int)c)>1)
            {
                c=ar[i];
                sum=sum+((int)c-96);

                k=k-1;
            //    System.out.print("sum "+sum+"  and c is "+c+" and k is "+k);
            }
            if(k==0)
            break;
    }
}
else
sum=-1;
if(k>0)
sum=-1;

System.out.println(sum);
}
}
import java.util.*;
public class stages
{
public static void main(String args[])
{
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt();
    char ar[]=new char[n];
    String st=sc.next();
    for(int i=0;i<n;i++)
    {
        ar[i]=st.charAt(i);
    }
    Arrays.sort(ar);
    //for(char ah:ar)
   // System.out.println(ah);
    char c=ar[0];
int sum=(int)c-96;
 k=k-1;
    if((k>0)&&(k<=n)&&(n>=k)&&(n<=50))
    {

        for(int i=1;i<n;i++)
        {
            if(((int)ar[i]-(int)c)>1)
            {
                c=ar[i];
                sum=sum+((int)c-96);

                k=k-1;
            //    System.out.print("sum "+sum+"  and c is "+c+" and k is "+k);
            }
            if(k==0)
            break;
    }
}
else
sum=-1;
if(k>0)
sum=-1;

System.out.println(sum);
}
}


import java.util.Scanner;
public class BeautifulMatrix{
    private static final Scanner sc = new Scanner(System.in);
    public static void main(String[] args){
        int x, y;
        int[][] a = new int[5][5];
        for(int i = 0; i < 5; i++){
            for(int j = 0; j < 5; j++){
                a[i][j] = sc.nextInt();
                if(a[i][j] == 1){
                    x = i;
                    y = j;
                    break;
                }
            }
        }
        System.out.println((Math.abs(x - 2) + Math.abs(y - 2)));
    }
}


public class CodeForces {

	public static void main(String[] args) {
		int a, b = 0, n = 0;
		Scanner sc = new Scanner(System.in);
		for (a = 0; a < 5 && n == 0; a++) {
			for (b = 0; b < 5 && n == 0; b++) {
				n = sc.nextInt();
			}
		}
		if (a > 2) {
			a = a - 2;
		} else {
			a = 2 - a;
		}
		if (b > 2) {
			b = b - 2;
		} else {
			b = 2 - b;
		}
		System.out.println(a + b);
	}
}


public class Main {
	public static void main1 (String[] args) {
	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    for (int i = 0; i <= 4; i++) {
        for (int j =0; j<=4; j++) {
            String x = reader.readLine();
            if (x.equals("1")) {
                System.out.println(Math.abs(2 - i)+Math.abs(2 - j));
            }
        }
    }
}


import java.util.*;
public class beau
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        int i,j,k,k1=0,k2=0;
        int a[][] = new int[5][5];
        for(i=0;i<5;i++)
            for(j=0;j<5;j++)
                a[i][j] = sc.nextInt();
        for(i=0;i<5;i++)
        {
            for(j=0;j<5;j++)
            {
                if(a[i][j]==1)
                {
                    k1=i;
                    k2=j;
                    break;
                }
            }
            if(k1 && k2)
            break;
        }

        k = Math.abs(2-k1) + Math.abs(2-k2);
        System.out.println(k);
    }
}


import java.util.*;

public class FindFactors{

	  int[] factors = new int[100 * 1001];
	  int pos = 0;

	  public int[] calFactors(int n){
            while(n%2 == 0){
            	n/=2;
            	factors[pos] = 2;
            	pos++;
            }

            for(int i=3;i*i<=n;i+=2){
            	while(n%i == 0){
            		n/=i;
            		factors[pos] = i;
            		pos++;
            	}
            }
            if(n > 1) factors[pos] = n;

            return factors;
	  }
}
public class FirstCode{
      public static void main(String[] args){
      	int n, k;
      	Scanner sc = new Scanner(System.in);
      	n = sc.nextInt();
      	k = sc.nextInt();

        FindFactors findFact = new FindFactors();
        int[] arr = findFact.calFactors(n);
        int len = 0;
        while(arr[len] != 0) len++;

        if(len < k) System.out.println("-1");
        else{
        	for(int i=0;i<k-1;i++){
        		System.out.print(arr[i]+" ");
        	}
        	int product = 1;
            for(int i=k-1;i<len;i++) product *= arr[i];
            System.out.print(product);
        }
    }
}


import java.util.*;

public class FindFactors{

	  int[] factors = new int[100 * 1001];
	  int pos = 0;

	  public int[] calFactors(int n){
            while(n%2 == 0){
            	n/=2;
            	factors[pos] = 2;
            	pos++;
            }

            for(int i=3;i*i<=n;i+=2){
            	while(n%i == 0){
            		n/=i;
            		factors[pos] = i;
            		pos++;
            	}
            }
            if(n > 1) factors[pos] = n;

            return factors;
	  }
}
public class Factor{
      public static void main(String[] args){
      	int n, k;
      	Scanner sc = new Scanner(System.in);
      	n = sc.nextInt();
      	k = sc.nextInt();

        FindFactors findFact = new FindFactors();
        int[] arr = findFact.calFactors(n);
        int len = 0;
        while(arr[len] != 0) len++;

        if(len < k) System.out.println("-1");
        else{
        	for(int i=0;i<k-1;i++){
        		System.out.print(arr[i]+" ");
        	}
        	int product = 1;
            for(int i=k-1;i<len;i++) product *= arr[i];
            System.out.print(product);
        }
    }
}


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

//SolverToBe
//Mohammad Abulawi
public class KFactorization {

    static ArrayList<Integer> result;
    static ArrayList<Integer> primes;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        primes = new ArrayList();
        int n = in.nextInt();
        int k = in.nextInt();
        for (int i = 2; i * i <= n; i++) {//stores all primes from 2 to square root of n
            if (isPrime(i)) {
                primes.add(i);
            }
        }
        result = new ArrayList();
        factors(n, k);
        if (result.size() < k) {
            System.out.println("-1");
        } else {
            for (int i = 0; i < result.size(); i++) {
                System.out.print(result.get(i) + " ");
            }
            System.out.printf("\n");

        }

    }

    public static boolean isPrime(int t) {
        for (int i = 2; i * i <= t; ++i) {
            if (t % i == 0) {
                return false;
            }
        }
        return true;
    }

    public static void factors(int n, int k) {
        if (k <= 0) {
            return;
        }
        if (k == 1) {
            if (n != 1) {
                result.add(n);
            }
            return;

        }

        for (int i = 0; i < primes.size(); i++) {
            int num = primes.get(i);
            if (n % num == 0) {
                result.add(num);
                k--;
                factors(n / num, k);
                break;
            }
        }

    }

}

k-Factorization.txt
Displaying k-Factorization.txt.


import java.io.*;
import java.util.*;
public class Main{
	Arbol arbol;
	HashMap <String,String> map;
	ArrayList<Integer> divisores;
	public static void main(String[] args)throws IOException {
		Main principal = new Main();
		principal.input();
	}

	public void input() throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String cad = br.readLine();
		divisores = new ArrayList();
		iniCriba();
		StringTokenizer st = new StringTokenizer(cad);
		int n = Integer.parseInt(st.nextToken()), k= Integer.parseInt(st.nextToken());
		System.out.println(solve(n, k - 1));
	}

	private void iniCriba(){
		boolean [] criba = new boolean[100001];
		int i = 2;
		criba[0] = true;
		criba[1] = true;
		while (i*i <= 100001) {
			if (!criba[i]) {
				for (int j = i; j < 100001; j+=i) {
					criba[j] = true;
				}
				criba[i] = false;
			}
			i++;
		}
		for (int j = 0; j < 100001; j++) {
			if (!criba[j]) {
				divisores.add(j);
			}
		}
	}
	private String solve(int n, int k){
		int i = 0, valor, acum = 1;
		String answer = "", mult = "";
		int raiz = (int)Math.sqrt(n);
		valor = divisores.get(i);

		while (n != 1 && valor <= raiz) {
			i++;
			while (n%valor == 0) {
				n/=valor;
				if (k == 0) {
					acum = acum*valor;
				} else {
					answer = answer + valor + " " ;
					k--;
				}
			}
			valor = divisores.get(i);
		}
		if (acum != 1) {
			mult = ""+acum;
		}
		if (k != 0) {
			answer = "-1";
			mult = "";
		}
		return answer+mult;
	}

}


public class Main {
    static Map <Character, String> map = new HashMap<Character, String>();
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        map.put('0', "O-|-OOOO");
        map.put('1', "O-|O-OOO");
        map.put('2', "O-|OO-OO");
        map.put('3', "O-|OOO-O");
        map.put('4', "O-|OOOO-");
        map.put('5', "-O|-OOOO");
        map.put('6', "-O|O-OOO");
        map.put('7', "-O|OO-OO");
        map.put('8', "-O|OOO-O");
        map.put('9', "-O|OOOO-");
        String temp = scanner.nextLine();
        for(int i = temp.length() - 1; i >= 0; i --){
            System.out.println(map.get(temp.charAt(i)));
        }
    }
}


import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
import java.util.ArrayList;
import java.util.Collections;
import java.lang.Math;

public class Lo {
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      while(n>0){
          int x = n%10;
          n=n/10;
          if(x<5){
              System.out.print("O-|");
              for(i = 0; i<5; i++){
                  if(i==x){
                    System.out.print('-');
                  }
                  else{
                      System.out.print('O');
                  }
              }
          }
          else{
              System.out.print("-O|");
              for(i = 0; i<5; i++){
                  if(i%5==x){
                    System.out.print('-');
                  }
                  else{
                      System.out.print('O');
                  }
              }
          }
          System.out.println();
      }
    }
}


//package codeforces;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;

public class A {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter writer = new PrintWriter(System.out);

    A() throws IOException {
//        reader = new BufferedReader(new FileReader("input.txt"));
//        writer = new PrintWriter(new FileWriter("output.txt"));
    }

    StringTokenizer stringTokenizer;

    String next() throws IOException {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            stringTokenizer = new StringTokenizer(reader.readLine());
        }
        return stringTokenizer.nextToken();
    }

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

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

    final int MOD = 1000 * 1000 * 1000 + 7;

    int sum(int a, int b) {
        a += b;
        return a >= MOD ? a - MOD : a;
    }

    int product(int a, int b) {
        return (int) (1l * a * b % MOD);
    }

    int pow(int x, int k) {
        int result = 1;
        while (k > 0) {
            if (k % 2 == 1) {
                result = product(result, x);
            }
            x = product(x, x);
            k /= 2;
        }
        return result;
    }

    int inv(int x) {
        return pow(x, MOD - 2);
    }

    void solve() throws IOException {
        boolean isZero = true;
        for(int n = nextInt(); n > 0; n /= 10) {
            isZero = false;
            int x = n % 10;
            if(x >= 5) {
                writer.print("-O|");
                x -= 5;
            } else {
                writer.print("O-|");
            }
            for(int i = 0; i < x; i++) {
                writer.print("O");
            }
            writer.print("-");
            for(int i = 0; i < 4 - x; i++) {
                writer.print("O");
            }
            writer.println();
        }
        if(isZero) {
            writer.println("O-|-OOOO")
        }
        writer.close();
    }

    public static void main(String[] args) throws IOException {
        new A().solve();
    }
}


public class Main {

	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);

		StringBuilder ss = new StringBuilder(input.nextLine());
		int n =ss.length();

		for (int i=1 ; i<=n ; i++){
			int x =Integer.parseInt(Character.toString(ss.charAt(ss.length()-1)));
			switch (x) {
			case 0:System.out.println("O-|-OOOO");break;
			case 1:System.out.println("O-|O-OOO");break;
			case 2:System.out.println("O-|OO-OO");break;
			case 3:System.out.println("O-|OOO-O");break;
			case 4:System.out.println("O-|OOOO-");break;
			case 5:System.out.println("-O|-OOOO");break;
			case 6:System.out.println("-O|O-OOO");break;
			case 7:System.out.println("-O|OO-OO");break;
			case 8:System.out.println("-O|OOO-O");break;
			case 9:System.out.println("-O|OOOO-");break;
			default :
			System.out.println("awsf");
			}
			if (ss.length()>1)
			ss.append(ss.substring(0, ss.length()-1));

		}

	}

	}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import static learning.TryB.w;

public class Try
{

    static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;

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

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

		public int ni() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nl() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

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

		public String rs() {
			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 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 boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

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

	}

    static long mod=1000000007;
    static BigInteger bigInteger = new BigInteger("1000000007");
    static int n = (int)1e6;
    static boolean[] prime;
    static ArrayList<Integer> as;
    static HashSet<Long> hs;
    static void sieve() {
			Arrays.fill(prime	, true);
			prime[0] = prime[1] = false;
			for(int i = 2 ; i * i <= n ; ++i) {
				if(prime[i]) {
					for(int k = i * i; k< n ; k+=i) {
						prime[k] = false;
					}
				}
			}

		}
		static PrintWriter w = new PrintWriter(System.out);
 static char [][]sol;
 static int t2 = 0;
         static int t3 = 0;
    public static void main(String[] args)
    {

        InputReader sc = new InputReader(System.in);
        //PrintWriter w = new PrintWriter(System.out);

        prime  = new boolean[n + 1];
		sieve();
		prime[1] = false;

		/*
		as = new ArrayList<>();
		for(int i=2;i<=1000000;i++)
		{
		    if(prime[i])
		    as.add(i);
		}
		*/

       /*

	long a = sc.nl();

            BigInteger ans = new BigInteger("1");
            for (long i = 1; i < Math.sqrt(a); i++) {
                if (a % i == 0) {
                    if (a / i == i) {
                        ans = ans.multiply(BigInteger.valueOf(phi(i)));

                    } else {
                        ans = ans.multiply(BigInteger.valueOf(phi(i)));
                        ans = ans.multiply(BigInteger.valueOf(phi(a / i)));

                    }

                }
            }
            w.println(ans.mod(bigInteger));
            */

         // MergeSort ob = new MergeSort();
       // ob.sort(arr, 0, arr.length-1);

    // Student []st = new Student[x];
   // st[i] = new Student(i,d[i]);
     //Arrays.sort(st,(p,q)->p.diff-q.diff);

      long x = sc.nl();
  hs = new HashSet<>();
  primeFactors(x);
  if(x==1)
      w.println("1");
  else
  {
      if(isprime(x))
          w.println(2 + hs.size()-1);
      else
          w.println(2+hs.size());
  }

   w.close();

    }
 static int digit(long x)
 {
     int p = 0;
     while(x > 0)
     {
         x /= 10;
         p++;
     }
     return p;
 }

    public static String f(String a,int b){
        if(b==0)
           return "";
       else if(b==1)
            return a;
        else{
            if(b%2==0)
               return f(a,b/2)+f(a,b/2);
            else
                return a+f(a,b/2)+f(a,b/2);
        }

    }

     static class Student
    {

        int first;
        int sec;
        Student(int first,int sec)
        {
            this.first = first;
            this.sec = sec;

        }

    }

     public static long modMultiply(long one, long two) {

		return (one % mod * two % mod) % mod;
	}
    static long fx(int m)
    {
        long re = 0;
        for(int i=1;i<=m;i++)
        {
            re += (long) (i / gcd(i,m));
        }
        return re;
    }
     static long gcd(long a, long b)
    {
	 if (a == 0)
	  return b;

	return gcd(b%a, a);
    }

     static long phi(long nx)
    {
        // Initialize result as n
        double result = nx;

        // Consider all prime factors of n and for
        // every prime factor p, multiply result
        // with (1 - 1/p)
        for (int p = 0; as.get(p) * as.get(p) <= nx; ++p)
        {
            // Check if p is a prime factor.
            if (nx % as.get(p) == 0)
            {
                // If yes, then update n and result
                while (nx % as.get(p) == 0)
                    nx /= as.get(p);
                result *= (1.0 - (1.0 / (double) as.get(p)));
            }
        }

        // If n has a prime factor greater than sqrt(n)
        // (There can be at-most one such prime factor)
        if (nx > 1)
            result *= (1.0 - (1.0 / (double) nx));

        return (long)result;

        //return(phi((long)result,k-1));

    }

    public static void primeFactors(long n)
    {
        //hs = new HashSet<>();

        // Print the number of 2s that divide n
        while (n%2==0)
        {

            hs.add((long)2);
            //System.out.print(2 + " ");
            n /= 2;

        }

        // n must be odd at this point.  So we can
        // skip one element (Note i = i +2)
        for (long i = 3; i <= Math.sqrt(n); i+= 2)
        {
            // While i divides n, print i and divide n
            while (n%i == 0)
            {

               // System.out.print(i + " ");

                hs.add(i);
                n /= i;

            }

        }

        // This condition is to handle the case whien
        // n is a prime number greater than 2
        if (n >= 2)
        {

            hs.add(n);
        }

    }
    static int digitsum(int x)

    {

        int sum = 0;
        while(x > 0)
        {
            int temp = x % 10;
            sum += temp;
            x /= 10;
        }
        return sum;

    }
    static int countDivisors(int n)
    {
        int cnt = 0;
        for (int i = 1; i*i <=n; i++)
        {
             if (n % i == 0 && i<=1000000)
             {
                // If divisors are equal,
                // count only one
                if (n / i == i)
                   cnt++;

                else // Otherwise count both
                    cnt = cnt + 2;
             }
         }
        return cnt;
    }

    static boolean isprime(long n)
    {

    if(n == 2)
        return true;
    if(n == 3)
        return true;
    if(n % 2 == 0)
        return false;
    if(n % 3 == 0)
        return false;

    long i = 5;
   long w = 2;

    while(i * i <= n)
    {
        if(n % i == 0)
            return false;

        i += w;
        w = 6 - w;
    }

    return true;
    }

    static long log2(long value) {
    return Long.SIZE-Long.numberOfLeadingZeros(value);
}

    static boolean binarysearch(int []arr,int p,int n)
    {
        //ArrayList<Integer> as = new ArrayList<>();
        //as.addAll(0,at);
        //Collections.sort(as);
        boolean re = false;
        int st = 0;
        int end = n-1;

        while(st <= end)
        {
            int mid = st + (end-st)/2;

            if(p > arr[mid])
            {
                st = mid+1;

            }
            else if(p < arr[mid])
            {
                end = mid-1;

            }
            else if(p == arr[mid])
            {

            re = true;
            break;
            }

        }
         return re;

    }

    /* Java program for Merge Sort */
static class MergeSort
{
    // Merges two subarrays of arr[].
    // First subarray is arr[l..m]
    // Second subarray is arr[m+1..r]
    void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }

    /* A utility function to print array of size n */

}

    public static int ip(String s){
		return Integer.parseInt(s);
	}
	 public static String ips(int s){
		return Integer.toString(s);
	}

}


public class Test
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		long b = sc.nextLong();
		sc.close();
		if(b==1) {
			System.out.println(1);
			return;
		}
		long ans = 0;
		for(long i = 1; i <= ((int)Math.sqrt(b)+1); i++) {
			if(b%i==0) ans++;
		}
		ans *= 2;
		System.out.println(ans);
	}
}


import java.util.*;
import java.util.Scanner;

public class LCM
	{

	public static long Factors(long num)

	{

	 long r = 0;
	 boolean perfectSquare = false;

	for (long i = 1; i <= (long) Math.sqrt(num); i++)
	{
		if (n % i == 0) {
			r++;
		}
		if (i*i == num) {
			perfectSquare = true;
		}

		if (perfectSquare) {
			return 2 * r - 1;
		}
		return 2 * r;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			long b = sc.nextLong();
			System.out.println(Factors(b));
	}
    }
}


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

import org.houdaoul.ds.TrieBinCus;
import org.houdaoul.ds.TrieCus;

public class Main {

	void solve(Scanner in, PrintWriter out) {
		int b = in.nextInt();
		int n = 1;
		int res = 0;

		while (n <= b) {
			if (b % n == 0) {
				res++;
			}
			n++;
		}
		System.out.println(res);
	}

	public static void main(String[] args) {
		try (Scanner in = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out)) {
			new Main().solve(in, out);
		}
	}
}


import java.util.Scanner;

public class q366A {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt(); // money
		int[][] arr = new int[4][4];

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 4; j++) {
				arr[i][j] = s.nextInt();
			}
			if (arr[i][0] + arr[i][2] <= n) {
				if (arr[i][0] + arr[i][2] < n) {
					if (arr[i][0] <= arr[i][2]) {
						arr[i][0] = n - arr[i][2];
					} else
						arr[i][2] = n - arr[i][0];
				}
				System.out.println((i + 1) + " " + arr[i][0] + " " + arr[i][2]);
				System.exit(42);
			} else if (arr[i][0] + arr[i][3] <= n) {
				if (arr[i][0] + arr[i][3] < n) {
					if (arr[i][0] <= arr[i][3]) {
						arr[i][0] = n - arr[i][3];
					} else
						arr[i][3] = n - arr[i][0];
				}
				System.out.println((i + 1) + " " + arr[i][0] + " " + arr[i][3]);
				System.exit(42);
			} else if (arr[i][1] + arr[i][3] <= n) {
				if (arr[i][1] + arr[i][3] < n) {
					if (arr[i][1] <= arr[i][3]) {
						arr[i][1] = n - arr[i][3];
					} else
						arr[i][3] = n - arr[i][1];
				}
				System.out.println((i + 1) + " " + arr[i][1] + " " + arr[i][3]);
				System.exit(42);
			} else if (arr[i][1] + arr[i][2] <= n) {
				if (arr[i][1] + arr[i][2] < n) {
					if (arr[i][1] <= arr[i][2]) {
						arr[i][1] = n - arr[i][2];
					} else
						arr[i][2] = n - arr[i][1];
				}
				System.out.println((i + 1) + " " + arr[i][1] + " " + arr[i][2]);
				System.exit(42);
			}
		}
		System.out.println("-1");
	}
}


import javax.swing.*;
import java.io.*;
import java.util.Locale;
import java.util.StringTokenizer;

public class div2_214_A implements Runnable {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

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

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

    }

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

        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");
        }
    }

    long timeBegin, timeEnd;

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

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();

            init();
            solve();

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

    String readString() throws IOException {

        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    String readString(String s) throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine(), s + "\n \t");
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

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

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

    void solve() throws IOException {
        int sum_max=readInt();
       // System.out.println(sum_max);
        for(int i=0;i<4;i++){
            int a=readInt(),b=readInt();
            if(a+b<=sum_max){
                out.println((i+1)+" "+a+" "+(sum_max-a));
            }
        }

    }
}


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

public class D
{
	public static class Edge implements Comparable<Edge>
	{
		int index,to, l, r;
		int pred;
		public Edge(int to, int l ,int r)
		{
			this.to = to;
			this.l = l;
			this.r = r;
		}

		public int compareTo(Edge e)
		{
			return (e.r - e.l+index) - (r-l+index);
		}

		public int hashCode()
		{
			return to*31*31 + l*31 + r;
		}

		public equals(Object o)
		{
			Edge e = (Edge)o;
			return e.to==to && l==o.l && r==o.r;
		}
	}
	public static void main(String args[]) throws Exception
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());

		int high[] = new int[n];
		int lo[] = new int[n];
		Arrays.fill(high,Integer.MIN_VALUE);
		Arrays.fill(lo,Integer.MAX_VALUE);

		ArrayList<Edge> e[] = new ArrayList[n];
		for(int i = 0; i < n; i++)
			e[i] = new ArrayList<Edge>();

		for(int i = 0; i < m; i++)
		{
			st = new StringTokenizer(br.readLine());
			int a = Integer.parseInt(st.nextToken())-1;
			int b = Integer.parseInt(st.nextToken())-1;
			int l = Integer.parseInt(st.nextToken());
			int r = Integer.parseInt(st.nextToken());
			e[a].add(new Edge(b,l,r));
			if(a!=b) e[b].add(new Edge(a,l,r));
		}

		PriorityQueue<Edge> pq = new PriorityQueue<Edge>();
		int ans = 0;
		pq.offer(new Edge(0,-1,1000000));
		HashSet<Edge> hs = new HashSet<Edge>();

		while(!pq.isEmpty())
		{
			Edge ed = pq.poll();
			if(ed.to==n-1)
			{
				ans = ed.r - ed.l + 1;
				break;
			}
			if(hs.contains(ed)) continue;
			hs.add(ed);
			for(Edge x: e[ed.to])
			{
				if(x.to==ed.to || x.to==ed.pred)
					continue;
				if(x.l > ed.r || x.r < ed.l)
					continue;
				pq.offer(new Edge(x.to,Math.max(x.l,ed.l),Math.min(x.r,ed.r));
			}
		}
		System.out.println(ans==0?"Nice work, Dima!":ans);

	}
}


import java.util.Scanner;

public class Problem1 {
    public static int num = -1;
    public static int ans1, ans2;
    public static int a[][];
    public static void main(String[] args){
        Problem1 program = new Problem1();
        program.go();
        if(num == -1) System.out.println(-1);
        else{
            num++;
            System.out.println(num + " " + ans1 + " " + ans2);
        }
    }

    public void go(){
        Scanner s = new Scanner(System.in);
        int sum;

        sum = s.nextInt();

        int a,b,c,d;

        for(int i=0; i<4; i++){
            a = s.nextInt();
            b = s.nextInt();
            c = s.nextInt();
            d = s.nextInt();

            if(a+c <= sum){
                if(a+c == sum){
                    num = i;
                    ans1 = a;
                    ans2 = c;
                    break;
                }else{
                    num = i;
                    ans1 = a;
                    ans2 = sum - a;
                }
            }else if(a+d <= sum){
                if(a+d == sum){
                    num = i;
                    ans1 = a;
                    ans2 = b;
                    break;
                }else{
                    num = i;
                    ans1 = a;
                    ans2 = sum - a;
                }
            }else if(b+c <= sum){
                if(b+c == sum){
                    num = i;
                    ans1 = b;
                    ans2 = c;
                    break;
                }else{
                    num = i;
                    ans1 = b;
                    ans2 = sum - b;
                }
            }else if(b+d <= num){
                if(b+d == num){
                    num = i;
                    ans1 = b;
                    ans2 = d;
                    break;
                }else{
                    num = i;
                    ans1 = b;
                    ans2 = sum - b;
                }
            }
        }

    }

}


import java.util.*;
public class Soft_Drinking {

	public static void main(String[] args)
	{
	    Scanner sc = new Scanner(System.in);
	     int n =sc.nextInt();
	     int k =sc.nextInt();
	     int l =sc.nextInt();
	     int c =sc.nextInt();
	     int d =sc.nextInt();
	     int p =sc.nextInt();
	     int nl =sc.nextInt();
	     int np =sc.nextInt();
	     System.out.println(Math.min(Math.min( (k*l)/n, c*d ), p/np]) /n);
	}
}


import java.io.*;
import java.util.*;
public class SumOfDigits
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String[] s=br.readLine().split(" ");
        int n=Integer.parseInt(s[0]);
        int k=Integer.parseInt(s[1]);
        int l=Integer.parseInt(s[2]);
        int c=Integer.parseInt(s[3]);
        int d=Integer.parseInt(s[4]);
        int p=Integer.parseInt(s[5]);
        int nl=Integer.parseInt(s[6]);
        int np=Integer.parseInt(s[7]);
        int tl=(k*l)/n;
        int cd=c*d;
        int pnp=p/np;
        int ans=Math.min(tl,cd,pnp)/nl;
        System.out.println(ans);
    }
}


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

        for(int i=0; i<8; i++)
            a[i] = sc.nextInt();

        System.out.println(Math.min(Math.min(a[1]*a[2]/a[6], a[3]*a[4]), a[5]/a[7])/a[0]);
    }
}


public class SoftDrinking {

	int getNumToasts(int n, int k, int l, int c, int d, int p, int nl, int np) {
		int toasts = (k * l) / nl;
		toasts = Math.min(toasts, c * d);
		toasts = Math.min(toasts, p / np);

		return toasts / n;
	}

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String s = in.readLine();
		in.close();

		String[] t = s.split(" ");
		return getNumToasts
			Integer.parseInt(t[0]),
			Integer.parseInt(t[1]),
			Integer.parseInt(t[2]),
			Integer.parseInt(t[3]),
			Integer.parseInt(t[4]),
			Integer.parseInt(t[5]),
			Integer.parseInt(t[6]),
			Integer.parseInt(t[7])
		);
	}
}


import java.util.Scanner;

public class ttttt {

    public static void main(String[] args) throws ClassNotFoundException {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int result;

        int temp1 = findBest(a, b, n);
        int temp2 = findBest(b, c, n);
        int temp3 = findBest(a, c, n);

        result = Math.max(Math.max(temp1, temp2), temp3);

        System.out.println(result);
    }

    private static int findBest(int first, int second, int sum) {
        for (int i = 0; i <= sum ; i++) {
            for (int j = 0; j <= sum ;j++) {
                if ((first * i ) + (second * j) == sum) {
                    return i + j;
                }
            }
        }
    }

}


//coderadi
import java.io.*;
import java.util.*;
public class A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] val = new int[3];
		for(int i=0; i<3; i++){
			val[i] = sc.nextInt();
		}
		Arrays.sort(val);
		int[] temp = new int[n+1];

		for(int i=1; i<n+1; i++){
			int aux = -1;
			for(int j = 0; j<val; j++){
				if(val[j] <= i){
					if(temp[i - val[j]] != -1)
						aux = Math.max(temp[i - val[j]] + 1, aux);
				}
			}
			temp[i] = aux;
		}

		System.out.println(((temp[n] == -1)?0:temp[n]));
	}
}


import java.util.*;
public class Main{
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
int n=in.nextInt();
int a=in.nextInt();
int b=in.nextInt();
int c=in.nextInt();
for(int x=0;a*x<=n;x++)
{
for(int y=0;a*x+b*y<=n;y++)
{
int z=(n-a*x-b*y)/c;
sum+=x+y+z;
max=Math.max(sum,max);
}
}
System.out.println(max);
}
}


import java.util.Scanner;

public class CutRibbon {
	public static void main(String[] args) {
		Scanner keyboard = new Scanner(System.in);
		int n = keyboard.nextInt();
		int[] arr = new int[3];
		arr[0] = keyboard.nextInt();
		arr[1] = keyboard.nextInt();
		arr[2] = keyboard.nextInt();
		System.out.println(cut(arr, n));;

	}

	public static int cut(int[] arr, int n) {
		int small = 999999;
		int mid = 999999;
		int large = 999999;

		for(int i = 0; i < 3; i++) {
			if (arr[i] < small) {
				large = mid;
				mid = small;
				small = arr[i];
			}
			else if (arr[i] < mid) {
				large = mid;
				mid = arr[i];
			}
			else {
				large = arr[i];
			}
		}

		int count = 0;
		int size = 0;

		count = n / small;
		size = small * count;

		if (size == n) {
			return count;
		}

		while (count != 0) {
			count--;
			size -= small;
			if ((n - size) % mid == 0) {
				return count + (n - size) / mid;
			}
			else if ((n - size) % large == 0) {

				return count + (n - size) / large;
			}

		}
		return cut2(small, mid, large, n);

	}

	public static int cut2(int mid, int small, int large, int n) {
		int count = 0;
		int size = 0;

		count = n / small;
		size = small * count;

		if (size == n) {
			return count;
		}

		while (count != 0) {
			count--;
			size -= small;
			if ((n - size) % mid == 0) {
				return count + (n - size) / mid;
			}
			else if ((n - size) % large == 0) {

				return count + (n - size) / large;
			}

		}
		return cut3(small, mid, large, n);
	}

	public static int cut2(int large, int small, int mid, int n) {
		int count = 0;
		int size = 0;

		count = n / small;
		size = small * count;

		if (size == n) {
			return count;
		}

		while (count != 0) {
			count--;
			size -= small;
			if ((n - size) % mid == 0) {
				return count + (n - size) / mid;
			}
			else if ((n - size) % large == 0) {

				return count + (n - size) / large;
			}

		}
		return 1;
	}

}


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

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

public class MyCode {
  public static void main (String[] args) {
    Scanner in = new Scanner(System.in);
    int numberOfInterestingMin = in.nextInt();
    int result = 0;

    for (int j = 0; j < numberOfInterestingMin; j++)
    {
       minute = in.nextInt();

       if (minute > result + 15)
       {
         result = result + 15;
         System.out.println(result);
         return;
       }

       result = minute;

       if (result >= 75)
       {
         result = 90;
         System.out.println(result);
         return;
       }
    }

    System.out.println(result);
  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
    final static int MAXN=91,stop=15;
    static boolean ok[]=new boolean[MAXN];
    public static void main(String[] args) throws IOException{
        BufferedReader cin=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        int n=Integer.parseInt(cin.readLine()),cont=0,con=0;
        String aux[]=cin.readLine().split(" ");
        for(int i=0;i<n;i++)
            ok[Integer.parseInt(aux[i])]=true;
        for(int i=1;i<MAXN;i++)
        {
            cont++;
            if(!ok[i])
                con++;
            else if(ok[i])
                con=0;
            if(con>=stop)
                break;
        }
        out.write(cont+"\n");
        out.flush();
    }


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class R351Div2A {

	public static void main(String[] args) {
		FastScanner in=new FastScanner();
		int n=in.nextInt();
		int[] a=new int[n];
		for(int i=0;i<n;i++) a[i]=in.nextInt();
		if(n==1){
			if(a[0]>15){
				System.out.println(15);
			}else{
				if(a[0]+15<=90)
					System.out.println(a[0]+15);
				else
					System.out.println(90);
			}
			return;
		}
		for(int i=0;i<n;i++){
			if(i==0){
				if(a[0]>15){
					System.out.println(15);
					return;
				}
			}else{
				if(a[i]-a[i-1]>15){
					System.out.println(a[i-1]+15);
					return;
				}
		}
		System.out.println(90);

	}
	static class FastScanner{
		BufferedReader br;
		StringTokenizer st;
		public FastScanner(){br=new BufferedReader(new InputStreamReader(System.in));}
		String nextToken(){
			while(st==null||!st.hasMoreElements())
				try{st=new StringTokenizer(br.readLine());}catch(Exception e){}
			return st.nextToken();
		}
		int nextInt(){return Integer.parseInt(nextToken());}
		long nextLong(){return Long.parseLong(nextToken());}
		double nextDouble(){return Double.parseDouble(nextToken());}
	}
}


import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int first_input = sc.nextInt();
        int minutesWatched = 0;
        int current = sc.nextInt();
        int next = 0;

        while (sc.hasNextInt()){
              next = sc.hasNextInt();
              minutesWatched += getMinutes(current,next);
              current = next;

        }
        minutesWatched += getMinutes(current,90);
        Sytem.out.print(minutesWatched);
    }
    public static int getMinutes(int current,int next){
        if (next - current > 15){
            return 15;
        }else{
            return (next-current);
        }
    }

}


import java.io.*;
import java.util.*;
public class BlackJack{
static int ip(String s){
	return Integer.parseInt(s);
}
	public static void main(String[] args) throws IOException{
		BufferedReader r=new BufferedReader(new InputStreamReader(System.in));
		int n=ip(r.readLine());
		//int[] a=new int[n];
		//StringTokenizer str=new StringTokenizer(r.readLine());
		int alr=n-10;
		//int[] rem={2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,11};
		//System.out.println(find(rem,0,alr));
		if(alr==11)
			System.out.println(1);
		else if(alr==10)
			System.out.println(15);
		else if(adr==1)
			System.out.println(5);
		else if(adr==0)
			System.out.println(0);
		else
			System.out.println(4);

}
/*static int find(int[] a,int i,int sum){
		if(sum==0) return 1;
		if(sum<0) return 0;
		if(i==a.length) return 0;
		return find(a,i+1,sum-a[i])+find(a,i+1,sum);
}*/
}


import java.util.*;
public class blackjack {

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int = sc.nextInt();
        int[] array = {0, 0, 0, 0, 0,
        		0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 15, 4, 0, 0, 0, 0};
        System.out.println(array[a]);

    }

}


import java.util.Scanner;
public class Blackjack
{
public static void main(String []args){
Scanner s = new Scanner(System.in);
int N = s.nextInt();
if(n <= 10 || n > 21)
System.out.println("0");
else if(n ==  20)
System.out.println("15");
else
System.out.println("4");
s.close();
}
}


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

    System.out.println(s.length() >= 5 && contains(s, '0', '9')
    		&& contains(s, 'a','z') && contains(s, 'A','Z') ? "Correct" : "Too weak");
}
static boolean contains(String s, char a, char b)
{
    for(char c: s.toCharArray())
    	if(c>=a && c<=b)
    		return true;
    return false;
}
}


public class Solution{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        long n = in.nextLong();
        in.close();
        long k = 1;
        long a0 = 2, a1 = 3;
        while(n>=a1){
            long temp = a0 + a1;
            a0 = a1;
            a1 = temp;
            k++;
        }
        System.out.println(k);
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author anuj64
 */
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();
    }

    static class TaskC {
        HashMap<Integer, Long> F;

        public void solve(int testNumber, InputReader in, outputWriter out) throws IOException {
            long n = in.nextLong();
            F = new HashMap<Integer, Long>();
            F.put(0, 1l);
            F.put(1, 1l);
            F.put(2, 2l);
            int high = 90;
            int low = 0, mid = 0;
            while (high > low + 1) {
                mid = (low + high) / 2;
                Long res = f(mid);
                if (res > n) {
                    high = mid;
                } else {
                    low = mid;
                }
                // out.println(mid+" "+res);
            }
            out.println((low - 1));
            //for(int i = 0; i < 100; i++)
            //out.println(i+" "+f(i));
        }

        long f(int n) {
            if (F.containsKey(n)) return F.get(n);
            int k = n / 2;
            if (n % 2 == 0) { // n=2*k
                F.put(n, (f(k) * f(k) + f(k - 1) * f(k - 1)));
            } else { // n=2*k+1
                F.put(n, f(k) * f(k + 1) + f(k - 1) * f(k));
            }
            return F.get(n);
        }

    }

    static class InputReader {
        private byte[] buf = new byte[8000];
        private int index;
        private int total;
        private InputStream in;

        public InputReader(InputStream stream) {
            in = stream;
        }

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

        public long nextLong() {
            long integer = 0;
            int n = scan();
            while (isWhiteSpace(n))
                n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    integer *= 10;
                    integer += n - '0';
                    n = scan();
                } else
                    throw new InputMismatchException();
            }
            return neg * integer;
        }

        public boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
                return true;
            return false;
        }

    }

    static class outputWriter {
        BufferedWriter out;

        public outputWriter(OutputStream ot) {
            out = new BufferedWriter(new OutputStreamWriter(ot));
        }

        public outputWriter() {
            out = new BufferedWriter(new OutputStreamWriter(System.out));
        }

        public void println(Object object) throws IOException {
            out.append("" + object + "\n");
        }

        public void close() throws IOException {
            out.close();
        }

    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class PC {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n =  scanner.nextLong();
        long[] dp =  new long[50000000];
        dp[0] = 0;
        dp[1] = 1;
        long i =  1;
        while (true){
            dp[i+1] = dp[i] + dp[i-1] + 1;
            if(dp[i+1] > n-1) break;
            i++;
        }
        System.out.println(i);

    }

}


import java.util.*;

public class p735c{

	public static void main(String args[]){
	Scanner in=new Scanner(System.in);
	int fib[]=new int[100000000];
	fib[0]=1;fib[1]=1;
	long n=in.nextLong();
	long i,m=n-1;
	for(i=0;;)
	{
		if(i>=2)
		fib[(int)i]=fib[(int)i-1]+fib[(int)i-2];
		m=m-fib[(int)i];
		if(m>=0)
			i++;
		else break;
	}
	System.out.println(i);
}

}


import java.util.Scanner;
import java.io.*;
import java.math.BigInteger;
public class Xtend {

public static void main(String[] args)throws IOException{
Scanner input=new Scanner(System.in);
int x1=input.nextInt();
int y1=input.nextInt();
int c1=input.nextInt();
int x2=input.nextInt();
int y2=input.nextInt();
int c2=input.nextInt();
if((x1==0 && y1==0)||(x2==0 && y2==0)){
	if(c1!=0 || c2!=0){
		System.out.println(0);
	}else{
		System.out.println(-1);
	}
}else if(y1==0 || y2==0){
	if ((y1==0 && y2!=0) ||(y1!=0 && y2==0)){
	System.out.println(1);
}else{
	{
        if(c1*x2==c2*x1){
        	System.out.println(-1);
        }
        else{
        	System.out.println(0);
        }
    }
}
}else{

         if(x1*y2==x2*y1)
         {
             if(c1*y2!=c2*y1)
                 System.out.println(0);
             else System.out.println(-1);
         }
         else
          System.out.println(1);
     }
 }
}
}
}


import java.util.*;
public class A
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int a1 = sc.nextInt();
        int b1 = sc.nextInt();
        int c1 = sc.nextInt();
        int a2 = sc.nextInt();
        int b2 = sc.nextInt();
        int c2 = sc.nextInt();
        int ans = 0;
        if(a1 == 0 & b1 == 0 & c1 != 0 || a2 == 0 & b2 == 0 & c2 != 0)
        {
            ans = 0;
        }
        else if((a1 * b2 - b1 * a2)!=0)
        {
            ans = 1;
        }
        else if(a1 * c2 == c1 * a2 || b1 * c2 == b2 * c1)
        {
            ans -1;
        }
        else
        {
            ans = 0;
        }
        System.out.println(ans);
    }
}


import java.util.*;
public class PowerPoint
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int a = 0;
int b = 0;
int[] as = new int[3];
int[] bs = new int[3];
for(int i = 0;i < 3;i++)
{
    as[i] = sc.nextInt();
    a += as[i];
}
for(int i = 0;i < 3;i++)
{
    bs[i] = sc.nextInt();
    b += bs[i];
}
if(a - b < 0)
{
    System.out.println(-1);
}
else
{
    System.out.pritln(1);
}
}
}


import java.util.*;
public class A
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int a1 = sc.nextInt();
        int b1 = sc.nextInt();
        int c1 = sc.nextInt();
        int a2 = sc.nextInt();
        int b2 = sc.nextInt();
        int c2 = sc.nextInt();
        int ans = 0;
        if(a1 == 0 & b1 == 0 & c1 != 0 || a2 == 0 & b2 == 0 & c2 != 0)
        {
            ans = 0;
        }
        else if((a1 * b2 - b1 * a2)!=0)
        {
            ans = 1;
        }
        else if(a1 * c2 == c1 * a2 || b1 * c2 == c1 * b2)
        {
            ans -1;
        }
        else
        {
            ans = 0;
        }
        System.out.println(ans);
    }
}


/*
 * Code Author: Akshay Miterani
 * DA-IICT
 */
import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;

public class Main {

	static double eps=(double)1e-7;
	static long mod=(int)1e9+7;
	public static void main(String args[]){
		InputReader in = new InputReader(System.in);
		OutputStream outputStream = System.out;
		PrintWriter out = new PrintWriter(outputStream);
		//----------My Code----------
		long a=in.nextLong();
		long b=in.nextLong();
		long n=in.nextLong();
		long x=in.nextLong();
		long ans1=(modulo(a, n, mod)*x)%mod;
		long ans2=((b*(modulo(a, n, mod)-1))%mod*modulo(a-1, mod-2, mod))%mod;
		if(a==(long)1){
			ans2=b*n;
			ans2%=mod;
		}
		long ans=ans1+ans2;
		ans%=mod;
		System.out.println(ans);
		out.close();
		//---------------The End------------------

	}

	public static void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	static long round(long x){
		if(x%10<5){
			x/=10;
			x*=10;
			return x;
		}
		else{
			x/=10;
			x++;
			x*=10;
			return x;
		}
	}

	static long modulo(long a,long b,long c) {
		long x=1;
		long y=a;
		while(b > 0){
			if(b%2 == 1){
				x=(x*y)%c;
			}
			y = (y*y)%c; // squaring the base
			b /= 2;
		}
		return  x%c;
	}
	static long gcd(long x, long y)
	{
		if(x==0)
			return y;
		if(y==0)
			return x;
		long r=0, a, b;
		a = (x > y) ? x : y; // a is greater number
		b = (x < y) ? x : y; // b is smaller number
		r = b;
		while(a % b != 0)
		{
			r = a % b;
			a = b;
			b = r;
		}
		return r;
	}
	static class Pair implements Comparable<Pair>{
		Double x;
		int ind;
		Pair(double xx,int yy){
			x=xx;
			ind=yy;
		}
		@Override
		public int compareTo(Pair o) {
			return Double.compare(this.x, o.x);
		}
	}

	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream inputstream) {
			reader = new BufferedReader(new InputStreamReader(inputstream));
			tokenizer = null;
		}

		public String nextLine(){
			String fullLine=null;
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					fullLine=reader.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				return fullLine;
			}
			return fullLine;
		}
		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
}


import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;

import java.util.InputMismatchException;

public class cf_practise{
static long d=1000000007;
static long check(long a)
{
if(a>d)
return a%d;
else return a;}

public static void main(String args[]) {
InputReader in = new InputReader(System.in);

//OutputWriter st = new OutputWriter(System.out);
long a,b,x,n;
long ans=0;
a=in.readInt();
b=in.readInt();

n=in.readLong();
x=in.readInt();
if(a==1)
ans=check(x+check((n)*b));
else
{
long c=exp(a,n);
ans=check(check(c*x)+check(b*check((c-1)*exp(a-1,d-2))));
}
System.out.println(ans);
//st.printLine(Math.min(ans2,ans1));
//st.close();

}
static long exp(long a,long b)
{
if(b==1)
return a;

if(b%2==0)
{
long c=exp(a,b/2);
long e=c*c;
return (e%d);
}

else
{
long c=exp(a,b/2);
long e=c*c;e%=d;
e*=a;
return (e%d);
}}}

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 String readString() {

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 double readDouble() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
double res = 0;
while (!isSpaceChar(c) && c != '.') {
if (c == 'e' || c == 'E') {
return res * Math.pow(10, readInt());
}
if (c < '0' || c > '9') {
throw new InputMismatchException();
}
res *= 10;
res += c - '0';
c = read();
}
if (c == '.') {
c = read();
double m = 1;
while (!isSpaceChar(c)) {
if (c == 'e' || c == 'E') {
return res * Math.pow(10, readInt());
}
if (c < '0' || c > '9') {
throw new InputMismatchException();
}
m /= 10;
res += (c - '0') * m;
c = read();
}
}
return res * sgn;
}

public long readLong() {
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 boolean isSpaceChar(int c) {

if (filter != null) {
return filter.isSpaceChar(c);
}

return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;

}

public String next() {

return readString();
}

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 OutputWriter(Writer writer) {

this.writer = new PrintWriter(writer);

}

public void print(Object... objects) {

for (int i = 0; i < objects.length; i++) {

if (i != 0) {
writer.print(' ');
}
writer.print(objects[i]);

}

}

public void printLine(Object... objects) {

print(objects);

writer.println();

}

public void close() {

writer.close();

}

public void flush() {

writer.flush();

}

}


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

public class IteratedLinearFunction {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long n = sc.nextLong();
		long x = sc.nextLong();

		long m = 1000000007;
		if (a==1){
			System.out.println((x+n*b)%m);
			return;
		}

		BigInteger an = po(a,n,new BigInteger(""+m));
		BigInteger an1 = po(a,n,new BigInteger(""+m).multiply(new BigInteger((a-1)+"")));
		an1 = ((an1.add(new BigInteger(""+m).multiply(new BigInteger((a-1)+""))).subtract(new BigInteger("1"))).divide(new BigInteger((a-1)+"")).mod(new BigInteger(""+m)));
		System.out.println((an.multiply(new BigInteger(x+"")).mod(new BigInteger(m+"")).add(an1.multiply(new BigInteger(b+""))).mod(new BigInteger(m+""))));
	}

	private static BigInteger po(long a, long n, BigInteger m) {
		if (n==0) return new BigInteger("1");
		if (n==1) return new BigInteger(""+a);
		BigInteger r1 = po(a,n/2,m);
		BigInteger r2 = po(a,n%2,m);
		BigInteger br1 = new BigInteger(r1+"");
		BigInteger br2 = br1.multiply(br1);
		BigInteger brmod = br2.mod(new BigInteger(m+""));
		brmod = brmod.multiply(new BigInteger(r2+""));
		brmod = brmod.mod(new BigInteger(m+""));
		return brmod;
	}

}


import java.io.*;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class Foobaf {
    public static class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

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

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

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

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

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        BigInteger A = new BigInteger(Integer.toString(fs.nextInt()));
        BigInteger B = new BigInteger(Integer.toString(fs.nextInt()));
        int n = fs.nextInt();
        BigInteger x = new BigInteger(Integer.toString(fs.nextInt()));

        if (A.compareTo(BigInteger.ONE) == 0) {
            System.out.println(B.multiply(new BigInteger(Integer.toString(n))).mod(new BigInteger(Integer.toString(1000000000 + 7)));
            return;
        }

        BigInteger result = (A.pow(n).subtract(BigInteger.ONE)).divide(A.subtract(BigInteger.ONE));
        result = B.multiply(result).add(A.pow(n).multiply(x));
        result = result.mod(new BigInteger(Integer.toString(1000000000 + 7)));

        System.out.println(result);
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
	static Scanner sc = new Scanner(System.in);
	static PrintWriter pw = new PrintWriter(System.out);
	static ArrayList<Integer> ans = new ArrayList<>();

	static void append(int x) {
		if (x == 1 || x == 0)
			return;
		else if (x == 2)
			ans.add(2);
		else if (x == 3)
			ans.add(3);
		else if (x == 4) {
			ans.add(2);
			ans.add(2);
			ans.add(3);
		} else if (x == 5)
			ans.add(5);
		else if (x == 6) {
			ans.add(5);
			ans.add(3);
		} else if (x == 7)
			ans.add(7);

		else if (x == 8) {
			ans.add(2);
			ans.add(2);
			ans.add(2);
			ans.add(7);
		} else if (x == 9) {
			ans.add(2);
			ans.add(3);
			ans.add(3);
			ans.add(7);
		}
	}

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String a[] = br.readLine().split(" ");
		int n = Integer.parseInt(a[0]);
		String s = br.readLine();
		for (int i = 0; i < n; i++) {
			int x = s.charAt(i) - '0';
			append(x);
		}
		Collections.sort(ans);
		for (int i = ans.size() - 1; i >= 0; i--)
			pw.print(ans.get(i));
		br.close();
		pw.flush();
		pw.close();

	}

}


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

/**
 * <a href="https://codeforces.com/problemset/problem/515/C"/>
 */
public class Problem515C {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int marking[] = new int[]{
                -1, //0
                -1, //1
                2, //2
                3, //3
                322, //4
                5,//5
                53, //6
                7,//7
                7222,//8
                7332,//9
        };
        String number = "";
        while(n>0){
            if(n%10 !=0 && n!=1) {
                number += (marking[n % 10]);
            }
            n = n/10;
        }
        int fNumber[] = new int[10];
        for(int i=0; i<number.length(); i++) {
            fNumber[Character.getNumericValue(number.charAt(i))]++;
        }
        number = "";
        String repeated;
        for(int i=9;i>0;i--) {
            if(fNumber[i]!=0){
                repeated = i+"";
                repeated = repeated.repeat(fNumber[i]);
                number = number+repeated;
            }
        }
        System.out.println(number);
    }
}