//http://ja.doukaku.org/100/　投稿用
using System;
using System.Collections.Generic;
class Program {
　　static void Main(string[] args) {
　　　　Console.WriteLine(goedel(9));
　　　　Console.WriteLine(goedel(81));
　　　　Console.WriteLine(goedel(230));
　　　　Console.ReadLine();
　　}

　　static double goedel(int n) {
　　　　string tmpStr = n.ToString();
　　　　double r = 1;
　　　　List<double> prime = new List<double>(new double[] { 2 });
　　　　for(int i = 3; ; i += 2) {
　　　　　　bool isPrime = true;
　　　　　　for(int j = 3; j < i; j++) {
　　　　　　　　if(i % j == 0) {
　　　　　　　　　　isPrime = false;
　　　　　　　　　　break;
　　　　　　　　}
　　　　　　}
　　　　　　if(isPrime) prime.Add(i);
　　　　　　if(prime.Count >= tmpStr.Length) break;
　　　　}
　　　　for(int i = 0; i < tmpStr.Length; i++) {
　　　　　　r *= Math.Pow(prime[i], (double.Parse(tmpStr[i].ToString())));
　　　　}
　　　　return r;
　　}
}