"use strict"

var inputs = '';
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
})

reader.on('line', function(input) {
  inputs = input
})

reader.on('close', function() {
  const items = inputs.trim().split(' ')
  const n = parseInt(items[0])
  const a = parseInt(items[1])
  const b = parseInt(items[2])
  const train = n * a
  const taxi = b
  if(train < taxi){
    console.log(train)
    process.exit(1)
  }
  console.log(taxi)
  process.exit(1)
})


var inputs = '';
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
})

reader.on('line', function(input) {
  inputs = input
})

reader.on('close', function() {
  const items = inputs.trim().split(' ')
  const n = parseInt(items[0])
  const a = parseInt(items[1])
  const b = parseInt(items[2])
  const train = n * a
  const taxi = b
  if(train < taxi){
    console.log(train)
    process.exit(1)
  }
  console.log(taxi)
  process.exit(1)
})


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

const (
	initialBufSize = 100000
	maxBufSize     = 10000000
)

var (
	sc = bufio.NewScanner(os.Stdin)
	wt = bufio.NewWriter(os.Stdout)
)

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	i, _ := strconv.Atoi(next())
	return i
}

func nextInts(n int) []int {
	slice := make([]int, n)
	for i := 0; i < n; i++ {
		slice[i] = nextInt()
	}
	return slice
}

func nextFloat64() float64 {
	f, _ := strconv.ParseFloat(next(), 64)
	return f
}

func nextFloat64s(n int) []float64 {
	slice := make([]float64, n)
	for i := 0; i < n; i++ {
		slice[i] = nextFloat64()
	}
	return slice
}

func putf(format string, a ...interface{}) {
	fmt.Fprintf(wt, format, a...)
}

func puts(a ...interface{}) {
	fmt.Fprintln(wt, a...)
}

func min(nums ...int) int {
	ret := nums[0]
	for _, v := range nums {
		if v < ret {
			ret = v
		}
	}
	return ret
}

func main() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, initialBufSize), maxBufSize)
	defer wt.Flush()

	n, a, b := nextInt(), nextInt(), nextInt()

	puts(min(a*n, b))
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

func main() {
	sc := NewScanner()
	N, A, B := sc.nextInt(), sc.nextInt(), sc.nextInt()
	a := N * A
	fmt.Println(min(a, B))
}


package main

import "fmt"

func main() {

	var n, a, b int
	fmt.Scan(&n, &a, &b)

	if n*a >= b {
		fmt.Println(b)
	} else {
		fmt.Println(n * a)
	}
}


package main

import "fmt"

func main() {
	var n, a, b int
	fmt.Scan(&n, &a, &b)
	if a > b {
		fmt.Println(n * b)
	} else {
		fmt.Println(n * a)
	}
}


// https://atcoder.jp/contests/abc133/tasks/abc133_c
package main

import (
	"fmt"
)

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func main() {
	var L, R int

	fmt.Scan(&L, &R)

	ans := 2019

	for i := L; i < min(R, L+2019); i++ {
		for j := i + 1; j <= min(R, L+2019); j++ {
			ans = min(ans, (i%2019)*(j%2019)%2019)
			//fmt.Printf("min = %v\n")
			// 割り切れたのなら、これ以上小さくならない
			if ans == 0 {
				break
			}
		}
	}

	fmt.Println(ans)
}


package main

import (
	"fmt"
	"math"
)

func main() {
	var r float64
	fmt.Scan(&r)
	fmt.Println(int(3 * math.Pow(r, 2)))
}


n,a,b = gets.split.map(&:to_i)

train = n * a
taxi = b

if train > taxi
  puts taxi
else
  puts train
end


n, a, b = gets.split.map(&:to_i)
puts [a * n, b].min


N, A, B = gets().split().map(&:to_i)
train_fare = N * A
if train_fare> B then
  puts B
else
  puts train_fare
end


n,a,b=gets.split.map(&:to_i)
p n*a+b


n, a, b = gets.chomp.split(" ").map(&:to_i)
puts a * n + b


input = readlines()
n, a, b = input.shift().chomp.split("\s").map{|x| x.to_i}

a_total = n * a
b_total = n % 4 == 0 ? (n / 4) * b : (n / 4 + 1) * b

puts [a_total, b_total].min


// Input macro
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! stdin {
    () => {{
        use std::io::Read;
        let mut s = String::new();
        std::io::stdin().read_to_string(&mut s).unwrap();
        s
    }};
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

// Test Code
macro_rules! test {
    ($($input:expr => $output:expr),* $(,)*) => {
        #[test]
        fn solve_test() {
            $(
                assert_eq!(solve($input), $output);
            )*
        }
    };
}

// test code ==================================
test! {
    // example:  r##""## => ""
"4 2 9" => "8", "4 2 7"=>"7","4 2 8" => "8"
}

fn main() {
    println!("{}", solve(&stdin!()));
}

fn solve(src: &str) -> String {
    input! {
        source = src,
        n: i32,
        a: i32,
        b: i32,
    }
    (if a*n<b{a*n}else{b}).to_string()
}


use std::cmp;

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
    	n:usize,
        a:usize,
        b:usize
    }

    println!("{}", cmp::min(n*a, b));
}


use std::cmp::min;

fn main() {
  let (n, a, b) = {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    let mut ws = s.split_whitespace();
    let n: usize = ws.next().unwrap().parse().unwrap();
    let a: usize = ws.next().unwrap().parse().unwrap();
    let b: usize = ws.next().unwrap().parse().unwrap();
    (n, a, b)
  };

  print!("{}", min(n * a, b));
}


use proconio::input;

fn main() {
    input! {
        n:u8,
        a:u8,
        b:u8
    }
    let ans=
    if n*a>b {n*a} else{b};
    println!("{}",ans);

}


use proconio::input;

fn main() {
    input! {
        n:u8,
        a:u8,
        b:u8
    }
    let ans=
    if a>b {n*b} else{a*3};
    println!("{}",ans);

}


use std::cmp;

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
    	n:usize,
        a:usize,
        b:usize
    }

    println!("{}", n*a+b);
}


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let nab=readInts()
let n=nab[0]
let a=nab[1]
let b=nab[2]
if n*a<b {
  print(n*a)
}else{
  print(b)
}


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let nab = readInts()
let n = nab[0]
let a = nab[1]
let b = nab[2]
print(min(b,n*a))


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let nab = readInts()
let n = nab[0]
let a = nab[1]
let b = nab[2]

if n*a<b {
  print(n*a)
} else {
  print(b)
}


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }

let nab = readInts()
let n = nab[0]
let a = nab[1]
let b = nab[2]
print(min(b,n*a))


#複数の値をスペースで繋いで受け取る時のテンプレ
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }

let nab = readInts()
let n = nab[0]
let a = nab[1]
let b = nab[2]
＃ここまでテンプレ
print(min(b,n*a))


export class Main {
  static main(input): string {
    const [n, a, b]: number[] = input.split("\n")[0].split(" ").map(a => parseInt(a));
    const t: number = n * a;
    return `${Math.min(t, b)}`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));


import * as fs from 'fs';

// 4 2 9
// 8
const main = (inp: string) => {
    const [n, a, b]: number[] = inp.split(' ').map(Number);
    const train: number = n * a;
    const taxi: number = b;
    console.log(train < taxi ? train : taxi);
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());


function Main(args) {
  const inputs = args.split(" ");
  const n = inputs[0];
  const a = inputs[1];
  const b = inputs[2];
  if (a * n > b) {
    console.log(b);
    return;
  }
  console.log(a * n);
}

// 標準入力
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


import * as fs from 'fs';

// 4 2 9
// 8
const main = (inp: string) => {
    const [n, a, b]: number[] = inp.split(' ').map(Number);
    const train: number = n * a;
    const taxi: number = b;
    console.log(train > taxi ? train : taxi);
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());


const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result};const sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,a))};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  let [a,b,c]=nrin(3)
  out(min(c*a, b))
}
main()


export class Main {
  static main(input): string {
    const [n, a, b]: number[] = input.split("\n")[0].split(" ").map(a => parseInt(a));
    const t: number = n * a;
    const tmp: number[] = [Math.floor(n / b), n % b];
    const partialTax: number = tmp[0] * b + a * tmp[1];
    const allTax: number = tmp[0] * b + (tmp[1] == 0 ? 0 : b);
    const tax: number = Math.min(partialTax, allTax);
    return `${t < tax ? t : tax}`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));


a,b,c = input().split()
print(a[0]+b[0]+c[0])


a, b, c = input().split()
print(a[0] + b[0] + c[0])


#048-A
a, b, c = input().split()
print(a[0]+b[0]+c[0])


arr = list(input().split())
print(arr[0].[0] + arr[1].[0] + arr[2].[0])


string = input()
    Capital = string[0]
    print("A" + Capital + "C")


def iroha():
    string = input()
    Capital = string[0]
    print("A" + Capital + "C")

if __name__ == "__main__":
    iroha()


import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;

public class Main {
    static InputStream is;
    static PrintWriter out;
    static String INPUT = "";

    static void solve()
    {
        String atcoder = ns();
        String target = ns();
        String contest = ns();

        System.out.println(atcoder.substring(0, 1) + target.substring(0, 1) + contest.substring(0, 1));
    }

    public static void main(String[] args) throws Exception
    {
        long S = System.currentTimeMillis();
        is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);

