3 5
2 1 608591421 720962564
3 2 608591421 641991574
3 2 718110706 353409763
2 3 482786015 858341723
3 2 825397574 357507279
 2 1
2 1 317425595 636156322
 50000 1
20845 28516 904146168 997637433

Yes
641991574 1
2 
 Yes
0 0

 Yes
0 0


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.HashSet;
import java.util.StringTokenizer;

public class Main {

	static IO io;
	static HashSet<Integer> set;
	static int ans = 0;
	static node[] tree;
	static int n , m;
	public static void main(String args[]) throws Exception {
		
		io = new IO();
		io.init();
		//------------------------------------------------
		
		long n = io.nextLong();
		
		long ans  = 1 ;
		
		
		int primes[] = new int[1000001];
		
		
		int size = 0;
		
		boolean[] isPrime = new boolean[1000001];
		
		for( int i = 0 ; i < 1000001 ; ++i )
			isPrime[i] = true;
		
		int cur = 2 ;
		
		while( true){
			
			primes[size++] = cur;
			for( int i = cur*2  ; i < 1000001 ; i += cur )
				isPrime[i] = false;
			
			int i = 0 ;
			for( i = cur+1 ; i < 1000001 ; ++i){
				if( isPrime[i]){
					cur = i;
					break;
				}
			}
			
			if( i == 1000001 ) break;
			
			
		}
		
	
	//	System.out.println( size + ":" + primes[3]);
		long res =  n;
		
		for( int i = 0 ; i < size && res >1 && primes[i] <= res ; ++i ){
			
			if( res%primes[i] == 0 ){
				ans *= primes[i];
				
				while( res%primes[i] == 0 )
					res = res/primes[i];
			}
			
		}
		
		io.println( ans );
		//------------------------------------------------
		io.destroy();
		
	}
	
	static void bfs(int cur, int parent){
		if( tree[cur].hasCat )
			tree[cur].countInclusive = tree[parent].countInclusive + 1;
		else tree[cur].countInclusive = 0 ;
		
		if( tree[cur].countInclusive > m) return;
		
		if( tree[cur].children.size() == 1 )
			ans++;
		else
		{
			for( int i : tree[cur].children){
				if( i != parent){
					bfs(i,cur);
				}
			}
		}
		
	}
	
	static class pair implements Comparable<pair>{
		int money, factor;
		pair( int money,int factor){
			this.money = money;
			this.factor = factor;
		}
		
		public int compareTo( pair p ){
			
			if( money < p.money) return -1;
			else if( money > p.money ) return +1;
			else if( factor < p.factor ) return -1;
			else if( factor > p.factor) return +1;
			else return 0;
		}
	}
	
	static class node {
		boolean hasCat;
		int countInclusive;
		boolean failed;
		ArrayList<Integer> children;
		
		node(boolean a){
			hasCat = a;
			countInclusive = 0 ;
			failed = false;
			children = new ArrayList<Integer>();
		}
		
	}
	
	static long gcd( long a , long b ){
		
		if( a == 0 ) return b;
		if( b == 0 )return a;
		if( a > b ) return gcd( a%b,b);
		else return gcd(a,b%a);
		
	}
	
	
	static class IO{
		
		
		BufferedReader reader;
		StringTokenizer tokenizer;
		PrintWriter writer;

		public void init() {
			try {
				reader = new BufferedReader(new InputStreamReader(System.in),8*1024);
				writer = new PrintWriter(System.out);
			} catch (Exception e) {
				e.printStackTrace();
				System.exit(261);
			}
		}

		void destroy() {
			writer.close();
			System.exit(0);
		}

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

		void println(Object... objects) {
			print(objects);
			writer.println();
		}

		String nextLine() throws IOException {
			return reader.readLine();
		}

		String nextToken() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens())
				tokenizer = new StringTokenizer(nextLine());
			return tokenizer.nextToken();
		}

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

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

		double nextDouble() throws NumberFormatException, IOException {
			return Double.parseDouble(nextToken());
		}
	}
}