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

public class Main {

	public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	}
	
	HashMap<Integer, Integer> gcdMap;

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		int n = fs.nextInt();
		
		gcdMap = new HashMap<>();
		
		long sum = 0;
		
		for (int i = 1; i <= n; i++) {
			for(int j = i; j <= n; j++) {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			}
		}
		
		System.out.println(sum);
	}
	
	long gcd3(int a , int b, int c) {
		int firstGCD = gcd(a,b);
		int secondGCD = gcd(firstGCD, c);
		return (long)secondGCD;
	}
	
	int gcd(int a,int b) {
		
		if(a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		
		int key = b*1000+a;
		if(gcdMap.containsKey(key)) {
			return gcdMap.get(key);
		}
		
		int r = a % b;
		while(r != 0) {
			a = b;
			b = r;
			r = a % b;
		}
		
		gcdMap.put(key, b);
		return b;
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

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

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

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

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

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.HashMap; HashMap java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {

	public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	}
	
	HashMap<Integer, Integer> gcdMap;

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		int n = fs.nextInt();
		
		gcdMap = new HashMap<>();
		
		long sum = 0;
		
		for (int i = 1; i <= n; i++) {
			for(int j = i; j <= n; j++) {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			}
		}
		
		System.out.println(sum);
	}
	
	long gcd3(int a , int b, int c) {
		int firstGCD = gcd(a,b);
		int secondGCD = gcd(firstGCD, c);
		return (long)secondGCD;
	}
	
	int gcd(int a,int b) {
		
		if(a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		
		int key = b*1000+a;
		if(gcdMap.containsKey(key)) {
			return gcdMap.get(key);
		}
		
		int r = a % b;
		while(r != 0) {
			a = b;
			b = r;
			r = a % b;
		}
		
		gcdMap.put(key, b);
		return b;
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

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

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

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

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

} Main HashMap<Integer, Integer> gcdMap; gcdMap public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	} main {
		Main mainObj = new Main();
		mainObj.solve();
	} Main mainObj = new Main(); mainObj new Main() mainObj.solve() mainObj.solve mainObj String[] args args public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		int n = fs.nextInt();
		
		gcdMap = new HashMap<>();
		
		long sum = 0;
		
		for (int i = 1; i <= n; i++) {
			for(int j = i; j <= n; j++) {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			}
		}
		
		System.out.println(sum);
	} solve {
		FastScanner fs = new FastScanner();
		int n = fs.nextInt();
		
		gcdMap = new HashMap<>();
		
		long sum = 0;
		
		for (int i = 1; i <= n; i++) {
			for(int j = i; j <= n; j++) {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			}
		}
		
		System.out.println(sum);
	} FastScanner fs = new FastScanner(); fs new FastScanner() int n = fs.nextInt(); n fs.nextInt() fs.nextInt fs gcdMap = new HashMap<>() gcdMap new HashMap<>() long sum = 0; sum 0 for (int i = 1; i <= n; i++) {
			for(int j = i; j <= n; j++) {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			}
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			for(int j = i; j <= n; j++) {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			}
		} {
			for(int j = i; j <= n; j++) {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			}
		} for(int j = i; j <= n; j++) {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			} int j = i; int j = i; j i j <= n j n j++ j++ j {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			} {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			} for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				} int k = j; int k = j; k j k <= n k n k++ k++ k {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				} {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				} if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					} i == j && j == k i == j i j j == k j k {
						sum += gcd3(i, j,k);
					} sum += gcd3(i, j,k) sum gcd3(i, j,k) gcd3 i j k if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					} i == j || j == k || k == i i == j || j == k || k == i i == j i j j == k j k k == i k i {
						sum += 3*gcd3(i, j,k);
					} sum += 3*gcd3(i, j,k) sum 3*gcd3(i, j,k) 3 gcd3(i, j,k) gcd3 i j k {
						sum += 6*gcd3(i, j,k);
					} sum += 6*gcd3(i, j,k) sum 6*gcd3(i, j,k) 6 gcd3(i, j,k) gcd3 i j k System.out.println(sum) System.out.println System.out System System.out sum long gcd3(int a , int b, int c) {
		int firstGCD = gcd(a,b);
		int secondGCD = gcd(firstGCD, c);
		return (long)secondGCD;
	} gcd3 {
		int firstGCD = gcd(a,b);
		int secondGCD = gcd(firstGCD, c);
		return (long)secondGCD;
	} int firstGCD = gcd(a,b); firstGCD gcd(a,b) gcd a b int secondGCD = gcd(firstGCD, c); secondGCD gcd(firstGCD, c) gcd firstGCD c return (long)secondGCD; (long)secondGCD int a a int b b int c c int gcd(int a,int b) {
		
		if(a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		
		int key = b*1000+a;
		if(gcdMap.containsKey(key)) {
			return gcdMap.get(key);
		}
		
		int r = a % b;
		while(r != 0) {
			a = b;
			b = r;
			r = a % b;
		}
		
		gcdMap.put(key, b);
		return b;
	} gcd {
		
		if(a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		
		int key = b*1000+a;
		if(gcdMap.containsKey(key)) {
			return gcdMap.get(key);
		}
		
		int r = a % b;
		while(r != 0) {
			a = b;
			b = r;
			r = a % b;
		}
		
		gcdMap.put(key, b);
		return b;
	} if(a < b) {
			int temp = a;
			a = b;
			b = temp;
		} a < b a b {
			int temp = a;
			a = b;
			b = temp;
		} int temp = a; temp a a = b a b b = temp b temp int key = b*1000+a; key b*1000+a b*1000 b 1000 a if(gcdMap.containsKey(key)) {
			return gcdMap.get(key);
		} gcdMap.containsKey(key) gcdMap.containsKey gcdMap key {
			return gcdMap.get(key);
		} return gcdMap.get(key); gcdMap.get(key) gcdMap.get gcdMap key int r = a % b; r a % b a b while(r != 0) {
			a = b;
			b = r;
			r = a % b;
		} r != 0 r 0 {
			a = b;
			b = r;
			r = a % b;
		} a = b a b b = r b r r = a % b r a % b a b gcdMap.put(key, b) gcdMap.put gcdMap key b return b; b int a a int b b public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

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

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

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

		public void close() throws IOException {
			reader.close();
		}
	} FastScanner BufferedReader reader; reader private StringTokenizer st; st public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		} FastScanner {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		} st = null st null reader = new BufferedReader(new InputStreamReader(System.in)) reader new BufferedReader(new InputStreamReader(System.in)) public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		} next {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		} if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			} st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
				st = new StringTokenizer(reader.readLine());
			} st = new StringTokenizer(reader.readLine()) st new StringTokenizer(reader.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		} nextLine {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		} st = null st null String readLine = null; readLine null readLine = reader.readLine() readLine reader.readLine() reader.readLine reader return readLine; readLine public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		} nextIntArr {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		} int[] retArr = new int[n]; retArr new int[n] n for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				retArr[i] = nextInt();
			} {
				retArr[i] = nextInt();
			} retArr[i] = nextInt() retArr[i] retArr i nextInt() nextInt return retArr; retArr int n n public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		} nextLongArr {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		} long[] retArr = new long[n]; retArr new long[n] n for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				retArr[i] = nextLong();
			} {
				retArr[i] = nextLong();
			} retArr[i] = nextLong() retArr[i] retArr i nextLong() nextLong return retArr; retArr int n n public void close() throws IOException {
			reader.close();
		} close {
			reader.close();
		} reader.close() reader.close reader public class Main {

	public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	}
	
	HashMap<Integer, Integer> gcdMap;

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		int n = fs.nextInt();
		
		gcdMap = new HashMap<>();
		
		long sum = 0;
		
		for (int i = 1; i <= n; i++) {
			for(int j = i; j <= n; j++) {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			}
		}
		
		System.out.println(sum);
	}
	
	long gcd3(int a , int b, int c) {
		int firstGCD = gcd(a,b);
		int secondGCD = gcd(firstGCD, c);
		return (long)secondGCD;
	}
	
	int gcd(int a,int b) {
		
		if(a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		
		int key = b*1000+a;
		if(gcdMap.containsKey(key)) {
			return gcdMap.get(key);
		}
		
		int r = a % b;
		while(r != 0) {
			a = b;
			b = r;
			r = a % b;
		}
		
		gcdMap.put(key, b);
		return b;
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

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

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

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

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

} public class Main {

	public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	}
	
	HashMap<Integer, Integer> gcdMap;

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		int n = fs.nextInt();
		
		gcdMap = new HashMap<>();
		
		long sum = 0;
		
		for (int i = 1; i <= n; i++) {
			for(int j = i; j <= n; j++) {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			}
		}
		
		System.out.println(sum);
	}
	
	long gcd3(int a , int b, int c) {
		int firstGCD = gcd(a,b);
		int secondGCD = gcd(firstGCD, c);
		return (long)secondGCD;
	}
	
	int gcd(int a,int b) {
		
		if(a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		
		int key = b*1000+a;
		if(gcdMap.containsKey(key)) {
			return gcdMap.get(key);
		}
		
		int r = a % b;
		while(r != 0) {
			a = b;
			b = r;
			r = a % b;
		}
		
		gcdMap.put(key, b);
		return b;
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

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

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

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

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

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	}
	
	HashMap<Integer, Integer> gcdMap;

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		int n = fs.nextInt();
		
		gcdMap = new HashMap<>();
		
		long sum = 0;
		
		for (int i = 1; i <= n; i++) {
			for(int j = i; j <= n; j++) {
				for(int k = j; k <= n; k++) {
					if(i == j && j == k) {
						sum += gcd3(i, j,k);
					}else if(i == j || j == k || k == i){
						sum += 3*gcd3(i, j,k);
					}else {
						sum += 6*gcd3(i, j,k);
					}
				}
			}
		}
		
		System.out.println(sum);
	}
	
	long gcd3(int a , int b, int c) {
		int firstGCD = gcd(a,b);
		int secondGCD = gcd(firstGCD, c);
		return (long)secondGCD;
	}
	
	int gcd(int a,int b) {
		
		if(a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		
		int key = b*1000+a;
		if(gcdMap.containsKey(key)) {
			return gcdMap.get(key);
		}
		
		int r = a % b;
		while(r != 0) {
			a = b;
			b = r;
			r = a % b;
		}
		
		gcdMap.put(key, b);
		return b;
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

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

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

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

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

}