        solve();
        out.flush();
        long G = System.currentTimeMillis();
        tr(G-S+"ms");
    }

    private static boolean eof()
    {
        if(lenbuf == -1)return true;
        int lptr = ptrbuf;
        while(lptr < lenbuf)if(!isSpaceChar(inbuf[lptr++]))return false;

        try {
            is.mark(1000);
            while(true){
                int b = is.read();
                if(b == -1){
                    is.reset();
                    return true;
                }else if(!isSpaceChar(b)){
                    is.reset();
                    return false;
                }
            }
        } catch (IOException e) {
            return true;
        }
    }

    private static byte[] inbuf = new byte[1024];
    static int lenbuf = 0, ptrbuf = 0;

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

    private static boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }

    private static int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }

    private static double nd() { return Double.parseDouble(ns()); }
    private static char nc() { return (char)skip(); }

    private static String ns()
    {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!(isSpaceChar(b))){
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private static char[] ns(int n)
    {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while(p < n && !(isSpaceChar(b))){
            buf[p++] = (char)b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private static char[][] nm(int n, int m)
    {
        char[][] map = new char[n][];
        for(int i = 0;i < n;i++)map[i] = ns(m);
        return map;
    }

    private static int[] na(int n)
    {
        int[] a = new int[n];
        for(int i = 0;i < n;i++)a[i] = ni();
        return a;
    }

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

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

    private static long nl()
    {
        long num = 0;
        int b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }

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

    private static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		String A = sc.next();
		String s = sc.next();
		String C = sc.next();

		System.out.println("A"+ s.charAt(0) +"C");

	}

	//以下、自作ライブラリ

	/*
		int N = sc.nextInt();

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

		String s = sc.next();

		String[] a = new String[N];
		for (int i = 0; i < N; i++)
			a[i] = sc.next();
	 */

	//階乗
	public static int fact(int n) {
		if (n == 1 || n == 0)
			return 1;
		else
			return n * fact(n - 1);
	}

	//指定した値以上の要素が最初に現れる位置
	//要素の数は+1（配列のズレ)
	public static long lowerBound(int n, long[] x, long y) {
		int left = 0;
		int right = n;
		while (left < right) {
			int mid = (left + right) / 2;
			if (x[mid] < y) {
				left = mid + 1;
			} else {
				right = mid;
			}
		}
		return left;
	}

	//指定した値より大きい要素が最初に現れる位置
	//要素の数は+1（配列のズレ)
	public static long upperBound(int n, long[] x, long y) {
		int left = 0;
		int right = n;
		while (left < right) {
			int mid = (left + right) / 2;
			if (x[mid] <= y) {
				left = mid + 1;
			} else {
				right = mid;
			}
		}
		return left;
	}

	//最大公約数
	public static long gcd(long a, long b) {
		if (a < b)
			return gcd(b, a);
		long c = 0;
		c = a % b;
		if (c == 0)
			return b;
		return gcd(b, c);
	}

	//最小公倍数
	public static long lcm(long m, long n) {
		return m * n / gcd(m, n);
	}

	//素数判定
	public static boolean isPrime(int n) {
		if (n < 2)
			return false;
		if (n == 2)
			return true;
		if (n % 2 == 0)
			return false;

		for (int i = 3; i * i <= n; i += 2) {
			if (n % i == 0)
				return false;
		}
		return true;
	}
}

//以下、高速スキャナークラス
class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

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


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

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

		// 入力
		String a = sc.next();
		String x = sc.next();
		String b = sc.next();

		// 計算
		String result = "";
		result = "A" + x.charAt(0) + "C";

		// 出力
		System.out.println(result);
	}

	public static class Scanner {
		private BufferedReader br; private StringTokenizer tok;
		public Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}
		private void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}
		private boolean hasNext() { return tok != null && tok.hasMoreTokens();}
		public String next() throws IOException { getLine(); return tok.nextToken();}
		public int nextInt() throws IOException { return Integer.parseInt(next());}
		public long nextLong() throws IOException { return Long.parseLong(next());}
		public double nextDouble() throws IOException { return Double.parseDouble(next());}
	}
}


import java.util.*;

public class Main {

    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        String c[] = new String[3];
        c[0] = input.next();
        c[1] = input.next();
        c[2] = input.next();
        if (c[1].charAt(0) == 'B') {
            System.out.println("ABC");
            System.out.println("The contest in which you are participating now.");
        }
        if (c[1].charAt(0) == 'S') {
            System.out.println("ASC");
            System.out.println("This contest does not actually exist.");
        }
        if (c[1].charAt(0) == 'X') {
            System.out.println("AXC");
        }
    }
}


import java.util.Scanner;
public class Main {
	public static void main(String[]  args) {
		Scanner input = new Scanner(System.in);
          String x = input.nextLine();
		  String Splitt[] = x.split(" ");
		  for(String word: Splitt){
		     System.out.println(word.charAt(0)); }
		   }

		}


import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long x = sc.nextLong();
		long res=0;
		if (b-a ==0) {
			res =0;;
		}
		else {
			res = (b/x) - (a/x);
		if (b%x==0) {
			res++;}}

		System.out.println(res);
	}

}


#include<stdio.h>
#include<string.h>
int main()
{
    int i,k;
    char a[100],b[100],c[100];
    scanf("%s%s%s",a,b,c);
    printf("%c%c%c\n",a[0],b[0],c[0]);
    return 0;
}


#include<cstdio>
using namespace std;
char a[10001],b[10001],c[10001];
int main()
{
	scanf("%s%s%s",a,b,c);
	printf("%c%c%c\n",a[0],b[0],c[0]);
	return 0;
}


#include<cstdio>
using namespace std;
int main(){
	int a=1;
	bool f=true;
	while(a!=3){
		char b=getchar();
		if(f){
			putchar(b);
			f=false;
		}
		if(b==' '){
			b=getchar();
			putchar(b);
			a++;
		}
	}
	return 0;
}


#include <iostream>
using namespace std;

int main() {
  string str1, str2, str3;
  cin >> str1 >> str2 >> str3;
  cout << 'A'+str2.at(0)+'C' << endl;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
  string s, t, u;
  cin >> s >> t >> u;

  cout << 'A' + t.at(0) + 'C' << endl;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
  string s, t, u;
  cin >> s, t, u;

  cout << 'A' + t.at(0) + 'C' << endl;
}


#include <stdio.h>
#include <string.h>

int main(void)

{
	char at[10];
	char s[150];
	char co[10];
	scanf("%s %s %s",at,s,co);

	printf("%c%c%c\n",at[0],s[0],co[0]);
	return 0;
}


#include<stdio.h>

int main(void){
  char str[128];
  scanf("%127[^\n]",str);
  printf("A%cC\n",str[8]);
  return 0;
}


#include<stdio.h>
#include<string.h>

int main()
{
 char s[100];

 fgets(s,100,stdin);

 printf("\nA%cC\n",s[8]);

 return 0;
 }


#include <stdio.h>

int main () {
	char str[102];
	for (int i = 0; str[i] != '\0'; i++) {
		scanf("AtCoder %s Contest", &str[i]);
		if ( str[i] >= 'A' && str[i] <= 'Z') {
			printf("A%cC", str[i]);
		}
		else {
			continue;
		}
	}
	return 0;
}


#include<stdio.h>
#include<string.h>

int main()
{
    char S[100],A[8],C[7];
    int i=1,a=0;
    scanf("%s  %s  %s",&A, &S, &C);
    if(1<=strlen(S) && strlen(S)<=100){
        if(S[0]>= 'A' && S[0]<= 'Z' && A[0]>='A' && A[0]<='Z' && C[0]>= 'A' && C[0]<='Z'){
        for(i=1;i<strlen(S);i++){
            if(S[i]>= 'a' && S[i]<= 'z') a+=1;
            continue;
            }
      if(a==(strlen(S)-1)) printf("\n%c%c%c",A[0],S[0],C[0]);
        }
    }
return 0;
}


#include<string.h>

int main()
{
    char S[100];
    int i=1,a=0;
    scanf("%s",&S);
    if(1<=strlen(S) && strlen(S)<=100){
        if(S[0]>= 'A' && S[0]<= 'Z'){
        for(i=1;i<strlen(S);i++){
            if(S[i]>= 'a' && S[i]<= 'z') a+=1;
            continue;
            }
      if(a==(strlen(S)-1)) printf("\nA%cC",S[0]);
        }
    }
return 0;
}


inp = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')[0].split(' ')
inp.shift()
b = inp.shift()[0].toUpperCase()
console.log('A'+b+'C')


function Main(input) {
  input = input.trim()
  var N = input.split("");
  console.log("A"+N[8]+"C");

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


//https://abc048.contest.atcoder.jp/tasks/abc045_b
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
    input = input.split(" ");
	//文字列から10進数に変換するときはparseIntを使います
	var a = input[0];
	var b = input[1];
    var c = input[2];
    a=a.charAt(0);
    b=b.charAt(0);
    c=c.charAt(0);

	//出力
    console.log(a+b+c);

}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(input) {
  const a = input.trim().split(' ');
  console.log('A'+a.substring(8,9)+'C');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input) {
  const a = input.split(' ');
  console.log('A'+a.substring(8,9)+'C');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B, C = sl()
    print(A[0] + B[0] + C[0])

if __name__ == '__main__':
    main()


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"reflect"
	"sort"
	"strconv"
	"strings"
	// "regexp"
)

/* sort */
type pair struct {
	index  int64
	p1, p2 interface{}
}
type pairs []pair

func (slice pairs) Len() int {
	return len(slice)
}

func (slice pairs) Less(i, j int) bool {
	return slice[i].index < slice[j].index
}

func (slice pairs) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

/* sort */
type Int64Slice []int64

func (slice Int64Slice) Len() int {
	return len(slice)
}

func (slice Int64Slice) Less(i, j int) bool {
	return slice[i] < slice[j]
}

func (slice Int64Slice) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}
func Int64s(a []int64)                    { sort.Sort(Int64Slice(a)) }
func Int64sSliceAreSorted(a []int64) bool { return sort.IsSorted(Int64Slice(a)) }

const (
	initialBufSize = 1e4
	maxBufSize     = 1e8
	INF            = 1e8
)

var (
	scanner = bufio.NewScanner(os.Stdin)
	writer  = bufio.NewWriter(os.Stdout)
	di      = []int64{-1, 0, 1, 0}
	dj      = []int64{0, -1, 0, 1}
	di8     = []int64{-1, -1, 0, 1, 1, 1, 0, -1}
	dj8     = []int64{0, -1, -1, -1, 0, 1, 1, 1}
)

func main() {
	buf := make([]byte, initialBufSize)
	scanner.Buffer(buf, maxBufSize)
	scanner.Split(bufio.ScanWords)
	a, b, c := readString(), readString(), readString()
	s := fmt.Sprintf("%c%c%c", a[0], b[0], c[0])
	fmt.Println(s)
}

/*==========================================
 *             Library
 *==========================================*/
func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}
func doubleAry(h int64, w int64, init int64) (res [][]int64) {
	res = make([][]int64, h)
	for i := int64(0); i < h; i++ {
		res[i] = make([]int64, w)
		for j := int64(0); j < w; j++ {
			res[i][j] = init
		}
	}
	return
}

func aryEq(a []int64, b []int64) bool {
	return reflect.DeepEqual(a, b)
}

func clone(n []int64) (r []int64) {
	r = make([]int64, len(n))
	for i := 0; i < len(n); i++ {
		r[i] = n[i]
	}
	return
}
func write(s string) {
	writer.WriteString(s)
}

func print() {
	writer.Flush()
}

// scanner.Split(bufio.ScanWords) をコメントアウトしないと使用不可
func readLine() (s string) {
	if scanner.Scan() {
		s = scanner.Text()
	}
	return s
}

func readInt() (read int64) {
	scanner.Scan()
	read, err := strconv.ParseInt(scanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return
}

func readFloat() (read float64) {
	scanner.Scan()
	read, err := strconv.ParseFloat(scanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return
}

func readRunes() (read []rune) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, v)
	}
	return
}

func readString() (read string) {
	scanner.Scan()
	read = scanner.Text()
	return
}

func readStrings() (read []string) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, string(v))
	}
	return
}

func s2i(s string) int64 {
	var intVal, e = strconv.ParseInt(s, 10, 64)
	if e != nil {
		panic(e)
	}
	return intVal
}

func i2s(i int64) string {
	var strVal = strconv.FormatInt(i, 10)
	return strVal
}

func s2f(s string) float64 {
	var floatVal, e = strconv.ParseFloat(s, 64)
	if e != nil {
		panic(e)
	}
	return floatVal
}

func abs(i int64) int64 {
	return int64(math.Abs(float64(i)))
}

func max(a ...int64) int64 {
	ans := int64(0)
	for i, v := range a {
		if i == 0 {
			ans = v
		}
		if ans < v {
			ans = v
		}
	}
	return ans
}
func min(a ...int64) int64 {
	ans := int64(0)
	for i, v := range a {
		if i == 0 {
			ans = v
		}
		if ans > v {
			ans = v
		}
	}
	return ans
}

func sum(i []int64) int64 {
	sum := int64(0)
	for _, val := range i {
		sum += val
	}
	return sum
}

func split(s string) []string {
	return strings.Fields(s)
}

func strAry2intAry(strs []string) []int64 {
	var ret = make([]int64, 0, len(strs))
	for _, str := range strs {
		var intVal = s2i(str)
		ret = append(ret, intVal)
	}
	return ret
}

func intAry2strAry(nums []int64) []string {
	var ret = make([]string, 0, len(nums))
	for _, num := range nums {
		var strVal = i2s(num)
		ret = append(ret, strVal)
	}
	return ret
}

func ary2str(strs []string) string {
	return strings.Join(strs, " ")
}

func reverse(res []int64) []int64 {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}
func reverseStr(res []string) []string {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}

func ini(res []int, init int) {
	if len(res) == 0 {
		return
	}
	res[0] = init
	for i := 0; i < len(res); i++ {
		copy(res[i:], res[:i])
	}
}

//
// func regexpExample() {
//     // Your code here!
//     var str = "13:20"
//     r := regexp.MustCompile(`(\d+):(\d+)`)
//     fmt.Println(r.FindStringSubmatch(str))
// }

// type Country struct {
//     gold int
//     silver int
//     blonze int
// }

// // 複数ソートのサンプル
// func stableSortExample() []Country{
//     var country = []Country {
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:3, blonze:2},
//         {gold:1, silver:3, blonze:3},
//     }
//     sort.SliceStable(country, func(i, j int) bool { return country[i].blonze > country[j].blonze })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].silver > country[j].silver })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].gold > country[j].gold })
//     return country
// }


package main

import (
	"fmt"
)

func main() {
	var a, b, c string
	fmt.Scan(&a, &b, &c)
	fmt.Printf("%s%s%s", a[0:1], b[0:1], c[0:1])
}


package main
import "fmt"
var s1,s2,s3 string
func main(){

  fmt.Scanln(&s1,&s2,&s3)
  fmt.Printf("%c%c%c",s1[0],s2[0],s3[0])

}


package main

import (
	"bufio"
	"container/heap"
	"fmt"
	"math"
	"os"
	"strconv"
	"strings"
)

const (
	initialBufSize = 10000
	maxBufSize     = 1000000
	mod            = 1e9 + 7
)

var (
	sc *bufio.Scanner = func() *bufio.Scanner {
		sc := bufio.NewScanner(os.Stdin)
		buf := make([]byte, initialBufSize)
		sc.Buffer(buf, maxBufSize)
		sc.Split(bufio.ScanWords)
		return sc
	}()
)

func main() {
	stringArray := getStringArray(3)
	fmt.Println(strings.ToUpper(stringArray[0] + stringArray[1] + stringArray[2]))
}

type Graph struct {
	n     int
	edges [][]int
}

func NewGraph(n int) *Graph {
	g := &Graph{
		n:     n,
		edges: make([][]int, n),
	}
	return g
}

func (g *Graph) AddEdge(u, v int) {
	g.edges[v] = append(g.edges[v], u)
	g.edges[u] = append(g.edges[u], v)
}

func dfs(c int, edges [][]int, visited map[int]struct{}) {
	visited[c] = struct{}{}

	for _, v := range edges[c] {
		_, flag := visited[v]
		if flag {
			continue
		}
		dfs(v, edges, visited)
	}
}

func bfs(c int, graph *Graph) {
	next := make([]int, 0)
	next = append(next, c)
	visited := make(map[int]struct{})

	for ; len(next) != 0; {
		u := next[0]
		next = next[1:]
		visited[u] = struct{}{}

		for _, v := range graph.edges[u] {
			_, flag := visited[v]
			if flag {
				continue
			}

			// なにか処理

			next = append(next, v)
		}
	}
}

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getIntArray(n int) []int {
	array := make([]int, n)
	for i := 0; i < n; i++ {
		array[i] = getInt()
	}
	return array
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

func getStringArray(n int) []string {
	array := make([]string, n)
	for i := 0; i < n; i++ {
		array[i] = getString()
	}
	return array
}

func abs(a int) int {
	return int(math.Abs(float64(a)))
}

func pow(p, q int) int {
	return int(math.Pow(float64(p), float64(q)))
}

func powMod(n, p int) int {
	if p == 0 {
		return 1
	} else if p%2 == 0 {
		t := powMod(n, p/2)
		return calcMod(t * t)
	} else {
		return calcMod(n * powMod(n, p-1))
	}
}

func min(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton min() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Min(float64(res), float64(nums[i])))
	}
	return res
}

func max(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton max() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Max(float64(res), float64(nums[i])))
	}
	return res
}

func strSearch(a []string, b string) bool {
	for i := 0; i < len(a); i++ {
		if a[i] == b {
			return true
		}
	}
	return false
}

func printIntArray(array []int) {
	strArray := fmt.Sprint(array)
	fmt.Println(strArray[1 : len(strArray)-1])
}

func calcMod(x int) int {
	return x % mod
}

func reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func isPrime(n int) bool {
	if n < 2 {
		return false
	} else if n == 2 {
		return true
	} else if n % 2 == 0 {
		return false
	}

	sqrtN := int(math.Sqrt(float64(n)))
	for i := 3; i <= sqrtN; i += 2 {
		if n % i == 0 {
			return false
		}
	}

	return true
}

func contains(s []int, e int) bool {
	for _, v := range s {
		if e == v {
			return true
		}
	}
	return false
}

func makeRange(min, max int) []int {
	a := make([]int, max-min+1)
	for i := range a {
		a[i] = min + i
	}
	return a
}

func powerset2(nums []int) [][]int {
	length := int(math.Pow(2, float64(len(nums))))
	result := make([][]int, length)

	index := 0
	result[index] = []int{}
	index++

	for _, n := range nums {
		max := index
		for i := 0; i < max; i++ {
			result[index] = copyAndAppend(result[i], n)
			index++
		}
	}

	return result
}

func copyAndAppend(nums []int, n int) []int {
	dst := make([]int, len(nums)+1)
	copy(dst, nums)
	dst[len(nums)] = n
	return dst
}

func calcGcd(x, y int) int {
	if y == 0 {
		return x
	} else if x >= y {
		return calcGcd(y, x % y)
	} else {
		return calcGcd(x, y % x)
	}
}

func getDivisor(n int) []int {
	var divisor []int
	divisor = append(divisor, 1)
	if n != 1 {
		divisor = append(divisor, n)
	}

	sqrt := int(math.Sqrt(float64(n)))
	for i := 2; i <= sqrt; i++ {
		if n % i == 0 {
			divisor = append(divisor, i)
			divisor = append(divisor, n/i)
		}
	}
	return divisor
}

type intHeap []int

func (h intHeap) Len() int {
	return len(h)
}

func (h intHeap) Less(i, j int) bool {
	return h[i] > h[j]
}

func (h intHeap) Swap(i, j int) {
	h[i], h[j] = h[j], h[i]
}

func (h *intHeap) Push(x interface{}) {
	*h = append(*h, x.(int))
}

func (h *intHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

func initHeap() *intHeap {
	ih := &intHeap{}
	heap.Init(ih)
	return ih
}

func (h *intHeap) pushHeap(n int) {
	heap.Push(h, n)
}

func (h *intHeap) popHeap() int {
	return heap.Pop(h).(int)
}

func factMod(n int) int {
	value := 1
	for ; n > 1; n-- {
		value = calcMod(value * n)
	}
	return value
}

func combinationMod(n, k int) int {
	factN := factMod(n)
	factK := factMod(k)
	factNK := factMod(n - k)
	factKR := powMod(factK, mod - 2)
	factNKR := powMod(factNK, mod - 2)
	return calcMod(factN * calcMod(factKR * factNKR))
}

func primeFactors(n int) [] int {
	factors := make([]int, 0)
	i := 2
	for i * i <= n {
		r := n % i
		if r != 0 {
			i += 1
		} else if r == 0 {
			n /= i
			factors = append(factors, i)
		}
	}
	if n > 1 {
		factors = append(factors, n)
	}
	return factors
}


package main
import "fmt"
var s1,s2,s3 string
func main(){

  fmt.Scanln(&s1,&s2,&s3)
  fmt.Printf(s1[0])
  fmt.Printf(s2[0])
  fmt.Printf(s3[0])

}


package main
import "fmt"
var s1,s2,s3 string
func main(){

  fmt.Scanln(&s1,&s2,&s3)
  fmt.printf(s1[0])
  fmt.printf(s2[0])
  fmt.printf(s3[0])

}


a,b,c = gets.chomp.split(" ")
puts a.slice(0) + b.slice(0) + c.slice(0)


puts "A#{gets[8].upcase}C"


a, b, c = gets.split.map(&:to_s)
puts a[0] + b[0] + c[0]


line = gets.split(' ')
a = line[0].to_i
b = line[1].to_i
x = line[2].to_i

ans = (b - a).div(x)

ans += 1 if a % x == 0
ans += 1 if b % x == 0
ans -= 1 if a % x == 0 && b % x == 0
p ans


puts "AtCoder Smell Contest".split.map {|k| k[0]}.join


def contenst(word)
  puts "A#{x[0]}C"
end

A,x,C = gets.chomp.split(" ").map(&:to_s)
contenst(x)


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!{
        s:chars,
        p:chars,
        q:chars,
    }
    print!("A");
    print!("{}", (p[0].to_string()).to_uppercase());
    print!("C");
}


use std::io::stdin;

fn main() {
    let mut s = String::new();
    stdin().read_line(&mut s).ok();
    let a = s
        .split_whitespace()
        .map(|e| e.chars().next().unwrap())
        .skip(1)
        .next()
        .unwrap();

    println!("A{}C", a);
}


use std::io;

fn main() {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let mut iter = buf.trim().split_whitespace();
	for i in iter {
		let s:Vec<char> = i.chars().collect::<Vec<char>>();
		print!("{}", s[0]);
	}
	println!("");
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!{
        s:chars,
        p:chars,
        q:chars,
    }
    print!("A");
    print!("{}", (p[0]).to_uppercase());
    print!("C");
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!{
        s:chars,
        p:chars,
        q:chars,
    }
    print!("A{}C", (p[0]).to_uppercase());
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!{
        s:chars,
        p:chars,
        q:chars,
    }
    print!("A{}C", p[0].to_uppercase());
}


var s="";readLine()!.characters.split(" ").map{String($0)}.forEach{s+=$0.characters.map{String($0)}[0]};print(s)


import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let x = split[0]
//String -> Intの型変換はnilが返る可能性があるので、ラップされたOptional<Int>型が返るので強制アンラップ
let y = split[1]

let z = split[2]

print("A" + y.prefix(1) + "C")   // B


import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let x = split[0]
//String -> Intの型変換はnilが返る可能性があるので、ラップされたOptional<Int>型が返るので強制アンラップ
let y = split[1]

let z = split[2]

print("A"+y.prefix(1)+"C")


import Foundation

import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let x = Int(split[0])!
//String -> Intの型変換はnilが返る可能性があるので、ラップされたOptional<Int>型が返るので強制アンラップ
let y = Int(split[1])!

let z = Int(split[2])

print(y.prefix(1))
print("A"+y+"C")


import Foundation

import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let x = Int(split[0])!
//String -> Intの型変換はnilが返る可能性があるので、ラップされたOptional<Int>型が返るので強制アンラップ
let y = Int(split[1])!

let z = Int(split[2])

var y.prefix(1)) // B
print("A"+y+"C")


import Foundation

import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let x = Int(split[0])!
//String -> Intの型変換はnilが返る可能性があるので、ラップされたOptional<Int>型が返るので強制アンラップ
let y = Int(split[1])!

let z = Int(split[2])

var y.prefix(1)) // B
print("A"+"Y"+"C")


const main = (input: string) => {
    const hoge: string = input.split(" ")[1]
    console.log("A" + hoge.split("")[0] + "C")
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


import * as fs from "fs";

let input = (fs.readFileSync("/dev/stdin", "utf8") as string).split("\n");
var contest = input[0].split(" ");
var s = contest[1];
var result = "A" + s[0] + "C";

console.log(result);


const main = (input) => {
  input = input.split(' ');
  const str1 = input[0];
  const str2 = input[1];
  const str3 = input[2];

  console.log(str1.charAt()+str2.charAt()+str3.charAt());
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


const main = (input) => {
  input = input.split(' ');
  const a = parseInt(input[0], 10);
  const b = parseInt(input[1], 10);
  const x = parseInt(input[2], 10);

  const count = 0;

  for (a; a<=b a++) {
    if (a%x===0) {
      count ++;
    }
    if (a==b) break;
  }
  console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


const main = (input) => {
  input = input.split('\n');
  const a = parseInt(input[0], 10).split(' ');
  const b = parseInt(input[1], 10).split(' ');
  const x = parseInt(input[2], 10).split(' ');

  const count = 0;

  for (a; a<=b a++) {
    if (a%x===0) {
      count ++;
    }
  }
  console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


declare function require(x: string): any;
let input: string
try {
  input = require('fs').readFileSync('/dev/stdin', 'utf8')
}
catch{
  input = require('fs').readFileSync('./input.txt', 'utf8')
}

const secondWord: string = input.split(" ")[1]

console.log('A' + secondWord.slice(0, 1) + "C")


import math
n = int(input())

ini = 1 if n%2 else 2
div = []
for i in range(ini, int(math.sqrt(n)+1),2):
  if n%i==0:
    div.append([i,n//i])
print(max(len(str(div[-1][0])),len(str(div[-1][1]))))


import math

def divisor(div, n):
    # 約数
    ini = 1 if n % 2 else 2
    for i in range(ini, int(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            div.append([i, n // i])

def main():
    N = int(input())
    div = []
    divisor(div, N)
    print(max(int(math.log10(div[-1][0]) + 1),
              int(math.log10(div[-1][1]) + 1)))
    return

main()


n = int(input())
import math
def F (a,b):
    a_len = len(str(a))
    b_len = len(str(b))
    return max(a_len,b_len)
result = 0
if n % 2 == 0:
    for i in range(2,int(math.sqrt(n))+1,2):
        if n % i == 0:
            result = len(str(n//i))
else:
    for j in range(1,int(math.sqrt(n))+1,2):
        if n % j == 0:
            result = len(str(n//j))
print(result)


n=int(input())

def f(a,b):
    return max(len(str(a)),len(str(b)))
m=10000
for a in range(1,10**10):
    if n%a==0:
        print(a)
        m=min(f(a,n//a),m)
    if n<a or n//a<a:
        break
print(m)


n=int(input())

def f(a,b):
    return max(len(str(a)),len(str(b)))
m=10000
for a in range(1,10**10):
    if n%a==0:
        m=min(f(a,n//a),m)
    if n<a:
        break
print(m)


import math
n=int(input())
ans=100
for a in range(1,int(math.sqrt(n))):
    if n%a==0:
        m=max(len(str(a)),len(str(n//a)))
        ans=min(ans,m)
print(ans)


import java.util.*;
import java.io.*;
public class Main {
    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        long n = fs.nextLong();
        List<Long> factors = new ArrayList<>();
        for(long i=1;i*i<=n;i++){
            if(n%i==0){
                factors.add(n/i);
            }
        }
        long val = factors.get(factors.size()-1);
        int digit = 0;
        while(val > 0){
            val/=10;
            digit++;
        }
        System.out.println(digit);
    }
    static class FastScanner {
            private final InputStream in = System.in;
            private final byte[] buffer = new byte[1024];
            private int ptr = 0;
            private int buflen = 0;
            private boolean hasNextByte() {
                if (ptr < buflen) {
                    return true;
                }else{
                    ptr = 0;
                    try {
                        buflen = in.read(buffer);
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                    if (buflen <= 0) {
                        return false;
                    }
                }
                return true;
            }
            private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
            private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
            public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
            public String next() {
                if (!hasNext()) throw new NoSuchElementException();
                StringBuilder sb = new StringBuilder();
                int b = readByte();
                while(isPrintableChar(b)) {
                    sb.appendCodePoint(b);
                    b = readByte();
                }
                return sb.toString();
            }
            public long nextLong() {
                if (!hasNext()) throw new NoSuchElementException();
                long n = 0;
                boolean minus = false;
                int b = readByte();
                if (b == '-') {
                    minus = true;
                    b = readByte();
                }
                if (b < '0' || '9' < b) {
                    throw new NumberFormatException();
                }
                while(true){
                    if ('0' <= b && b <= '9') {
                        n *= 10;
                        n += b - '0';
                    }else if(b == -1 || !isPrintableChar(b)){
                        return minus ? -n : n;
                    }else{
                        throw new NumberFormatException();
                    }
                    b = readByte();
                }
            }
            public int nextInt() {
                long nl = nextLong();
                if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
                return (int) nl;
            }
            public double nextDouble() { return Double.parseDouble(next());}
        }
}


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

public class Main {
  private static int width(long v) {
    int w = 0;
    while (v > 0) {
      v /= 10;
      w++;
    }
    return w;
  }

  private static int solve(long n) {
    int answer = Integer.MAX_VALUE;
    for (long k = 1; k * k <= n; k++) {
      if (n % k != 0) {
        continue;
      }
      answer = Math.min(answer, width(n / k));
    }
    return answer;
  }

  private static void execute(ContestReader reader, PrintWriter out) {
    long n = reader.nextLong();
    out.println(solve(n));
  }

  public static void main(String[] args) {
    ContestReader reader = new ContestReader(System.in);
    PrintWriter out = new PrintWriter(System.out);
    execute(reader, out);
    out.flush();
  }
}

class ContestReader {
  private BufferedReader reader;
  private StringTokenizer tokenizer;

  ContestReader(InputStream in) {
    reader = new BufferedReader(new InputStreamReader(in));
  }

  public String next() {
    while (tokenizer == null || !tokenizer.hasMoreTokens()) {
      try {
        tokenizer = new java.util.StringTokenizer(reader.readLine());
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
    return tokenizer.nextToken();
  }

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

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

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

  public String[] next(int n) {
    String[] array = new String[n];
    for (int i = 0; i < n; i++) {
      array[i] = next();
    }
    return array;
  }

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

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

  public double[] nextDouble(int n) {
    double[] array = new double[n];
    for (int i = 0; i < n; i++) {
      array[i] = nextDouble();
    }
    return array;
  }

  public char[] nextCharArray() {
    return next().toCharArray();
  }

  public int[][] nextInt(int n, int m) {
    int[][] matrix = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextInt();
      }
    }
    return matrix;
  }

  public long[][] nextLong(int n, int m) {
    long[][] matrix = new long[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextLong();
      }
    }
    return matrix;
  }

  public double[][] nextDouble(int n, int m) {
    double[][] matrix = new double[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextDouble();
      }
    }
    return matrix;
  }

  public char[][] nextCharArray(int n) {
    char[][] matrix = new char[n][];
    for (int i = 0; i < n; i++) {
      matrix[i] = next().toCharArray();
    }
    return matrix;
  }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

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

	void solve() {
		FastScanner sc = new FastScanner();
		long N = sc.nextLong();
		int sqrt = (int)Math.sqrt(N);
		int ans = Integer.MAX_VALUE;
		for (int i = 1; i <= sqrt; i++) {
			if (N % i == 0) ans = Math.min(ans, String.valueOf(N/i).length());
		}
		out(ans);
	}

	class Combination {
		final int mod;
		final int max;

		final long[] fact;
		final long[] inv;
		final long[] invfact;

		public Combination(int n) {
			this(n, 1_000_000_007);
		}

		public Combination(int n, int mod) {
			this.mod = mod;
			max = n + 1;
			fact = new long[max];
			invfact = new long[max];
			inv = new long[max];

			inv[1] = 1;
			for (int i = 2; i < inv.length; i++) {
				inv[i] = inv[mod % i] * (mod - mod / i) % mod;
			}

			fact[0] = 1;
			invfact[0] = 1;
			for (int i = 1; i < inv.length; i++) {
				fact[i] = i * fact[i - 1] % mod;
				invfact[i] = inv[i] * invfact[i - 1] % mod;
			}
		}

		public long get(int n, int r) {
			return fact[n] * invfact[n - r] % mod * invfact[r] % mod;
		}
	}

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

	void out(String a) {
		System.out.println(a);
	}

	void out(int a) {
		System.out.println(a);
	}

	void out(long a) {
		System.out.println(a);
	}

	void out(double a) {
		System.out.println(a);
	}

	void out(char a) {
		System.out.println(a);
	}
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        if (hasNextByte())
            return buffer[ptr++];
        else
            return -1;
    }

    private boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    public boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr]))
            ptr++;
        return hasNextByte();
    }

    public String next() {
        if (!hasNext())
            throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext())
            throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
            throw new NumberFormatException();
        return (int) nl;
    }

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


package practise;

import java.util.*;

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

		long min=1000000000;
		long max;
		for(long i=1;i<=n/2;i++)
		{
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);

			}
		}
		System.out.println(min);

	}

}


import java.util.*;

public class Main2 {
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		long n=sc.nextLong();
		long right;
		long left;

		long min=1000000000;
		long max;
		for(long i=1;i<=n/2;i++)
		{
			if(n%i==0)
			{
				right=n/i;
				if(right>i) max=right;
				else max=i;
				min=Math.min(min,(long)Math.log10(max)+1);

			}
		}
		System.out.println(min);

	}

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.Scanner;
import java.util.HashMap;
import java.util.Collections;
import java.util.ArrayList;

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

    static class DigitsMultiplication {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            HashMap<Long, Long> map = primeFactorize(n);
            List<Long> list = new ArrayList<>(map.keySet());
            list.sort(Collections.reverseOrder());
            long a = 1;
            long b = 1;

            if (n == 1) {
                out.println(1);
                return;
            }
            for (Long key : list) {
                Long limit = map.get(key);
                for (int j = 0; j < limit; j++) {
                    if (String.valueOf(a).length() < String.valueOf(b).length()) {
                        a *= key;
                    } else {
                        b *= key;
                    }
                }
            }

            int result = Math.max(
                    String.valueOf(a).length(),
                    String.valueOf(b).length()
            );
            out.println(result);
        }

        static HashMap<Long, Long> primeFactorize(long x) {
            HashMap<Long, Long> result = new HashMap<>();
            for (long i = 2; i * i <= x; i++) {
                if (x % i != 0) {
                    continue;
                }
                long ex = 0;
                while (x % i == 0) {
                    ex++;
                    x /= i;
                }
                result.put(i, ex);
            }
            if (x != 1) {
                result.put(x, 1L);
            }
            return result;
        }

    }
}


#include <stdio.h>
#include <math.h>
#ifdef _MSC_VER
#include <conio.h>
#else
#define getch()
#include <climits>
#define _CRT_INT_MAX INT_MAX
#endif

int mysqrt(long long int x){
	int a=0,c=0,y=0,i=0,t=x;
	while(t>>=1){
		++i;
	}
	for(i+=i&1; i>=0; i-=2){
		c=(y<<1|1)<=x>>i;
		a=a<<1|c;
		y=y<<1|c;
		x-=c * y<<i;
		/* if(c){
		x -= y << i;
		} */
		y+=c;
	}
	return a;
}

int Digits(long long int A){
	return log10(A)+1;
}

inline int Min(int A,int B){
	return A<=B?A:B;
}

inline long long int Max(int A,int B){
	return A>=B?A:B;
}

int main(){
	long long int N=0;
	int Ans=0;
	scanf(" %lld",&N);
	long long int Sqrt=sqrt(N);
	bool TickFlag=false;
	int Tick=1;
	if(N%2!=0)TickFlag=true;
	for(long long int i=Sqrt;;i-=Tick){
		if(TickFlag==true&&Tick==1&&i%2!=0){
			Tick=2;
		}
		if(N%i==0){
			Ans=Max(Digits(i),Digits(N/i));
			break;
		}
	}
	printf("%d\n",Ans);
	getch();
}


#include <cstdio>
#include <algorithm>
using namespace std;

typedef long long ll;

int DigitNum(ll x)
{
	int r = 0;
	while (x > 0)
	{
		x /= 10;
		++r;
	}
	return r;
}

int main()
{
	long long N;
	scanf("%lld", &N);

	ll dMax = 0;
	for (ll d = 2; d*d <= N; ++d)
	{
		if (N % d)
			continue;
		dMax = d;
	}

	ll r = N;
	if (dMax)
	{
		r = N / dMax;
	}
	int ans = DigitNum(r);
	printf("%d\n", ans);

	return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;
using ull = unsigned long long;

int Digits(ull n){
	int res = 1;
	while(n /= 10){
		res++;
	}
	return res;
}

int main(){
	ull N;
	scanf("%llu", &N);
	int answer = Digits(N);
	for (ull i = 2; i*i <= N; ++i){
		if(!(N % i)) answer = min(answer, Digits(N/i));
	}
	printf("%d\n", answer);
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cstring>
#include<functional>
#include<vector>
using namespace std;

long long int ketasuu(long long int a){
  long long int c=0;
  while(a!=0){
    a /=10;
    c++;
  }
  return c;
}

int main(){
  long long int n;
  cin>>n;
  long long int ans=n;
  for(long long int i=1;i<=(n/2);i++){
    if(n%i==0){
      ans=min(ans,max(ketasuu(i),ketasuu(n/i)));
    }
  }
  cout<<ans<<endl;
}


#include<iostream>
#include<algorithm>
#include<cstring>
#include<functional>
#include<vector>
using namespace std;

long long int ketasuu(long long int a){
  long long int c=0;
  while(a!=0){
    a /=10;
    c++;
  }
  return c;
}

int main(){
  long long int n;
  cin>>n;
  long long int ans=n;
  for(long long int i=1;i<=n;i++){
    if(n%i==0){
      ans=min(ans,max(ketasuu(i),ketasuu(n/i)));
    }
  }
  cout<<ans<<endl;
}


#include <iostream>

using namespace std;

int get_digit(long long x) {
  int res = 0;
  while (x > 0) {
    res++;
    x /= 10;
  }
  return res;
}

long long sqrt_floor(long long x) {
  long long l = 0, r = x+1, m;
  while (l + 1 < r) {
    m = (l + r) / 2;
    (m * m <= x ? l : r) = m;
  }
  return l;
}

int main() {
  long long N;
  cin >> N;

  long long d = sqrt_floor(N);

  do {
    if (N % d == 0) {
      cout << get_digit(N / d) << endl;
      break;
    }
  } while (--d > 0);
}


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define ll long long
#define rep(i,l,r) for(ll i=(l);i<(r);i++)
#define max(p,q) ((p)>(q)?(p):(q))
#define min(p,q) ((p)<(q)?(p):(q))
#define chmax(a,b) ((a)=(a)>(b)?(a):(b))
#define chmin(a,b) ((a)=(a)<(b)?(a):(b))
#define abs(p) ((p)>=(0)?(p):(-(p)))
int cmp(const void *a, const void *b);
//your code here!
ll F(ll a, ll b);
int main(void){
    ll N, s, i;
    scanf("%lld", &N);
    ll MIN = F(1, N);
    if(N%2==0) s=2;
    else s=3;
    for(i=s; i<=sqrt(N); i+=2){
        if(N%i==0){
            chmin(MIN, F(i, N/i));
        }
    }
    printf("%lld\n", MIN);
    return 0;
}
ll F(ll a, ll b){
    ll w, cnt=0;
    if(a>b) w=a;
    else w=b;
    while(w!=0){
        w /= 10;
        cnt++;
    }
    return cnt;
}
int cmp(const void *a, const void *b){
    ll A=*(ll *)a, B=*(ll *)b;
    if(A==B)return 0;
    else return A>B ? 1:-1;//昇順ソート
}


#include <stdio.h>
#include <inttypes.h>

uint64_t soinsu[32];
int soinsuNum[32];
int soinsuCount = 0;

int search(int idx, uint64_t A, uint64_t B) {
	if (idx >= soinsuCount) {
		int Acnt = 0, Bcnt = 0;
		while (A > 0) Acnt++, A /= 10;
		while (B > 0) Bcnt++, B /= 10;
		return Acnt >= Bcnt ? Acnt : Bcnt;
	} else {
		int i;
		int result = 9999;
		for (i = 0; i <= soinsuNum[idx]; i++) {
			uint64_t newA = A, newB = B;
			int j;
			int candidate;
			for (j = 0; j < soinsuNum[idx]; j++) {
				if (j < i) newA *= soinsu[idx]; else newB *= soinsu[idx];
			}
			candidate = search(idx + 1, newA, newB);
			if (candidate < result) result = candidate;
		}
		return result;
	}
}

int main(void) {
	uint64_t N;
	uint64_t d;
	if (scanf("%" SCNu64, &N) != 1) return 1;
	for (d = 2; d * d <= N; d++) {
		if (N % d == 0) {
			soinsu[soinsuCount] = d;
			soinsuNum[soinsuCount] = 0;
			while (N % d == 0) {
				N /= d;
				soinsuNum[soinsuCount]++;
			}
			soinsuCount++;
		}
	}
	if (N > UINT64_C(1)) {
		soinsu[soinsuCount] = N;
		soinsuNum[soinsuCount] = 1;
		soinsuCount++;
	}
	printf("%d\n", search(0, 1, 1));
	return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define ll long long
#define rep(i,l,r) for(ll i=(l);i<(r);i++)
#define max(p,q) ((p)>(q)?(p):(q))
#define min(p,q) ((p)<(q)?(p):(q))
#define chmax(a,b) ((a)=(a)>(b)?(a):(b))
#define chmin(a,b) ((a)=(a)<(b)?(a):(b))
#define abs(p) ((p)>=(0)?(p):(-(p)))
int cmp(const void *a, const void *b);
//your code here!
ll F(ll a, ll b);
int main(void){
    ll N, s, i;
    scanf("%lld", &N);
    ll MIN = F(1, N);
    if(N%2==0) s=2;
    else s=3;
    for(i=s; i<=sqrt(N); i+=2){
        if(N%i==0){
            chmin(MIN, F(i, N/i));
        }
    }
    printf("%lld\n", MIN);
    return 0;
}
ll F(ll a, ll b){
    ll w=max(a,b), cnt=0;
    while(w!=0){
        w /= 10;
        cnt++;
    }
    return cnt;
}
int cmp(const void *a, const void *b){
    ll A=*(ll *)a, B=*(ll *)b;
    if(A==B)return 0;
    else return A>B ? 1:-1;//昇順ソート
}


#include <stdio.h>

int main() {
  int i,j,h,A,B,F,F1,F2,N;
  scanf("%d",&N);
  while((N>=(10^10)) && (N<=1)){
  scanf("%d",&N);
  }
  for(i=1;i<N;i++){
    if(N%i==0){
      A=N/i;
      B=N/A;
      for(j=1;A>10;j++)A=A/10;
      for(h=1;B>10;h++)B=B/10;
      if((F1=0) || (F1<j)){
        F1=j;
      }
      if((F2=0) || (F2<h)){
        F2=h;
      }
    }
  }
  F=F2-F1;
  if(F<0){
    F=F*(-1);
  }
  printf("%d",F);
  return 0;
}


#include<stdio.h>
#include<math.h>

int main()
{
  long long n;
  double s;
  int i;
  int a;
  int max=0;
  int ans;
  scanf("%lld",&n);
  s=sqrt(n);
  for(i=1;i<=s;i++){
    a=n/i;
    if(n%a==0){
      max=a;
    }
  }
  a=max;
  for(i=1;;i++){
    a/=10;
    if(a==0){
      ans=i;
      break;
    }
  }
  printf("%d",ans);
  return 0;
}


#include<stdio.h>
#include<stdlib.h>

int max(int a, int b){
  if(a > b) return a;
  else return b;
}

int min(int a, int b){
  if(a < b) return a;
  else return b;
}

typedef long long ll;

ll check_digit(ll a){

  int digit = 1;
  while( (a / 10) > 0 ){
    ++digit;
    a /= 10;
  }

  return digit;

}

int main(){

  ll n;
  scanf("%lld",&n);

  ll ans =100000000000000000;
  for(ll a = 1; a*a < n; ++a){
    if(n % a != 0) continue;
    ll b = n/a;
    int tmp = max(check_digit(a),check_digit(b));
    ans = min(ans,tmp);
  }

  printf("%d",ans);

  return 0;

}


function main(input) {
    var n = input[0]-0;
    var ans = 0;
    for(var i=~~Math.sqrt(n);i>0;i--){
        if(n%i==0){ ans = (~~Math.log10(n/i))+1; break;}
    }
    console.log(ans);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))


'use strict'

function main(s) {

  const N = Number(s);
  let answer = 11;

  for (let i = 1; i <= Math.sqrt(N); i++) {
    if (Number.isInteger(N / i)) {
      const f = Math.max(String(i).length, String(N / i).length);
      answer = Math.min(answer, f);
    }
  }

  console.log(answer);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


"use strict";

const main = arg => {
    const N = parseInt(arg.split("\n")[0]);
  	let ans = 0;
 	let m = 0;
  	let roopNum = Math.sqrt(N);
  	for(let i = 1; i <= roopNum; i++){
    	if(N % i == 0){
        	m = i
        }
    }
  	// 約数同士でどちらが大きいかを比較
	ans = N/m > m ? N/m : m;
  	console.log(String(ans).length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function Main(input){
	input=input.trim().split("\n");
	var N = parseInt(input,10);
	var rootN = Math.floor(Math.sqrt(N));
	var A;
	for (var i = rootN; i <= N; i++){
		if (N % i == 0){
			A = i;
			console.log(F(A));
			break;
		}
    }
}

function F(x){
	var i = 1;
	var j = 1;
	while(true){
		j *= 10;
		if (x >= j){
			i++;
		} else {
			return i;
			break;
		}
	}
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input){
	input=input.trim().split("\n");
	let N = parseInt(input,10);
	let rootN = Math.floor(Math.sqrt(N));
	let A;
	for (let i = rootN; i <= N; i++){
		if (N % i == 0){
			A = i;
			console.log(F(A));
			break;
		}
    }
}

function F(x){
	let i = 1;
	let j = 1;
	while(true){
		j *= 10;
		if (x >= j){
			i++;
		} else {
			return i;
			break;
		}
	}
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(lines) {
    const input = lines-0
    var output = []
    for(var i=1; i*i<= input; i++){
        const a = input/i
        const b = input/a
        output.push( Math.max(a.toString().length, b.toString().length) )
    }
    const result = output.sort(function(a,b){return a-b})[0]
    console.log(result)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


// 約数作るだけでは

package main

import "fmt"

func main() {
	var N int
	fmt.Scan(&N)
	divs := enumDiv(N)
	ans := int(1e10)
	for _, a := range divs {
		b := N / a
		ans = min(ans, max(keta(a), keta(b)))
	}
	fmt.Println(ans)
}

func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func keta(x int) int {
	ret := 0
	for x > 0 {
		ret += 1
		x /= 10
	}
	return ret
}

func enumDiv(x int) (ret []int) {
	ret = []int{}
	for i := 1; i*i <= x; i++ {
		if x%i == 0 {
			ret = append(ret, i)
			if i != 1 && i*i != x {
				ret = append(ret, x/i)
			}
		}
	}
	return
}


// 全探索 しにくくない？ 約数の組を作っていく
// 1からインクリメントで割るのは間に合わないがa*b=N(a<b)なら√Nでいい
package main

import (
	"fmt"
	"sort"
)

func main() {
	var N int
	fmt.Scan(&N)
	divs := enumDiv(N)
	sort.Ints(divs)
	ans := 10000000000000
	for _, d := range divs {
		tmp := max(d, N/d)
		keta := 0
		for ; tmp > 0; tmp /= 10 {
			keta++
		}
		ans = min(ans, keta)
	}
	fmt.Println(ans)
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}

func enumDiv(x int) (ret []int) {
	ret = []int{}
	for i := 1; i*i <= x; i++ {
		if x%i == 0 {
			ret = append(ret, i)
			if i != 1 && i*i != x {
				ret = append(ret, x/i)
			}
		}
	}
	if len(ret) == 1 {
		ret = append(ret, x)
	}
	return
}


package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"sort"
	"strconv"
)

func main() {
	n := readi()

	d := divisor(n)
	s := strconv.Itoa(d[len(d)/2])
	fmt.Println(len(s))
}

// func divisor(n int) (res []int) {
// 	for i := 1; i <= n; i++ {
// 		if n%i == 0 {
// 			res = append(res, n/i)
// 		}
// 	}
// 	return
// }

func divisor(n int) (res []int) {
	for i := 1; i*i <= n; i++ {
		if n%i == 0 {
			res = append(res, i)
			if i*i != n {
				res = append(res, n/i)
			}
		}
	}
	sort.Ints(res)
	return
}

/*-------------------utilities-------------------*/

func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}

func max(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func chmin(x *int, y int) bool {
	if *x > y {
		*x = y
		return true
	}
	return false
}

func chmax(x *int, y int) bool {
	if *x < y {
		*x = y
		return true
	}
	return false
}

// 最大公約数
func gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}

// 最小公倍数
func lcm(a, b int) int {
	return (a * b) / gcd(a, b)
}

func comb(n, k int) int {
	if n < k {
		return 0
	}
	if n < 0 || k < 0 {
		return 0
	}
	return fac[n] * (finv[k] * finv[n-k] % MOD) % MOD
}

func permutations(arr []int) [][]int {
	var helper func([]int, int)
	res := [][]int{}

	helper = func(arr []int, n int) {
		if n == 1 {
			tmp := make([]int, len(arr))
			copy(tmp, arr)
			res = append(res, tmp)
		} else {
			for i := 0; i < n; i++ {
				helper(arr, n-1)
				if n%2 == 1 {
					tmp := arr[i]
					arr[i] = arr[n-1]
					arr[n-1] = tmp
				} else {
					tmp := arr[0]
					arr[0] = arr[n-1]
					arr[n-1] = tmp
				}
			}
		}
	}
	helper(arr, len(arr))
	return res
}

/*-------------------init-------------------*/

const (
	INF = 1000000000000000000
	MOD = 1e9 + 7

	COMB_MAX = 510000
)

var (
	readString func() string
)

var (
	fac  = [COMB_MAX]int{}
	finv = [COMB_MAX]int{}
	inv  = [COMB_MAX]int{}
)

func init() {
	readString = newReadString(os.Stdin)
}

func combInit() {
	fac[0] = 1
	fac[1] = 1
	finv[0] = 1
	finv[1] = 1
	inv[1] = 1
	for i := 2; i < COMB_MAX; i++ {
		fac[i] = fac[i-1] * i % MOD
		inv[i] = MOD - inv[MOD%i]*(MOD/i)%MOD
		finv[i] = finv[i-1] * inv[i] % MOD
	}
}

/*-------------------inputs-------------------*/

func readi() int {
	return int(readi64())
}

func readi64() int64 {
	i, err := strconv.ParseInt(readString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func readf() float64 {
	f, err := strconv.ParseFloat(readString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}


package main

import (
	"fmt"
	"math"
	"sort"
)

func main () {
	var n int
	fmt.Scan(&n)

	min := 1e10
	for i := 1; i * i <= n; i++ {
		if n % i == 0 {
			j := n / i
			max := math.Max(float64(calcDigit(i)), float64(calcDigit(j)))
			min = math.Min(max, min)
		}
	}
	fmt.Println(min)
}

// 桁数を返す
func calcDigit(n int) int {
	cnt := 0
	for n > 0 {
		cnt++
		n = n / 10
	}
	return cnt
}


package main

import (
	"fmt"
	"math"
	"sort"
)

func main () {
	var n int
	fmt.Scan(&n)

	min := 1e10
	for i := 1; i * i <= n; i++ {
		if n % i == 0 {
			j := n / i
			max := math.Max(float64(calcDigit(i)), float64(calcDigit(j)))
			min = math.Min(max, min)
		}
	}
	fmt.Println(min)
}

func calcDigit(n int) int {
	cnt := 0
	for n > 0 {
		cnt++
		n = n / 10
	}
	return cnt


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"reflect"
	"sort"
	"strconv"
	"strings"
	// "regexp"
)

/* sort */
type pair struct {
	index  int64
	p1, p2 interface{}
}
type pairs []pair

func (slice pairs) Len() int {
	return len(slice)
}

func (slice pairs) Less(i, j int) bool {
	return slice[i].index < slice[j].index
}

func (slice pairs) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

/* sort */
type Int64Slice []int64

func (slice Int64Slice) Len() int {
	return len(slice)
}

func (slice Int64Slice) Less(i, j int) bool {
	return slice[i] < slice[j]
}

func (slice Int64Slice) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}
func Int64s(a []int64)                    { sort.Sort(Int64Slice(a)) }
func Int64sSliceAreSorted(a []int64) bool { return sort.IsSorted(Int64Slice(a)) }

const (
	initialBufSize = 1e4
	maxBufSize     = 1e8
	INF            = 1e8
)

var (
	scanner = bufio.NewScanner(os.Stdin)
	writer  = bufio.NewWriter(os.Stdout)
	di      = []int64{-1, 0, 1, 0}
	dj      = []int64{0, -1, 0, 1}
)

func main() {
	buf := make([]byte, initialBufSize)
	scanner.Buffer(buf, maxBufSize)
	scanner.Split(bufio.ScanWords)
	N := readInt()
	x := DivisorList(N)
	mins := int64(1e12)
	for i := 0; i <= len(x)/2; i++ {
		mins = min(mins, (max(digitsOfSum(x[i]), digitsOfSum(x[len(x)-1-i]))))
	}
	fmt.Println(mins)
}

func digitsOfSum(n int64) (ans int64) {
	if n == 0 {
		return 1
	}
	for n > 0 {
		ans++
		n /= 10
	}
	return
}

/*==========================================
 *             Library
 *==========================================*/
/** 約数を見つける 計算量:O(n/2)*/
func DivisorList(n int64) []int64 {
	var res []int64
	for i := int64(1); i <= (n / 2); i++ {
		if n%i == 0 {
			res = append(res, i)
		}
	}
	res = append(res, n)
	return res
}
func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}
func doubleAry(h int64, w int64, init int64) (res [][]int64) {
	res = make([][]int64, h)
	for i := int64(0); i < h; i++ {
		res[i] = make([]int64, w)
		for j := int64(0); j < w; j++ {
			res[i][j] = init
		}
	}
	return
}

func aryEq(a []int64, b []int64) bool {
	return reflect.DeepEqual(a, b)
}

func clone(n []int64) (r []int64) {
	r = make([]int64, len(n))
	for i := 0; i < len(n); i++ {
		r[i] = n[i]
	}
	return
}
func write(s string) {
	writer.WriteString(s)
}

func print() {
	writer.Flush()
}

// scanner.Split(bufio.ScanWords) をコメントアウトしないと使用不可
func readLine() (s string) {
	if scanner.Scan() {
		s = scanner.Text()
	}
	return s
}

func readInt() (read int64) {
	scanner.Scan()
	read, err := strconv.ParseInt(scanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return
}

func readFloat() (read float64) {
	scanner.Scan()
	read, err := strconv.ParseFloat(scanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return
}

func readRunes() (read []rune) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, v)
	}
	return
}

func readString() (read string) {
	scanner.Scan()
	read = scanner.Text()
	return
}

func readStrings() (read []string) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, string(v))
	}
	return
}

func s2i(s string) int64 {
	var intVal, e = strconv.ParseInt(s, 10, 64)
	if e != nil {
		panic(e)
	}
	return intVal
}

func i2s(i int64) string {
	var strVal = strconv.FormatInt(i, 10)
	return strVal
}

func s2f(s string) float64 {
	var floatVal, e = strconv.ParseFloat(s, 64)
	if e != nil {
		panic(e)
	}
	return floatVal
}

func abs(i int64) int64 {
	return int64(math.Abs(float64(i)))
}

func max(a ...int64) int64 {
	ans := int64(0)
	for i, v := range a {
		if i == 0 {
			ans = v
		}
		if ans < v {
			ans = v
		}
	}
	return ans
}
func min(a ...int64) int64 {
	ans := int64(0)
	for i, v := range a {
		if i == 0 {
			ans = v
		}
		if ans > v {
			ans = v
		}
	}
	return ans
}

func sum(i []int64) int64 {
	sum := int64(0)
	for _, val := range i {
		sum += val
	}
	return sum
}

func split(s string) []string {
	return strings.Fields(s)
}

func strAry2intAry(strs []string) []int64 {
	var ret = make([]int64, 0, len(strs))
	for _, str := range strs {
		var intVal = s2i(str)
		ret = append(ret, intVal)
	}
	return ret
}

func intAry2strAry(nums []int64) []string {
	var ret = make([]string, 0, len(nums))
	for _, num := range nums {
		var strVal = i2s(num)
		ret = append(ret, strVal)
	}
	return ret
}

func ary2str(strs []string) string {
	return strings.Join(strs, " ")
}

func reverse(res []int64) []int64 {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}
func reverseStr(res []string) []string {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}

func ini(res []int, init int) {
	if len(res) == 0 {
		return
	}
	res[0] = init
	for i := 0; i < len(res); i++ {
		copy(res[i:], res[:i])
	}
}

//
// func regexpExample() {
//     // Your code here!
//     var str = "13:20"
//     r := regexp.MustCompile(`(\d+):(\d+)`)
//     fmt.Println(r.FindStringSubmatch(str))
// }

// type Country struct {
//     gold int
//     silver int
//     blonze int
// }

// // 複数ソートのサンプル
// func stableSortExample() []Country{
//     var country = []Country {
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:3, blonze:2},
//         {gold:1, silver:3, blonze:3},
//     }
//     sort.SliceStable(country, func(i, j int) bool { return country[i].blonze > country[j].blonze })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].silver > country[j].silver })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].gold > country[j].gold })
//     return country
// }


# 整数 N が与えられます。ここで、2 つの正の整数 A,B に対して、
# F(A,B) を「10 進表記における、A の桁数と B の桁数のうち大きい方」と定義します。
# 例えば、F(3,11) の値は、3 は 1 桁、11 は 2 桁であるため、F(3,11)=2 となります。
# 2 つの正の整数の組 (A,B) が N=A×B を満たすように動くとき、F(A,B) の最小値を求めてください。

n = gets.to_i

def comparison(i, j)
    return  i.to_s.length >= j.to_s.length ? i.to_s.length : j.to_s.length
end

if Math.sqrt(n) % 1 == 0
    puts Math.sqrt(n).to_i.to_s.length
else
    num = Math.sqrt(n).to_i
    while n % num != 0
        num -= 1
    end
    puts (n / num).to_s.length >= num.to_s.length ? (n / num).to_s.length : num.to_s.length
end


N = gets.to_i
n = Math.sqrt(N).floor;

while n >= 1 do
	if (N % n == 0)
		print (N/n).to_s.size, "\n"
		break
	end
	n -= 1
end


n = gets.chomp.to_i

res = Math.sqrt(n).floor

while res > 1 do
  break if n%res==0
  res -= 1
end

puts Math.log10(n/res).floor + 1


n = gets.to_i
sqrt = Math.sqrt(n).to_i
i = 1
min = sqrt
while i < sqrt
  if n % i == 0
    if (n / i).to_s.length < min
      min = (n / i).to_s.length
    end
  end
  i += 1
end
puts min


n = gets.chomp.to_i
mm = (n ** 0.5).ceil
    mm.upto(n) do |i|
        amari = n % i
        if amari == 0
             puts (i.to_s).size
            break
        end
    end


n = gets.chomp.to_i
mm = (n ** 0.5).ceil
    mm.upto(n) do |i|
        p i
        amari = n % i
        if amari == 0
             puts (i.to_s).size
            break
        end
    end


use proconio::input;
fn main() {
    input!{
        mut n:i64,
    }
    let v:Vec<i64>=func(n);
    let mut ans:i64=digit(n);
    for i in v{
        ans=std::cmp::min(ans,digit(i));
    }
    println!("{}",ans);
}

fn digit(mut n:i64)->i64{
    let mut res:i64=0;
    while n>0{
        n/=10;
        res+=1;
    }
    res
}

fn func(n:i64)->Vec<i64>{
    let mut v:Vec<i64>=Vec::new();
    for i in 2..((n as f64).sqrt() as i64 +1){
        if n%i==0{
            v.push(n/i);
        }
    }
    v
}


#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(unused_macros)]
#![allow(unused_imports)]

use std::str::FromStr;
use std::io::*;
use std::collections::*;
use std::cmp::*;

struct Scanner<I: Iterator<Item = char>> {
    iter: std::iter::Peekable<I>,
}

macro_rules! exit {
    () => {{
        exit!(0)
    }};
    ($code:expr) => {{
        if cfg!(local) {
            writeln!(std::io::stderr(), "===== Terminated =====")
                .expect("failed printing to stderr");
        }
        std::process::exit($code);
    }}
}

impl<I: Iterator<Item = char>> Scanner<I> {
    pub fn new(iter: I) -> Scanner<I> {
        Scanner {
            iter: iter.peekable(),
        }
    }

    pub fn safe_get_token(&mut self) -> Option<String> {
        let token = self.iter
            .by_ref()
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>();
        if token.is_empty() {
            None
        } else {
            Some(token)
        }
    }

    pub fn token(&mut self) -> String {
        self.safe_get_token().unwrap_or_else(|| exit!())
    }

    pub fn get<T: FromStr>(&mut self) -> T {
        self.token().parse::<T>().unwrap_or_else(|_| exit!())
    }

    pub fn vec<T: FromStr>(&mut self, len: usize) -> Vec<T> {
        (0..len).map(|_| self.get()).collect()
    }

    pub fn mat<T: FromStr>(&mut self, row: usize, col: usize) -> Vec<Vec<T>> {
        (0..row).map(|_| self.vec(col)).collect()
    }

    pub fn char(&mut self) -> char {
        self.iter.next().unwrap_or_else(|| exit!())
    }

    pub fn chars(&mut self) -> Vec<char> {
        self.get::<String>().chars().collect()
    }

    pub fn mat_chars(&mut self, row: usize) -> Vec<Vec<char>> {
        (0..row).map(|_| self.chars()).collect()
    }

    pub fn line(&mut self) -> String {
        if self.peek().is_some() {
            self.iter
                .by_ref()
                .take_while(|&c| !(c == '\n' || c == '\r'))
                .collect::<String>()
        } else {
            exit!();
        }
    }

    pub fn peek(&mut self) -> Option<&char> {
        self.iter.peek()
    }
}

fn count_digits(n: usize) -> usize {
    let mut ret = 0;
    let mut rem = n;
    while rem != 0 {
        ret += 1;
        rem /= 10;
    }
    ret
}

fn F(a: usize, b: usize) -> usize {
    max(count_digits(a), count_digits(b))
}

const INF: usize = 1 << 60;

fn main() {
    let cin = stdin();
    let cin = cin.lock();
    let mut sc = Scanner::new(cin.bytes().map(|c| c.unwrap() as char));
    let N: usize = sc.get();
    let mut ans = INF;
    for i in (1..).take_while(|i| i * i <= N) {
        if N % i == 0 {
            ans = min(ans, F(N/i, i));
        }
    }
    println!("{}", ans);
}


#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(unused_macros)]
#![allow(unused_imports)]

use std::str::FromStr;
use std::io::*;
use std::collections::*;
use std::cmp::*;

struct Scanner<I: Iterator<Item = char>> {
    iter: std::iter::Peekable<I>,
}

macro_rules! exit {
    () => {{
        exit!(0)
    }};
    ($code:expr) => {{
        if cfg!(local) {
            writeln!(std::io::stderr(), "===== Terminated =====")
                .expect("failed printing to stderr");
        }
        std::process::exit($code);
    }}
}

impl<I: Iterator<Item = char>> Scanner<I> {
    pub fn new(iter: I) -> Scanner<I> {
        Scanner {
            iter: iter.peekable(),
        }
    }

    pub fn safe_get_token(&mut self) -> Option<String> {
        let token = self.iter
            .by_ref()
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>();
        if token.is_empty() {
            None
        } else {
            Some(token)
        }
    }

    pub fn token(&mut self) -> String {
        self.safe_get_token().unwrap_or_else(|| exit!())
    }

    pub fn get<T: FromStr>(&mut self) -> T {
        self.token().parse::<T>().unwrap_or_else(|_| exit!())
    }

    pub fn vec<T: FromStr>(&mut self, len: usize) -> Vec<T> {
        (0..len).map(|_| self.get()).collect()
    }

    pub fn mat<T: FromStr>(&mut self, row: usize, col: usize) -> Vec<Vec<T>> {
        (0..row).map(|_| self.vec(col)).collect()
    }

    pub fn char(&mut self) -> char {
        self.iter.next().unwrap_or_else(|| exit!())
    }

    pub fn chars(&mut self) -> Vec<char> {
        self.get::<String>().chars().collect()
    }

    pub fn mat_chars(&mut self, row: usize) -> Vec<Vec<char>> {
        (0..row).map(|_| self.chars()).collect()
    }

    pub fn line(&mut self) -> String {
        if self.peek().is_some() {
            self.iter
                .by_ref()
                .take_while(|&c| !(c == '\n' || c == '\r'))
                .collect::<String>()
        } else {
            exit!();
        }
    }

    pub fn peek(&mut self) -> Option<&char> {
        self.iter.peek()
    }
}

fn count_digit(n: usize) -> usize {
    let mut ret = 0;
    let mut rem = n;
    while rem != 0 {
        rem /= 10;
        ret += 1;
    }
    ret
}

fn F(a: usize, b: usize) -> usize {
    max(count_digit(a), count_digit(b))
}

const INF: usize = 1 << 60;

fn main() {
    let cin = stdin();
    let cin = cin.lock();
    let mut sc = Scanner::new(cin.bytes().map(|c| c.unwrap() as char));
    let N: usize = sc.get();
    let mut ans = INF;
    for i in (1..).take_while(|k| k * k <= N) {
        if N % i == 0 {
            ans = min(ans, F(i, N/i));
        }
    }
    println!("{}", ans);
}


use proconio::input;

fn main() {
    input! {
        n: usize,
    }

    let mut a = (n as f64).sqrt() as usize;
    let b =
        loop {
            if n % a == 0 {
                break n / a;
            }
            a += 1;
        };

    let mut length = a.to_string().chars().collect::<Vec<_>>().len();
    length = std::cmp::max(length, b.to_string().chars().collect::<Vec<_>>().len());

    println!("{}", length);
}


use proconio::input;

fn main() {
    input! {
        n: i64
    };

    let mut ans = 1_000_000_000_000_000_i64;
    for a in 1..n {
        if a * a > n {
            break;
        }
        if n % a == 0 {
            let mut b = n / a;
            let mut c = 0;
            while b > 0 {
                b /= 10;
                c += 1;
            }
            ans = std::cmp::min(ans, c);
        }
    }
    println!("{}", ans);
}


#[allow(unused_imports)]
use std::cmp::max;
#[allow(unused_imports)]
use std::fmt;
#[allow(unused_imports)]
use std::fmt::Debug;
#[allow(unused_imports)]
use std::io;
#[allow(unused_imports)]
use std::str::FromStr;

fn main() {
    // ver1
    // let n: usize = get_vec_input()[0];
    // let mut result_set: (i64, i64) = (i64::MAX, i64::MAX);
    // for i in 0..n {
    //     for j in 0..n {
    //         if i * j == n {
    //             let pre_digit = max(get_digit(result_set.0), get_digit(result_set.1));
    //             let cur_digit = max(get_digit(i as i64), get_digit(j as i64));
    //             if pre_digit > cur_digit {
    //                 result_set = (i as i64, j as i64);
    //             }
    //         }
    //     }
    // }

    // let result = max(get_digit(result_set.0), get_digit(result_set.1));
    // println!("{}", result);

    // ver2
    let mut n: usize = get_vec_input()[0];
    if n == 1 {
        println!("1");
        return;
    }
    let mut result_set: (i64, i64) = (1, 1);
    for i in 2..n + 1 {
        while n % i == 0 {
            if result_set.0 <= result_set.1 {
                result_set.0 *= i as i64;
            } else {
                result_set.1 *= i as i64;
            }
            n /= i;
        }
    }
    let result: i64;
    if result_set.0 >= result_set.1 {
        result = get_digit(result_set.0);
    } else {
        result = get_digit(result_set.1);
    }
    println!("{}", result);
}

#[allow(dead_code)]
fn get_digit(value: i64) -> i64 {
    let mut digit = 0i64;
    let mut value = value;
    while value != 0 {
        value /= 10;
        digit += 1;
    }
    digit
}

#[allow(dead_code)]
fn sum_digit2(value: String) -> u32 {
    return value.chars().fold(0u32, |a, b| a + b.to_digit(10).unwrap());
}

#[allow(dead_code)]
fn sum_digit(value: i64) -> i64 {
    if value < 10 {
        return value;
    }
    return sum_digit(value / 10) + value % 10;
}

#[allow(dead_code)]
fn update_max<T>(left: &mut T, right: T)
where
    T: std::cmp::Ord + std::clone::Clone,
{
    if *left < right {
        *left = right.clone();
    }
}

#[allow(dead_code)]
fn update_min<T>(left: &mut T, right: T)
where
    T: std::cmp::Ord + std::clone::Clone,
{
    if *left > right {
        *left = right.clone();
    }
}

#[allow(dead_code)]
fn get_vec_input<T>() -> Vec<T>
where
    T: FromStr,
    T::Err: Debug,
{
    let mut input = String::new();
    io::stdin()
        .read_line(&mut input)
        .expect("Failed to read line");
    let vec: Vec<T> = input
        .split_whitespace()
        .map(|x| x.parse().unwrap())
        .collect();
    vec
}

#[allow(dead_code)]
fn get_tuple_input() -> (u64, f32) {
    let mut s = String::new();
    io::stdin().read_line(&mut s).expect("");
    let mut iter = s.trim().split_whitespace();
    let c: u64 = iter.next().unwrap().parse().unwrap();
    let n: f32 = iter.next().unwrap().parse().unwrap();
    (c, n)
}

#[allow(dead_code)]
fn get_string_input() -> String {
    let mut s = String::new();
    io::stdin().read_line(&mut s).expect("");
    s.trim().to_string()
}


import CoreFoundation
let N = Int(readLine()!)!
var ans = 10
for i in 1...Int(sqrt(Double(N))) {
    if N % i == 0 {
        ans = min(String(N/i).characters.count, ans)
    }
}
print(ans)