package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func iScan() int {
	n, _ := strconv.Atoi(Scan())
	return n
}

func fScan() float64 {
	n, _ := strconv.ParseFloat(Scan(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func SScan(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scan()
	}
	return a
}
func iSScan(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = iScan()
	}
	return a
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func sum(a []int) int {
	x := 0
	for _, v := range a {
		x += v
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	n := iScan()
	ans := 0
	for i := 1; i < n; i++ {
		if len(strconv.Itoa(i))%2 == 1 {
			ans++
		}
	}
	fmt.Println(ans)
}


N = gets.chomp
case N.length
when 1
  puts N.to_i
when 2
  puts 9
when 3
  puts N.to_i - 99 + 9
when 4
  puts 999 - 99 + 9
when 5
  puts N.to_i - 9999 + 909
when 6
  puts 99999 - 9999 + 909
end


N = gets.chomp.to_i
a = 0
if N < 10
    puts N
elsif N < 100
    puts 9
elsif N < 1000
    a = 9 + (N-99)
    puts a
elsif N < 10000
    puts 909
elsif N < 100000
    a = 909 + (N-9999)
    puts a
else
    puts 90909
end


N = gets.strip.to_i
ans=0
if N<=9
    ans=N
elsif N<=99
    ans=9
elsif N<=999
    ans=9+N-100+1
elsif N<=9999
    ans+=9+900
elsif N<=99999
    ans+=9+900+N-10000+1
else
    ans+=9+900+90000
end
puts ans


c=0
(1..gets.to_i).each{|i|c+=1 if i%2!=0}
p c


c=0
(1..gets.to_i).each{|i|c+=1 if i%2==0}
p c


c=0
(1..gets.to_i).each do |i|
  next if i.to_s.size%2!=0
  c+=1
end
p c


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

pub fn digit_num(mut n: u64) -> u64 {
    let mut keta = 0;
    let d = 10;
    while n != 0 {
        keta += 1;
        n /= d;
    }
    keta
}

fn main() {
    input! {
        n: u64
    }
    let mut cnt = 0;
    for i in 1..n+1 {
        let k = digit_num(i);
        if k % 2 != 0 {
            cnt += 1;
        }
    }
    println!("{}", cnt);
}


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

  ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
    let mut $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")
  };
}

pub trait LexicalPermutation {
    /// Return `true` if the slice was permuted, `false` if it is already
    /// at the last ordered permutation.
    fn next_permutation(&mut self) -> bool;
    /// Return `true` if the slice was permuted, `false` if it is already
    /// at the first ordered permutation.
    fn prev_permutation(&mut self) -> bool;
}

impl<T> LexicalPermutation for [T]
where
    T: Ord,
{
    /// Original author in Rust: Thomas Backman <serenity@exscape.org>
    fn next_permutation(&mut self) -> bool {
        // These cases only have 1 permutation each, so we can't do anything.
        if self.len() < 2 {
            return false;
        }

        // Step 1: Identify the longest, rightmost weakly decreasing part of the vector
        let mut i = self.len() - 1;
        while i > 0 && self[i - 1] >= self[i] {
            i -= 1;
        }

        // If that is the entire vector, this is the last-ordered permutation.
        if i == 0 {
            return false;
        }

        // Step 2: Find the rightmost element larger than the pivot (i-1)
        let mut j = self.len() - 1;
        while j >= i && self[j] <= self[i - 1] {
            j -= 1;
        }

        // Step 3: Swap that element with the pivot
        self.swap(j, i - 1);

        // Step 4: Reverse the (previously) weakly decreasing part
        self[i..].reverse();

        true
    }

    fn prev_permutation(&mut self) -> bool {
        // These cases only have 1 permutation each, so we can't do anything.
        if self.len() < 2 {
            return false;
        }

        // Step 1: Identify the longest, rightmost weakly increasing part of the vector
        let mut i = self.len() - 1;
        while i > 0 && self[i - 1] <= self[i] {
            i -= 1;
        }

        // If that is the entire vector, this is the first-ordered permutation.
        if i == 0 {
            return false;
        }

        // Step 2: Reverse the weakly increasing part
        self[i..].reverse();

        // Step 3: Find the rightmost element equal to or bigger than the pivot (i-1)
        let mut j = self.len() - 1;
        while j >= i && self[j - 1] < self[i - 1] {
            j -= 1;
        }

        // Step 4: Swap that element with the pivot
        self.swap(i - 1, j);

        true
    }
}

#[cfg(not(debug_assertions))]
macro_rules! mydbg {
    ($($arg:expr),*) => {};
}

macro_rules! echo {
    ($($a:expr),*) => {
          $(println!("{}",$a))*
      }
}

use std::cmp::Ordering::*;
#[allow(unused_imports)]
use std::cmp::{max, min};
use std::collections::HashMap;
use std::io::{stdout, BufWriter, Write};
use std::mem::swap;

fn main() {
    input! {
        n: i32,
    }
    let mut ans = 0;
    for i in 1..n + 1 {
        if calc_digit(i) % 2 == 1 {
            ans += 1;
        }
    }
    echo!(ans);
}

fn calc_digit(mut n: i32) -> i32 {
    let mut sum = 0;
    while n > 0 {
        sum += 1;
        n /= 10;
    }
    sum
}


#[allow(unused_macros)]
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)*}
    };
}

#[allow(unused_macros)]
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)*}
    };
}

#[allow(unused_macros)]
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")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

fn f(s: &[char]) -> bool {
    let m = s.len();
    for i in 0..m {
        if s[i] != s[m - 1 - i] {
            return false;
        }
    }
    true
}

use std::iter::Iterator;
use std::cmp;

fn is_odd(x: i32) -> bool {
    if x < 10 {
      return true;
    }
    if x < 100 {
      return false;
    }
    if x < 1000 {
      return true;
    }
    if x < 10000 {
      return false;
    }
    if x < 100000 {
      return true;
    }
    return false;
  }

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

    let mut count = 0;
    for i in 1 .. n + 1 {
      if is_odd(i) {
        count += 1;
      }
    }

    println!("{}", count);

}


use std::io::Read;

fn main() {
    let mut buf = String::new();
    let stdin = std::io::stdin();
    stdin.lock().read_to_string(&mut buf).unwrap();
    let mut iter = buf.split_whitespace();
    let n = iter.next().unwrap().parse::<usize>().unwrap();

    if n < 100 {
        println!("{}", std::cmp::min(9, n));
    } else if n < 1000 {
        println!("{}", std::cmp::min(999-99+9, n-99+9));
    } else {
        println!("{}", std::cmp::min(99999-9999+999-99+9, n-9999+999-99+9));
    }
}


use std::io::Read;

fn main() {
    let mut buf = String::new();
    let stdin = std::io::stdin();
    stdin.lock().read_to_string(&mut buf).unwrap();
    let n = buf.parse::<usize>().unwrap();

    if n < 100 {
        println!("{}", std::cmp::min(9, n));
    } else if n < 1000 {
        println!("{}", std::cmp::min(999-99+9, n-99+9));
    } else {
        println!("{}", std::cmp::min(99999-9999+999-99+9, n-9999+999-99+9));
    }
}


#[allow(unused_imports)]
use proconio::{fastout, input};

#[fastout]
fn main() {
    input!(n: usize);
    let mut count = 0;
    let mut div = 1;
    loop {
        if n / div >= 1 {
            if n < div * 10 {
                count += (n % (div)) + 1;
            } else {
                count += div * 9;
            }
        } else {
            break;
        }
        div *= 100;
    }
    println!("{}", count);
}


import Foundation

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

let nb=readInts()
let n=nb[0]

var i:Double=1
var ans=0

while(i<=Double(n)){
  if(Int(log10(i))%2==0) {ans+=1}
  i+=1
}
print(ans)


let n = Int(readLine()!)!

var result = 0

var power = 1

while power <= n {
    let limit = min(10 * power - 1, n)
    result += limit - power + 1
    power *= 100
}

print(result)


let n=Int(readLine()!)!
var count=0
for i in 1...n{
  if (String(i).count)%2==1{
    count+=1
  }
}
print(count)


import Foundation

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

let reader=readInts()
let n:Double=Double(reader[0])
var ans:Double=0

var i:Double=1
var num:Double=9
while(i<=log10(n)){
  ans+=num
  num*=100
  i+=2
}

var comp=1
i=1
while(i<=log10(n)){
  comp*=10
  i+=1
}

if Int(log10(n))%2==0 {ans+=(Double(Int(n)%comp))+1}

print(Int(ans))


let n=Int(readLine()!)!
if 1<= n && n<=9{
  print(n)
}else if 101<=n && n<=999{
  print(9+n-100)
}else if 1001<=n && n<=9999{
  print(9+899+n-1000)
}else if 10001<=n && n<=99999{
  print(9+899+8999+n-10000)
}


let n = Int(readLine()!)!

var result = 0

var power = 1

while power <= n {
    let limit = min(power, n)
    result += limit - power
    power *= 100
}

print(result)


import * as fs from "fs"
const process = (n: number): string => {
  const a1 = 9
  const a3 = 999 - 100 + 1
  const a5 = 99999 - 10000 + 1
  const l = (n + "").length
  if (l === 2) {
    return a1 + ""
  }
  if (l === 4) {
    return a1 + a3 + ""
  }
  if (l === 6) {
    return a1 + a3 + a5 + ""
  }

  if (l === 1) {
    return n + ""
  }
  if (l === 3) {
    return a1 + (n - 100 + 1) + ""
  }
  // if (l === 5)
  return a1 + a3 + (n - 10000 + 1) + ""
}

const Main = (input: string): string => {
  const n: number = parseInt(input)

  const res = process(n) + ""
  console.log(res)
  return res
}
Main(fs.readFileSync("/dev/stdin", "utf8"))


function main(input: string) {
  const lines = input.trim().split('\n')

  const [n] = lines[0].split(' ').map(Number)
  let res = 0
  for (let i = 1; i <= n; i++) {
    if (i >= 100000) {
    } else if (i >= 10000) {
      res += 1
    } else if (i >= 1000) {
    } else if (i >= 100) {
      res += 1
    } else if (i >= 10) {
    } else {
      res += 1
    }
  }
  console.log(res)
}

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


const calc = (a) => {
  let sum = 0;
  if (a < 10) {
    return a;
  } else {
    sum += 9;
  }

  if (a < 100) return sum;

  if (a < 1000) {
    sum += a - 100 + 1;
    return sum;
  } else {
    sum += 900;
  }

  if (a < 10000) return sum;

  if (a < 100000) {
    sum += a - 10000 + 1;
    return sum;
  } else {
    sum += 90000;
  }

  return sum;
}

// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split("\n");
	//文字列から10進数に変換するときはparseIntを使います
  const a = parseInt(input[0], 10);
  const result = calc(a);
  //出力
	console.log('%d',result);
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）

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


((input: string): void => {
    const hoge = [...Array(Number(input))].map((_, i) => i+1)
    const fuga = hoge.filter(v => String(v).split("").length % 2 != 0)
    console.log(fuga.length);
})(require('fs').readFileSync('/dev/stdin', 'utf8'));


import * as fs from 'fs';

//in
//
//out
//
const main = (inp: string) => {
    let n: number = parseInt(inp);
    let ans: number = 0;
    while (n < 0) {
        if (n.toString().length % 2 === 1) {
            ans++;
        }
        n--;
    }
    console.log(ans);
};

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


import * as fs from 'fs';

//in
//
//out
//
const main = (inp: string) => {
    let n: number = parseInt(inp);
    let ans: number = 0;
    while (n < 0) {
        if (n.toString().length % 2 === 0) {
            ans++;
        }
        n--;
    }
    console.log(ans);
};

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


import math

x = int(input())

money = 100
count = 0

while money < x:
    count = count + 1
    money = math.floor(money * 1.01)

print(count)


X = int(input())
t = 100
cnt = 0

while t < X:
  t = t*1.01//1
  cnt += 1

print(cnt)


X = int(input())
k = 100
ans = 0
while k < X:
    ans += 1
    k = int(k*1.01)
print(ans)


X = int(input())
i = 1
x = 100
while True:
    x += x / 100
    x = int(x)
    if x >= X:
        print(i)
        exit()
    i += 1


x=int(input())
#x=105
cb=100

i=0
while cb <= x:
    cb=cb*1.01
    i+=1
print(i)


X = int(input())
money = 100
y = 0
while True:
  money = int(101 * money / 100)
#  print(money)
  y += 1
  if money >= X:
    print(y)
    break


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.StringTokenizer;
import java.util.TreeSet;

import javax.swing.*;

import static java.util.Arrays.binarySearch;
import static java.util.Arrays.copyOfRange;
import static java.util.Arrays.sort;

public class Main {

    public static void main(String[] args) throws Exception {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;

        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }
}

class Task {

    private static int mod = 998244353;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        long x = in.nextLong();
        // n * log 1.01 >= log x / 100
        out.println(cal(x));
    }

    private int cal(long x) {
        long a = 100;
        for (int i = 1;; i++) {
            a = (long) (a * 1.01);
            if (a >= x) {
                return i;
            }
        }
    }

}

class InputReader {

    private final BufferedReader reader;
    private StringTokenizer tokenizer;

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

    public String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

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

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

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

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

}


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

public class Main {
    public static void main(String[] args) throws Exception {
        FastReader sc = new FastReader();
        long x=sc.nextLong();
        long curr=100;
        int c=0;
        while (curr<x){
            curr+=(curr/100);
            c++;
        }
        System.out.println(c);
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

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


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

public class Main {

    public static void main(String[] args) {
        FastReader fs = new FastReader();
        long x =fs.nextLong();
        long years =0L;
        long principal = 100;
        while(principal <x){

            long interest = principal/100;
            principal += interest;
            years++;
        }
        System.out.println(years);

    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

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

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

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


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		long x = sc.nextLong();

		long temp = 100;
		int count = 0;
		while(true) {

			if(temp >= x || temp < 0) break;

			temp *= 1.01;
			count++;
		}

		System.out.println(count);

	}

}


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		long x = sc.nextLong();

		long temp = 100;
		int count = 0;
		while(true) {

			if(temp >= x) break;

			temp *= 1.01;
			count++;
		}

		System.out.println(count);

	}

}


import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        long x = scan.nextLong();
        long b = 100;
        int out = 0;
        while(b < x){
            b += b * 0.01;
            out++;
        }
        System.out.println(out);
    }

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


#include <stdio.h>
typedef long long ll;

int main(void) {
  ll x, i, now = 100;
  scanf("%lld", &x);
  for(i = 0; x > now; ++i) now *= 1.01;
  printf("%lld", i);
  return 0;
}


#include<cstdio>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	long long k,x;
	int n;
	scanf("%lld",&x);
	k=100;
	n=0;
	while(1)	{
		if(k>=x)	break;
		k=k*1.01;
		n++;
	}
	printf("%d\n",n);
	return 0;
}


#include<stdio.h>
long long n, m, i, j, k;
int main(){
	scanf("%lld", &m);
	n = 100;
	while(n < m){
		n = n + n / 100;
		k++;
	}
	printf("%lld", k);
	return 0;
}


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

int main() {
  long X, ans = 0, n = 100;
  cin >> X;

  while (X > n){
    n *= 1.01;
    ans += 1;
  }

  cout << ans << endl;
}


#include<bits/stdc++.h>
#define MOD 1000000007
#define mp make_pair
#define ll long long
#define pb push_back
#define faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define debug cout<<"Debugging.."<<endl
using namespace std;
int main()
{
	faster;

	ll int x;
	cin>>x;
	ll int p=0,c=0;
	while(p<x)
	{
		p+=p/100;
		c++;
	}
	cout<<c;
}


#include<bits/stdc++.h>
#define MOD 1000000007
#define mp make_pair
#define ll long long
#define pb push_back
#define faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define debug cout<<"Debugging.."<<endl
using namespace std;
int main()
{
	faster;

	int x;
	cin>>x;
	int p=0,c=0;
	while(p<x)
	{
		p+=p/100;
		c++;
	}
	cout<<c;
}


#include <stdio.h>
typedef long long ll;
int main() {
	ll x, m = 100;
	int y = 0;
	scanf("%lld", &x);
	while (1) {
		m = m * 1.01;
		y++;
		if (m >= x) {
			break;
		}
	}
	printf("%d\n", y);
	return 0;
}


#include<stdio.h>
int main(){
long long int a,i=1,b=100;
scanf("%lld", &a);

  while(1){
    b=b*1.01;
    if(b>=a){
      printf("%lld\n", i);
      return 0;
    }
      i++;
  }

}


#include <stdio.h>

int main(void){
    long long int x;
    scanf("%lld",&x);
    long long int i=100;
    long long int count=0;
    while(x>i){
        i+=i/100;
        count++;
    }
    printf("%lld\n",count);
    return 0;
}


#include<stdio.h>

int main(void){
  long long n,x=100;
  scanf("%lld",&n);
  int i=0;
  while(x<n){
    x*=101/100;
    i++;
  }
  printf("%d",i);
  return 0;
}


#include<stdio.h>

int main(void){
  long long n,x=100;
  scanf("%lld",&n);
  int i;
  for(i=1;x<n;i++){
    x*=101/100;
  }
  printf("%d",i-1);
  return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<time.h>
#define FOR(i,n) for(int i=0;i<n;i++)
#define PRN(n) printf("%d\n",n)
#define PRF(n) printf("%lf\n",n)
#define PRL(n) printf("%lld\n",n)
#define PRS(s) printf("%s\n",s)
#define PRC(c) printf("%c",c)
#define INI(n) scanf("%d",&n)
#define INL(n) scanf("%lld",&n)
#define INF 10000000000
#define mod 1000000007
#define X 100000
#define N 20
#define M 46
typedef long long int ll;
ll finv[X];
ll fac[X];
ll inv[X];
ll usort(const void *a, const void *b){return *(ll*)a-*(ll*)b;}
ll dsort(const void *a, const void *b){return *(ll*)b-*(ll*)a;}
ll ssort(const void *a, const void *b){return strcmp((char*)a,(char*)b);}
void Iswap(int *a,int *b){
  int t=*a;
  *a=*b;
  *b=t;
}
void Fswap(double *a,double *b){
  double t=*a;
  *a=*b;
  *b=t;
}
void Lswap(ll *a,ll *b){
  ll t=*a;
  *a=*b;
  *b=t;
}
ll min(ll a,ll b){
  if(a>b)return b;
  return a;
}
ll max(ll a,ll b){
  if(a>b)return a;
  return b;
}
ll z(ll a){return max(a,-a);}
ll gcd(ll a,ll b){if(!b){return a;}else{return gcd(b,a%b);}}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}
ll kt(ll a){
  ll sum=0;
  while(a){
    a/=10;
    sum++;
  }
  return sum;
}
ll ks(ll a){
  ll sum=0;
  while(a){
    sum+=a%10;
    a/=10;
  }
  return sum;
}
void nCrReady(){
  fac[0]=fac[1]=1;
  finv[0]=finv[1]=1;
  inv[1]=1;
  for (ll i=2;i<X;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;
  }
}
ll nCr(ll n,ll k){return fac[n]*(finv[k]*finv[n-k]%mod)%mod;}
ll modpow(ll a,ll n){
  ll res=1;
  while(n>0){
    if(n&1)res=res*a%mod;
    a=a*a%mod;
    n>>=1;
  }
  return res;
}
int main(void){
  ll a;
  INL(a);
  int ans=0;
  double i=100;
  while(1){
    ans++;
    i*=1.01;
    if(i>a)break;
  }
  PRN(ans);
  return 0;
}


function main(input) {
    const parsedInput = parser(input);
    console.log(amountYearCalc(parsedInput.x));
}

function parser(inputStr) {
    const splitInput = inputStr;
    return {
        x: Number(splitInput),
    };
}

function amountYearCalc(x) {
    var i = 100;
    var count = 0;
    while (x > i) {
        i = Math.floor(i * 1.01);
        count ++;
    }
    return count;
}
// test
// const Q1 = `103`;
// const Q2 = `1000000000000000000`;
// const Q3 = `1333333333`;
//
// main(Q1);
// main(Q2);
// main(Q3);
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function Main(input) {
    // 1行目がinput[0], 2行目がinput[1], …に入る
    var X = input.trim();
    var money = 100;
    var risi = 0;
    var count = 0;
    for (let i = 0; i < X; i++) {
        money = Math.floor(money * 1.01);
        if (money >= X) {
            console.log(i+1);
            i = X;
        }
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(_input) {
    var num_X = parseInt(_input);
    var num_org = 100;
    var num_Y = num_org;
    var year = 0;
    while(true){
        year++;
        num_Y = Math.floor(num_Y * 1.01);
        if(num_Y >= num_X) break;
    }
    console.log(year);
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input){
    input=input.split("\n");  //ここまで必須
    var sum=100;
    var year=0;
    while (sum<input[0]){
        sum=Math.floor(sum*1.01);
        year=year+1;
    }
    console.log(year);
}

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


function Main(input) {
    input = input.trim();
    const x = parseInt(input,10);

    let money = 100;
    for (let i = 1; i <= 3760; i++) {
        money = Math.floor(money*101/100);
        if(money >= x){
            console.log(i);
            break;
        }
    }

}

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


function Main(input) {
    input = input.trim();
    const x = parseInt(input,10);

    let money = 100;
    for (let i = 1; i <= 3760; i++) {
        money = money + Math.floor(money/100);
        if(money >= x){
            console.log(i);
            break;
        }
    }

}

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


package main

import (
	"fmt"
	"math"
)

func main() {
	var N float64
	fmt.Scanf("%f", &N)
	i := 100.0
	cnt := 0
	for ; i < N; cnt++ {
		i = math.Floor(i * 1.01)
	}
	fmt.Println(cnt)
}


package main

import (
	"fmt"
)

func main() {
	fmt.Println()
	var x int
	fmt.Scan(&x)
	fmt.Println(profit(x))
}

func profit(x int) int {
	count := 0
	for i:=100;i < x;{
	i += i/100
	count ++
	}
	return count
}


package main

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

func main() {
	sc := NewScanner()
	X := sc.NextInt()
	i := 0
	A := 100
	for ; A < X; i++ {
		T := A / 100
		A = A + T
	}
	fmt.Println(i)

}

type Scanner struct {
	r   *bufio.Reader
	buf []byte
	p   int
}

func NewScanner() *Scanner {
	rdr := bufio.NewReaderSize(os.Stdin, 1000)
	return &Scanner{r: rdr}
}
func (s *Scanner) Next() string {
	s.pre()
	start := s.p
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			break
		}
	}
	result := string(s.buf[start:s.p])
	s.p++
	return result
}
func (s *Scanner) NextLine() string {
	s.pre()
	start := s.p
	s.p = len(s.buf)
	return string(s.buf[start:])
}
func (s *Scanner) NextInt() int {
	v, _ := strconv.Atoi(s.Next())
	return v
}
func (s *Scanner) NextInt64() int64 {
	v, _ := strconv.ParseInt(s.Next(), 10, 64)
	return v
}

func (s *Scanner) NextFloat() float64 {
	v, _ := strconv.ParseFloat(s.Next(), 64)
	return v
}

func (s *Scanner) NextIntArray() []int {
	s.pre()
	start := s.p
	result := []int{}
	for ; s.p < len(s.buf)+1; s.p++ {
		if s.p == len(s.buf) || s.buf[s.p] == ' ' {
			v, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 0)
			result = append(result, int(v))
			start = s.p + 1
		}
	}

	return result
}
func (s *Scanner) NextInt64Array() []int64 {
	s.pre()
	start := s.p
	result := []int64{}
	for ; s.p < len(s.buf)+1; s.p++ {
		if s.p == len(s.buf) || s.buf[s.p] == ' ' {
			v, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 64)
			result = append(result, v)
			start = s.p + 1
		}
	}
	return result
}

func (s *Scanner) NextMap() map[int]bool {
	s.pre()
	start := s.p
	mp := map[int]bool{}
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			v, _ := strconv.Atoi(string(s.buf[start:s.p]))
			mp[v] = true
			start = s.p + 1
		}
	}
	v, _ := strconv.Atoi(string(s.buf[start:s.p]))
	mp[v] = true

	return mp
}

func (s *Scanner) pre() {
	if s.p >= len(s.buf) {
		s.readLine()
		s.p = 0
	}
}
func (s *Scanner) readLine() {
	s.buf = make([]byte, 0)
	for {
		l, p, e := s.r.ReadLine()
		if e != nil {
			panic(e)
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}


//go:generate echo "https://atcoder.jp/contests/abc165/tasks/abc165_b"
package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"math/big"
	"os"
	"strconv"
)

var scan = newScanner(os.Stdin)

func Solve(X float64) int {
	deposit := 100.0
	y := 0
	for deposit < X {
		deposit = math.Trunc(deposit * 1.01)
		y++
	}
	return y
}

func main() {
	X := scan.Float64()
	fmt.Println(Solve(X))
}

type scanner struct {
	*bufio.Scanner
}

func newScanner(r io.Reader) *scanner {
	s := bufio.NewScanner(r)
	s.Split(bufio.ScanWords)
	s.Buffer(nil, 100000000)
	return &scanner{s}
}

func (s *scanner) String() string {
	s.Scan()
	return s.Text()
}

func (s *scanner) Strings(l int) []string {
	if l == 0 {
		return []string{}
	}
	sl := make([]string, l, l)
	for i := range sl {
		sl[i] = s.String()
	}
	return sl
}

func (s *scanner) Int() int {
	n, _ := strconv.Atoi(s.String())
	return n
}

func (s *scanner) Ints(l int) []int {
	if l == 0 {
		return []int{}
	}
	sl := make([]int, l, l)
	for i := range sl {
		sl[i] = s.Int()
	}
	return sl
}

func (s *scanner) Float64() float64 {
	f, _ := strconv.ParseFloat(s.String(), 64)
	return f
}

func (s *scanner) Floats64(l int) []float64 {
	if l == 0 {
		return []float64{}
	}
	sl := make([]float64, l, l)
	for i := range sl {
		sl[i] = s.Float64()
	}
	return sl
}

func (s *scanner) BigInt() *big.Int {
	n, _ := strconv.ParseInt(s.String(), 10, 64)
	return big.NewInt(n)
}

func (s *scanner) BigInts(l int) []*big.Int {
	if l == 0 {
		return []*big.Int{}
	}
	sl := make([]*big.Int, l, l)
	for i := range sl {
		sl[i] = s.BigInt()
	}
	return sl
}

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

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

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

func ipow(x, n int) int {
	if n == 0 {
		return 1
	}
	a := ipow(x, n>>1)
	a *= a
	if n&1 != 0 {
		a *= x
	}
	return a
}

func chmax(x *int, v int) {
	if *x < v {
		*x = v
	}
}

func chmin(x *int, v int) {
	if *x > v {
		*x = v
	}
}

func factor(n int) map[int]int {
	m := map[int]int{}
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			n /= i
			m[i]++
		}
	}
	if n != 1 {
		m[n]++
	}
	return m
}

var mod = 1000000007

func setMintMod(x int) {
	mod = x
}

type mint int

func newMint(v int) mint {
	return mint((v%mod + mod) % mod)
}

func (x mint) Add(y mint) mint {
	v := x + y
	if v >= mint(mod) {
		return v - mint(mod)
	}
	return v
}

func (x mint) Sub(y mint) mint {
	v := x + mint(mod) - y
	if v >= mint(mod) {
		return v - mint(mod)
	}
	return v
}

func (x mint) Mul(y mint) mint {
	return (x * y) % mint(mod)
}

func (x mint) pow(n int) mint {
	if n == 0 {
		return mint(1)
	}
	a := x.pow(n >> 1)
	a = a.Mul(a)
	if n&1 != 0 {
		a = a.Mul(x)
	}
	return a
}

func (x mint) Inverse() mint {
	return x.pow(mod - 2)
}

func (x mint) Div(y mint) mint {
	return x * y.Inverse()
}

func (x mint) Neg() mint {
	return newMint(int(-x))
}

type factorial struct {
	fact        []mint
	factInverse []mint
}

func newFactorial(n int) *factorial {
	f := new(factorial)
	f.init(n)
	return f
}

func (f *factorial) init(n int) {
	fact := make([]mint, n+1, n+1)
	fact[0] = newMint(1)
	for i := 1; i <= n; i++ {
		fact[i] = fact[i-1].Mul(newMint(i))
	}

	inv := make([]mint, n+1, n+1)
	inv[n] = fact[n].Inverse()
	for i := n; i >= 1; i-- {
		inv[i-1] = inv[i].Mul(newMint(i))
	}

	f.fact = fact
	f.factInverse = inv
}

func (f *factorial) Get(n int) mint {
	return f.fact[n]
}

func (f *factorial) GetInverse(n int) mint {
	return f.factInverse[n]
}

func (f *factorial) Permutation(n, k int) mint {
	if k < 0 || n < k {
		return 0
	}
	return f.fact[n].Mul(f.factInverse[n-k])
}

func (f *factorial) Combination(n, k int) mint {
	if k < 0 || n < k {
		return 0
	}
	return f.fact[n].Mul(f.factInverse[k]).Mul(f.factInverse[n-k])
}

type sieve struct {
	n          int
	primes     []int
	maxFactors []int
}

func newSieve(n int) *sieve {
	s := &sieve{
		n:          n,
		primes:     []int{},
		maxFactors: make([]int, n+1, n+1),
	}
	s.init()
	return s
}

func (s *sieve) init() {
	s.maxFactors[0] = -1
	s.maxFactors[1] = -1
	for i := 2; i <= s.n; i++ {
		if s.maxFactors[i] != 0 {
			continue
		}
		s.primes = append(s.primes, i)
		s.maxFactors[i] = i
		for j := i * i; j <= s.n; j += i {
			if s.maxFactors[j] == 0 {
				s.maxFactors[j] = i
			}
		}
	}
}

func (s *sieve) IsPrime(x int) bool {
	return s.maxFactors[x] == x
}

func (s *sieve) Factor(x int) map[int]int {
	m := map[int]int{}
	for x != 1 {
		m[s.maxFactors[x]]++
		x /= s.maxFactors[x]
	}
	return m
}


package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func nextFloat64() float64 {
	sc.Scan()
	i, e := strconv.ParseFloat(sc.Text(), 64)
	if e != nil {
		panic(e)
	}
	return i
}

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

func main() {
	sc.Split(bufio.ScanWords)
	//sc.Buffer(nil, 100000000)

	x := nextInt()

	credit := 100
	ans := 0
	for i := 0; credit <= x; i++ {
		if i > 0 {
			credit = int(float64(credit) * 1.01)
			ans += 1
		}
	}
	fmt.Println(ans)
}


package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func nextFloat64() float64 {
	sc.Scan()
	i, e := strconv.ParseFloat(sc.Text(), 64)
	if e != nil {
		panic(e)
	}
	return i
}

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

func main() {
	sc.Split(bufio.ScanWords)
	//sc.Buffer(nil, 100000000)

	x := nextInt()

	credit := 100
	ans := 0
	for i := 0; credit < x; i++ {
		if i > 0 {
			credit = int(float64(credit) * 1.01)
			ans += 1
		}
	}
	fmt.Println(ans)
}


x = gets.to_i
now = 100
ans = 0

while now < x
  now = (now * 1.01).floor
  ans += 1
end

puts ans


n = gets.to_i
sum = 100
count = 0
while sum < n
  sum += (sum * 0.01).floor
  count += 1
end
puts count


X = gets.to_i
count = 0
money = 100

while money < X do
  money = (money * 1.01).floor
  count += 1
end

puts count


x = gets.to_i
a = 100
ans = 0
while true
  a += (a*0.01).to_i
  ans += 1
  if a >= x
    break
  end
end
puts ans


x=gets.to_i
i=100
y=0
loop do
  y+=1
  i=(i*1.01).floor
  break if i>=x
end
p y


a=gets.chomp
m=100
c=0
while a>m
 m+=m/100
 c+=1
end
p c


fn main(){
	let mut buf = String::new();
	std::io::stdin().read_line(&mut buf).expect("can't read X");

	let x:u128 = match buf.trim().parse(){
		Ok(num) => num,
		Err(_) => panic!("error"),
	};

	let mut a = 100;
	let mut i = 0;
	while a < x {
		a = a + (a/100);
		i = i + 1;
	}
	println!("{}", i);
}


use std::io::stdin;
use std::str::FromStr;

fn read_line<T>() -> Vec<T>
where
    T: FromStr,
    <T as std::str::FromStr>::Err: std::fmt::Debug,
{
    let mut s = String::new();
    stdin().read_line(&mut s).ok();
    s.trim()
        .split_whitespace()
        .map(|x| x.parse().unwrap())
        .collect()
}

fn read_str_as_char_vec() -> Vec<char> {
    let mut s = String::new();
    stdin().read_line(&mut s).ok();
    s.trim().chars().collect()
}

fn read_str_as_T<T>() -> T
where
    T: FromStr,
    <T as std::str::FromStr>::Err: std::fmt::Debug,
{
    let mut s = String::new();
    stdin().read_line(&mut s).ok();
    s.trim().parse().unwrap()
}

fn main() {
    let x: usize = read_line()[0];

    let mut res = 0;
    let mut base: usize = 100;
    while (base as usize) < x {
        base = ((base as f64) * 1.01) as usize;
        res += 1;
    }

    println!("{}", res);
    // let a_base = (x/100.).log(1.01);
    // if a_base.fract() == 0. {
    //     println!("{}", a_base as usize);
    // } else {
    //     println!("{}", a_base as usize + 1);
    // }
}


#![allow(unused_imports)]
use std::cmp::*;
use std::collections::*;
use itertools::Itertools;
use proconio::{input, marker::*};
use superslice::*;
use whiteread::parse_line;

fn main() {
    let x: i64 = parse_line().unwrap();
    let mut num: i64 = 100;
    let mut count: usize = 1;
    loop {
        num = (num / 100) + num;
        if num >= x {
            break;
        }
        count = count + 1;
    }
    println!("{}", count);
}


#[allow(unused_imports)]
use proconio::{
    fastout, input,
    marker::{Bytes, Chars, Isize1, Usize1},
};
#[fastout]
fn main() {
    input!(x: usize);
    let mut n = 100;
    let mut count = 0;
    while n < x {
        n = (n as f64 * 1.01) as usize;
        count += 1;
    }

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


#![allow(unused_imports)]
#![allow(unused_variables)]

use itertools::Itertools;
use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {
        x: f64,
    }
    // annotate for rust-analyzer
    let x: f64 = x;

    let mut ans = 0;
    let mut yen = 100f64;
    while yen < x {
        yen = (yen * 1.01f64).floor();
        ans += 1;
    }

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


#![allow(non_snake_case)]
use proconio::input;
// use std::collections::HashMap;

fn main() {
    input! {
        X: i64,
    }

    let mut money: i64 = 100;
    let mut year = 0;
    while money < X {
        money = (money as f64 * 1.01) as i64;
        year += 1;
    }

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


let x = Int(readLine()!)!
var yen = 100
var year = 0
while x > yen {
  year += 1
  let tmp = yen
  yen += Int(Double(tmp) * 0.01)
}
print(year)


let X = Int(readLine()!)!
var deposit = 100
var year = 0
while deposit < X {
    year += 1
    deposit += deposit / 100
}
print(year)


let x = Int(readLine()!)!

var deposit = 100
var c = 0
while deposit < x {
  c += 1
  deposit = Int(Double(deposit) * 1.01)
}

print(c)


import Foundation

let input_line: String = readLine()!
//let split: [String] = input_line.components(separatedBy: " ")
//let a = Int(split[0])!
//let b = Int(split[1])!
let x = Int(input_line)!
var money : Int64 = 100
var i : Int64 = 0
while(true) {
    if money >= x {
        print(i)
        break
    }
    money *= (money / 100)
    i += 1
}


import Foundation

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

var x = Int64(split[0])!

var money: Int64 = 100

var ans = 0
while (money < x) {
    money = Int64(Double(money) * 1.01)
    ans += 1
}

print(ans)


import Foundation

let input_line: String = readLine()!
let x = Int(input_line)!
var y = Int(100)
var i: Int = 0

while y < x{
  y = Int(Double(y) * 1.01)
  i += 1
}

print("\(i)")


import * as fs from 'fs'

const input = (fs.readFileSync('/dev/stdin', 'utf8') as string).split('\n')
const x = +input[0]

let i = 1
let sum = 100

while (true) {
  sum += Math.floor(sum * 0.01)
  if (x <= sum) {
    break
  }
  i++
}

console.log(i)


import * as fs from 'fs'
import {debug} from '../../../util'

const input = fs.readFileSync('/dev/stdin', 'utf8')
const output = (x: any) => console.log(x)
// debug(input)
const X = +input
let year = 0
let money = 100
while (money < X) {
    money += Math.floor(money * 0.01)
    year++
}
output(year)


import * as fs from 'fs';

namespace AtCoder {
    export interface Paramable {
        readonly args: string[][];
    }

    export interface Task {
        main(this: Task): void;
    }
}

namespace AtCoder.abc001 {
    export class TaskA implements AtCoder.Task, AtCoder.Paramable {
        public constructor(public readonly args: string[][]) {
        }

        public main(this: TaskA): void {
            const x: number = +this.args[0][0];

            let xx = 100;
            let ans = 0;

            while (x > xx) {
                xx += Math.floor((xx*0.01));
                ans++;
            }
            console.log(ans);
        }
    }

    const args: string[][] = fs.readFileSync('/dev/stdin', 'utf8').trim().split('\n').map(r => r.split(' '));
    const task: AtCoder.Task = new TaskA(args);
    task.main();
}


import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const X = BigInt(input[0][0]);

  let deposit = 100n;
  let years = 0;

  while (deposit >= X) {
    deposit += deposit / 100n;
    years += 1;
  }

  return years;
};

console.log(main(read()));


import * as fs from 'fs';
import { multiplies } from 'tstl';

export function Main(input: string) {
    const x = parseInt(input);   // ?

    let year = 0;
    let deposit = 100 * 100;

    while (deposit < x * 100) {
        deposit = multiplies(deposit, 1.01); // ?
        deposit = ~~deposit;    // ?
        year++;
    }

    //output

    console.log(year);
}

// Don't edit this line!
Main(fs.readFileSync("/dev/stdin", "utf8"));


import * as fs from 'fs';
import { divides, modules, multiplies } from 'tstl';

export function Main(input: string) {
    const x = parseInt(input) * 100;   // ?

    let year = 0;
    let deposit = 100 * 100;

    while (deposit < x) {
        let deposit1 = multiplies(deposit, 1.01);
        deposit = Math.floor(deposit1);
        year++;
    }

    //output
    console.log(year);
}

// Don't edit this line!
Main(fs.readFileSync("/dev/stdin", "utf8"));


import math
N,X,T=map(int,input().split())
ans=math.ceil(N/X)*T
print(ans)


import math
N, X, T = map(int,input().split())
if N%X == 0:
    print(int(N/X*T))
else:
    print((math.floor(N/X)+1)*T)


n,x,t=list(map(int,input().split()))
import math
print(math.ceil(n/x)*t)


N, X, T = (int(d) for d in input().split())

print((N // X) * T)


#abc176b
N=input()
s=0
for i in range(len(N)):
 s+=int(N[i])
if s%9==0:
 print('Yes')
else:
 print('No')


n,x,t=map(int, input().split())
print(n//x*t+t)


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

class Main {

	public static void main(String[] args) {
        FastScanner in = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt(), x = in.nextInt(), t = in.nextInt();
        long ans = 0;
        int y = n/x;
        if(n%x!=0) y++;
        ans = y*t;
        out.println(ans);

        out.flush();
	}

	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");

		String next() {
			while(!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

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

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

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

		long[] readArray(int n,long x) {
			long a[] = new long[n];
			for(int i=0;i<n;i++) a[i] = nextLong();
			return a;
		}

	}
}


import java.io.*;
import java.math.*;
import java.util.*;
import java.util.regex.*;

public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static long cnt=0;
	public static PrintWriter pw = new PrintWriter(System.out);
	public static void main(String[] args) throws Exception {
		solveA(args);
//		solveB(args);
//		solveC(args);
//		solveD(args);
//		solveE(args);
//		solveF(args);
		if(in!=null){
			in.close();
		}
		pw.flush();
		pw.close();
	}

	public static void solveA(String[] args) throws Exception{
		int N= nextInt();
		int X= nextInt();
		int T= nextInt();
		pw.println(((N+X-1)/X)*T);
	}
	public static void solveB(String[] args) throws Exception{

	}
	public static void solveC(String[] args) throws Exception{

	}

	public static void solveD(String[] args) throws Exception{

	}

	public static void solveE(String[] args) throws Exception{

	}

	public static void solveF(String[] args) throws Exception{

	}

	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * 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;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ATakoyaki solver = new ATakoyaki();
        solver.solve(1, in, out);
        out.close();
    }

    static class ATakoyaki {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt(), x = in.nextInt(), t = in.nextInt();

            out.println((((n + x) - 1) / x) * t);
        }

    }

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

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

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

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

    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

 class A{

	public static void main(String[] args) throws IOException {

		FastScanner sc=new FastScanner();

		int n = sc.nextInt();
		int x = sc.nextInt(),t = sc.nextInt();
		int val = n/x * t;
		if(n%x != 0)
			val+=t;
		System.out.println(val);

	}

	static void sort(int[] a) {
		ArrayList<Integer> l=new ArrayList<>();
		for (int i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long[] readArrayLong(int n) {
        	long[] a=new long[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
        }
		long nextLong() {
			return Long.parseLong(next());
		}
		String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class A{

	public static void main(String[] args) throws IOException {

		FastScanner sc=new FastScanner();

		int n = sc.nextInt();
		int x = sc.nextInt(),t = sc.nextInt();
		int val = n/x * t;
		if(n%x != 0)
			val+=t;
		System.out.println(val);

	}

	static void sort(int[] a) {
		ArrayList<Integer> l=new ArrayList<>();
		for (int i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long[] readArrayLong(int n) {
        	long[] a=new long[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
        }
		long nextLong() {
			return Long.parseLong(next());
		}
		String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
	}
}


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

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int x = in.nextInt();
		int t = in.nextInt();
		int ans = n / x;
		if (n % x != 0)
			ans++;
		System.out.println(ans);
	}
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define perl(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define pb push_back
#define ins insert
#define pqueue(x) priority_queue<x,vector<x>,greater<x>>
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
#define vtpl(x,y,z) vector<tuple<x,y,z>>
#define rev(x) reverse(x);
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
using vpl=vector<pl>;
using vvpl=vector<vpl>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9+10;
const ll INF=4e18;
const ll dy[8]={1,0,-1,0,1,1,-1,-1};
const ll dx[8]={0,-1,0,1,1,-1,1,-1};
ll powmod(ll n, ll k, ll m) {
ll r=1;
 for(; k>0; k >>=1) {
   if(k&1) r=(r*n)%m;
   n=(n*n)%m;
 }
  return r;
}

ll fact(ll n) {
ll a=1;
rep(i,n) {
a=a*(n-i);
}
return a;
}

ll pow(ll a, ll b) {
ll x=1;
rep(i,b) {
x=x*a;
}
return x;
}

int main() {
  ll N;
  ll X;
  ll T;
  cin >>N>>X>>T;
  cout<<((N+X-1)/X)*T<<endl;
}


#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
#include <climits>
#include <assert.h>
#include <cstring>
#include <set>

using namespace std;

typedef long long ll;

int main()
{
    int N, X, T;
    cin >> N >> X >> T;
    cout << (N+X-1)/X*T;

}


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

int main() {
    ll n, x, t;
    cin >> n >> x >> t;
    if (n<x) {
        cout << t;
        return 0;
    }
    if (n%x!=0) cout << (n/x+1)*t;
    else cout << n/x*t;
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
	int n, x, t;
	cin >> n >> x >> t;
	cout << (n / x + 1) * t << endl;
}


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

int main(){
  int n,x,t;
  int ans;
  ans = (n/x)*t;
  if(n%x) ans += t;
  cout<<ans<<endl;
  return 0;
}


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

int main() {

  int N,X,T;
  cin >> N >> X >> T;
  int jikan = 0;
  while(jikan*T*X <= N){
    jikan++; }

  cout << jikan*T << endl;

}


#include <stdio.h>

int main(void) {
	int n,x,t;
	int count;
	int ans;

	scanf("%d%d%d",&n,&x,&t);
	count = (n/x);
	if(n%x == 0){
		ans = (count)*t;
	}
	else{
		ans = (count+1)*t;
	}
	printf("%d",ans);

}


#include <stdio.h>
int main(void){
	int n, x, t;
	int kai;
	scanf("%d", &n);
	scanf("%d", &x);
	scanf("%d", &t);
	kai = n%x == 0 ? n/x : n/x+1;
	printf("%d\n", kai*t);
	return 0;
}


#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
int main(int argc, char const *argv[])
{
    int N, X, T;
    scanf("%i", &N);
    scanf("%i", &X);
    scanf("%i", &T);
    printf("%i\n", (N + X - 1) / X * T);
    return 0;
}


#include<stdio.h>

#include<conio.h>

char s[200010];
int main(){
    scanf("%s",s);
    int len=strlen(s);
    int sum=0;
    for(int i=0;i<len;i++)sum+=s[i]-'0';
    if(sum%9==0){
        puts("Yes");
    }else{
        puts("No");
    }
}

char s[200010];
int main(){
    scanf("%s",s);
    int len=strlen(s);
    int sum=0;
    for(int i=0;i<len;i++)sum+=s[i]-'0';
    if(sum%9==0){
        puts("Yes");
    }else{
        puts("No");
    }
}


#include<stdio.h>
int main(void){
  int n,x,t,cnt=0;
  scanf("%d %d %d",&n,&x,&t);
  for(;n>x;n -= x) cnt += t;
  printf("%d",cnt);
 return 0;
}


#include<stdio.h>
int main(void){
  int n,x,t,cnt=0;
  scanf("%d %d %d",&n,&x,&t);
  while(n>x){
    cnt += t;
    n -= x;
  }
  printf("%d",cnt);
 return 0;
}


function main(input){
  let list = input.split(" ");
  let n = parseInt(list[0]);//作る数
  let x = parseInt(list[1]);//一度に作れる数
  let t = parseInt(list[2]);//time
  let answer = Math.ceil(n/x)*t;
  console.log(answer);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));


"use strict";
var input=require("fs").readFileSync("/dev/stdin","utf8");
var cin=input.split(/ |\n/),cid=0;
function next(){return +cin[cid++];}
function nextstr(){return cin[cid++];}
function nextbig(){return BigInt(cin[cid++]);}
function nexts(n,a){return a?cin.slice(cid,cid+=n):cin.slice(cid,cid+=n).map(a=>+a);}
function nextm(h,w,a){var r=[],i=0;if(a)for(;i<h;i++)r.push(cin.slice(cid,cid+=w));else for(;i<h;i++)r.push(cin.slice(cid,cid+=w).map(a=>+a));return r;}
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill().map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill().map(x=>"+r+")";return eval(r);}

var myOut = main();
if(myOut !== undefined)console.log(String(myOut));

function main(){
  var [n,x,t] = nexts(3);
  return Math.ceil(n/x)*t;
}


function Main(input) {
    input = input.trim().split("\n").map(function(x) { return x.split(" ")});
    let N = parseInt(input[0][0], 10);
    let X = parseInt(input[0][1], 10);
    let T = parseInt(input[0][2], 10);
    if (N % X === 0) console.log(T * N / X );
    else console.log(Math.ceil(N / X) * T);
}

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


function main(input){
    const args=input.split(' ');
    const n=args[0];
    const x=args[1];
    const t=args[2];
    const a=int(n/x);
    if(n%x!=0){
        a++;
    }
    console.log(a*t);
}

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


function main(input){
    const args=input.split(' ');
    const n=args[0];
    const x=args[1];
    const t=args[2];
    let a=n/x;
    if(n%x!=0){
        a++;
    }
    console.log(a*t);
}

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


function Main(input) {
  const LINES = input.split("\n");
  const N = parseInt(LINES[0]);
  const X = parseInt(LINES[1]);
  const T = parseInt(LINES[2]);

  let answer = 0;
  answer = Math.floor(N / X) * T;
  if N % X != 0{
    answer += T;
  }

  console.log(answer);

}
// デバッグ用
function debug(){
var input = document.getElementById("input").value;
Main(input);
}

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


package main

import (
	"fmt"
)

func main() {
	var n, x, t int64
	fmt.Scan(&n, &x, &t)

	if n % x == 0 {
		fmt.Println(n/x * t)
	} else {
		fmt.Println((n/x + 1) * t)
	}
}


package main

import (
	"fmt"
)

func main() {
	var n int
	var x int
	var t int

	fmt.Scan(&n)
	fmt.Scan(&x)
	fmt.Scan(&t)

	var ans int

	if n % x == 0 {
		ans = n / x * t
	} else {
		ans = (n / x + 1) * t
	}

	fmt.Println(ans)
}


package main

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

func main() {
	scanInit()

	n := nextInt()
	x := nextInt()
	t := nextInt()

	if n%x == 0 {
		fmt.Println(t * (n / x))
		return
	}
	fmt.Println(t + t*(n/x))

}

// ---- readfunc
var sc = bufio.NewScanner(os.Stdin)

func scanInit() {
	const cap = 200 * 1024 // default=64*1024
	var buf = make([]byte, cap)
	sc.Buffer(buf, cap)
	sc.Split(bufio.ScanWords)
	return
}
func nextInt() int {
	sc.Scan()
	i, _ := strconv.Atoi(sc.Text())
	return i
}
func nextStr() string {
	sc.Scan()
	return sc.Text()
}


package main

import (
	"fmt"
	_ "net/http/pprof"
    gods "github.com/emirpasic/gods"
)

func main() {
	var n,x,t int
	fmt.Scanf("%d %d %d", &n, &x, &t)
	fmt.Printf("%d\n", (n+x-1)/x * t)
}


package main

import (
	"fmt"
)

func main() {
	var n,x,t int
	fmt.Scanf("%d %d", &n, &x, &t)
	fmt.Printf("%d %s\n", (n+x-1)/x * t)
}


package main

import (
	"fmt"
	"math"
)

func main() {
	var n, x, t int
	_, _ = fmt.Scanf("%d %d %d", &n, &x, &t)
	result := int(math.Ceil(float64(x)/float64(t))) * n
	fmt.Println(result)
}


first = gets.split.map(&:to_i)
  n = first[0]
  x = first[1]
  t = first[2]
  number = n/x
  amari = n % x
  if amari == 0
    puts number*t
  else
    puts number*t+t
  end


n,x,t=gets.split.map(&:to_i)
tako=0
ans=0
while tako<n
    tako+=x
    ans+=t
end
puts ans


n,x,t=gets.split.map &:to_i
p (n+x-1)/x*t


line = gets.chomp.map(&:to_i)
#line = [1000, 1, 1000]
N, X, T = line

shortest_time = 0

if N <= X
    shortest_time = T
elsif N > X
    burn_time = N / X
    # 1
    if N % X != 0 # 8
        shortest_time = (burn_time * T) + T
    else
        shortest_time = T * burn_time
    end
end

p shortest_time


a,b,c = gets.chomp.split(" ").map(&:to_i);
z=a%b
if z==0
p a/b*t
else
p a/b*c+c
end


n,x,t = gets.split.map(&:to_i)
puts (n / x + 1) * t


use proconio::{input, fastout};

#[fastout]
fn main() {
    input! {
        n: usize,
        x: usize,
        t: usize,
    }

    let a = (n + (x - 1)) / x;
    println!("{}", a * t);
}


use std::io::{stderr, stdin, stdout, BufReader, BufWriter, Cursor, Read, Write};
use std::iter::Iterator;
use std::str::FromStr;
// use std::slice::Iter;
// use std::vec::IntoIter;

#[allow(dead_code)]
fn main() {
  let stdin = stdin();
  let r = &mut BufReader::new(stdin.lock());
  let stdout = stdout();
  let w = &mut BufWriter::new(stdout.lock());
  let stderr = stderr();
  let err = &mut BufWriter::new(stderr.lock());
  run(r, w, err);
  w.flush().unwrap();
  err.flush().unwrap();
}

macro_rules! _ft { () => (impl FnOnce(&mut Cursor<Vec<u8>>, &mut Vec<u8>, &mut Vec<u8>)); }

#[allow(dead_code)]
fn test(input: &str, output: &str, f: _ft!()) {
  let r = &mut Cursor::new(input.as_bytes().to_vec());
  let w: &mut Vec<u8> = &mut Vec::new();
  let err: &mut Vec<u8> = &mut Vec::new();
  f(r, w, err);
  let mut stderr = stderr();
  writeln!(stderr, "{}", String::from_utf8(err.to_vec()).unwrap()).unwrap();
  stderr.flush().ok();
  assert_eq!(String::from_utf8(w.to_vec()).unwrap(), output)
}

#[allow(dead_code)]
macro_rules! t {
  ($f: ident => $input: expr, $output: expr) => (
    #[test]
    fn $f() { test($input, $output, run); }
  );
}

#[allow(unused_macros)]
macro_rules! args {
  ($($arg: expr),*) => ({
    let mut s = String::new();
    $(s += &format!("{} ", $arg);)*
    s.pop().unwrap();
    s
  });
}

#[allow(unused_macros)]
macro_rules! st {
  ($name: ident => $($p: ident : $t: ty),+) => (
    struct $name { $($p : $t),+ }
    impl FromStr for $name {
      type Err = ();
      fn from_str(s: &str) -> Result<Self, Self::Err> {
        let mut iter = s.split_whitespace();
        Ok(Self {
          $($p: iter.next().unwrap().parse::<$t>().unwrap(),)+
        })
      }
    }
  );
  ($name: ident => $($($p: ident),+: $t: ty);+) => (st!($name => $($($p : $t),+),+););
  ($name: ident => $($($p: ident),+: $($t: ty),+);+) => (st!($name => $($($p : $t),+),+););
  ($name: ident => $($p: ident),+: $t: ty) => (st!($name => $($p : $t),+););
  ($name: ident => $($p: ident),+: $($t: ty),+) => (st!($name => $($p : $t),+););
}

#[allow(dead_code)]
fn read<F: FromStr, R: Read>(reader: &mut R) -> F {
  let str = reader.by_ref()
    .bytes()
    .map(|c| c.unwrap() as char)
    .skip_while(|c| c.is_whitespace())
    .take_while(|c| !c.is_whitespace())
    .collect::<String>();
  str.parse::<F>().ok().unwrap()
}

#[allow(dead_code)]
fn read_line<F: FromStr, R: Read>(reader: &mut R) -> F {
  let str = reader.by_ref()
    .bytes()
    .map(|c| c.unwrap() as char)
    .skip_while(|c| c.is_whitespace())
    .take_while(|c| c != &'\n')
    .collect::<String>();
  let str = if str.ends_with('\r') { &str[0..str.len() - 1] } else { &str };
  str.parse::<F>().ok().unwrap()
}

#[allow(unused_macros)]
macro_rules! r {
  ($stream: expr) => (read::<String, _>($stream));
  ($stream: expr, ) => (r!($stream));
  ($stream: expr; ) => (r!($stream));
  ($stream: expr; $t: ty) => (read::<$t,  _>($stream));
  ($stream: expr; $($t: ty),+) => (($(r!($stream; $t)),*));
  ($stream: expr; $t: ty; $n: expr) => ((0..$n).map(|_| r!($stream; $t)).collect::<Vec<_>>());
}

#[allow(unused_macros)]
macro_rules! rl {
  ($stream: expr) => (read_line::<String, _>($stream));
  ($stream: expr, ) => (r!($stream));
  ($stream: expr; ) => (r!($stream));
  ($stream: expr; $t: ty) => (read_line::<$t,  _>($stream));
  ($stream: expr; $t: ty; $n: expr) => ((0..$n).map(|_| rl!($stream; $t)).collect::<Vec<_>>());
}

macro_rules! _writes {
  ($stream: expr; $arg0: expr, $($arg: expr),*) => ({
    write!($stream, "{}", $arg0).ok();
    $(write!($stream, " {}", $arg).ok();)*
  });
}

#[allow(unused_macros)]
macro_rules! w {
  ($stream: expr) => (write!($stream, " ").ok());
  ($stream: expr; ) => (w!($stream));
  ($stream: expr, ) => (w!($stream));

  ($stream: expr; $arg: expr) => (write!($stream, "{}", $arg).ok());
  ($stream: expr; $arg: expr, ) => (w!($stream; $arg));

  ($stream: expr; $arg0: expr, $($arg: expr),+) => (_writes!($stream; $arg0, $($arg),+));
  ($stream: expr; $arg0: expr, $($arg: expr),+, ) => (w!($stream; $arg0, $($arg),*));

  ($stream: expr, $($arg: tt)*) => (write!($stream, $($arg)*).ok());
}

#[allow(unused_macros)]
macro_rules! wl {
  ($stream: expr) => (writeln!($stream).ok());
  ($stream: expr, ) => (wl!($stream));
  ($stream: expr; ) => (wl!($stream));

  ($stream: expr; $arg: expr) => (writeln!($stream, "{}", $arg).ok());
  ($stream: expr; $arg: expr, ) => (wl!($stream; $arg));

  ($stream: expr; $arg0: expr, $($arg: expr),+) => ({
    _writes!($stream; $arg0, $($arg),+);
    wl!($stream)
  });
  ($stream: expr; $arg0: expr, $($arg: expr),+, ) => (wl!($stream; $arg0, $($arg),*));

  ($stream: expr, $($arg: tt)*) => (writeln!($stream, $($arg)*).ok());
}

#[allow(unused_macros)]
macro_rules! w_vec {
  ($stream: expr; $vec: expr) => ({
    let mut iter = $vec.iter();
    match iter.next() { Some(&i) => { w!($stream, "{}", i); }, None => {}, }
    for &i in iter { w!($stream, " {}", i); }
  });
}

#[allow(unused_macros)]
macro_rules! wl_vec {
  ($stream: expr; $vec: expr) => ({
    w_vec!($stream; $vec);
    wl!($stream)
  });
}

trait VecAlias<T> {
  fn select<U>(&self, f: impl FnMut(&T) -> U)  -> Vec<U>;
}

impl<T> VecAlias<T> for Vec<T> {
  fn select<U>(&self, mut f: impl FnMut(&T) -> U)  -> Vec<U> {
    self.iter().map(|i| f(i)).collect::<Vec<_>>()
  }
}

trait VecOrdAlias<T> {
  fn asc(&mut self);
  fn desc(&mut self);
}

impl<T: Ord> VecOrdAlias<T> for Vec<T> {
  fn asc(&mut self) { self.sort_unstable(); }
  fn desc(&mut self) { self.sort_unstable_by(|i, j| j.cmp(i)); }
}

#[allow(unused_variables)]
fn run<R: Read, W: Write, E: Write>(r: &mut R, w: &mut W, err: &mut E) {
  let (n, x, t) = r!(r; i64, i64, i64);
  let c = n / x + { if n % x == 0 {0} else {1}};
  w!(w; c * t);
}

t!(ta1 => r"20 12 6", r"12");
t!(ta2 => r"1000 1 1000", r"1000000");


use proconio::input;

fn main() {
    input! {
        mut target: i32,
        mut every: i32,
        mut takes: i32
    }

    let mut answer = 0;
    loop {
        target -= every;
        answer += takes;

        if target <= 0 {
            break;
        }
    }

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


use proconio::*;

fn main() {
fn main() {
    input! {
        n: i32,
        x: i32,
        t: i32,
    }
    let ans =(n + x - 1) / x * t;
    println!("{}",ans);
}


use proconio::input;

fn main() {
    input! {
        n: u32,
        x: u32,
        t: u32,
    }
    let ans = if n % t == 0 {t * (n/x)}
              else {t * (n/x) + t};
    println!("{}", ans);
}


use std::io::{stderr, stdin, stdout, BufReader, BufWriter, Cursor, Read, Write};
use std::iter::Iterator;
use std::str::FromStr;
use std::collections::VecDeque;
// use std::slice::Iter;
// use std::vec::IntoIter;

#[allow(dead_code)]
fn main() {
  let stdin = stdin();
  let r = &mut BufReader::new(stdin.lock());
  let stdout = stdout();
  let w = &mut BufWriter::new(stdout.lock());
  let stderr = stderr();
  let err = &mut BufWriter::new(stderr.lock());
  run(r, w, err);
  w.flush().unwrap();
  err.flush().unwrap();
}

macro_rules! _ft { () => (impl FnOnce(&mut Cursor<Vec<u8>>, &mut Vec<u8>, &mut Vec<u8>)); }

#[allow(dead_code)]
fn test(input: &str, output: &str, f: _ft!()) {
  let r = &mut Cursor::new(input.as_bytes().to_vec());
  let w: &mut Vec<u8> = &mut Vec::new();
  let err: &mut Vec<u8> = &mut Vec::new();
  f(r, w, err);
  let mut stderr = stderr();
  writeln!(stderr, "{}", String::from_utf8(err.to_vec()).unwrap()).unwrap();
  stderr.flush().ok();
  assert_eq!(String::from_utf8(w.to_vec()).unwrap(), output)
}

/// テスト
#[allow(dead_code)]
macro_rules! t {
  ($f: ident => $input: expr, $output: expr) => (
    #[test]
    fn $f() { test($input, $output, run); }
  );
}

#[allow(unused_macros)]
macro_rules! args {
  ($($arg: expr),*) => ({
    let mut s = String::new();
    $(s += &format!("{} ", $arg);)*
    s.pop().unwrap();
    s
  });
}

/// 構造体生成
#[allow(unused_macros)]
macro_rules! st {
  ($name: ident => $($p: ident : $t: ty),+) => (
    struct $name { $($p : $t),+ }
    impl FromStr for $name {
      type Err = ();
      fn from_str(s: &str) -> Result<Self, Self::Err> {
        let mut iter = s.split_whitespace();
        Ok(Self {
          $($p: iter.next().unwrap().parse::<$t>().unwrap(),)+
        })
      }
    }
  );
  ($name: ident => $($($p: ident),+: $t: ty);+) => (st!($name => $($($p : $t),+),+););
  ($name: ident => $($($p: ident),+: $($t: ty),+);+) => (st!($name => $($($p : $t),+),+););
  ($name: ident => $($p: ident),+: $t: ty) => (st!($name => $($p : $t),+););
  ($name: ident => $($p: ident),+: $($t: ty),+) => (st!($name => $($p : $t),+););
}

#[allow(dead_code)]
fn read<F: FromStr, R: Read>(reader: &mut R) -> F {
  let str = reader.by_ref()
    .bytes()
    .map(|c| c.unwrap() as char)
    .skip_while(|c| c.is_whitespace())
    .take_while(|c| !c.is_whitespace())
    .collect::<String>();
  str.parse::<F>().ok().unwrap()
}

#[allow(dead_code)]
fn read_line<F: FromStr, R: Read>(reader: &mut R) -> F {
  let str = reader.by_ref()
    .bytes()
    .map(|c| c.unwrap() as char)
    .skip_while(|c| c.is_whitespace())
    .take_while(|c| c != &'\n')
    .collect::<String>();
  let str = if str.ends_with('\r') { &str[0..str.len() - 1] } else { &str };
  str.parse::<F>().ok().unwrap()
}

/// 1要素読む
#[allow(unused_macros)]
macro_rules! r {
  ($stream: expr) => (read::<String, _>($stream));
  ($stream: expr, ) => (r!($stream));
  ($stream: expr; ) => (r!($stream));
  ($stream: expr; $t: ty) => (read::<$t,  _>($stream));
  ($stream: expr; $($t: ty),+) => (($(r!($stream; $t)),*));
  ($stream: expr; $t: ty; $n: expr) => ((0..$n).map(|_| r!($stream; $t)).collect::<Vec<_>>());
}

/// 1行読む
#[allow(unused_macros)]
macro_rules! rl {
  ($stream: expr) => (read_line::<String, _>($stream));
  ($stream: expr, ) => (r!($stream));
  ($stream: expr; ) => (r!($stream));
  ($stream: expr; $t: ty) => (read_line::<$t,  _>($stream));
  ($stream: expr; $t: ty; $n: expr) => ((0..$n).map(|_| rl!($stream; $t)).collect::<Vec<_>>());
}

macro_rules! _writes {
  ($stream: expr; $arg0: expr, $($arg: expr),*) => ({
    write!($stream, "{}", $arg0).ok();
    $(write!($stream, " {}", $arg).ok();)*
  });
}

/// write
#[allow(unused_macros)]
macro_rules! w {
  ($stream: expr) => (write!($stream, " ").ok());
  ($stream: expr; ) => (w!($stream));
  ($stream: expr, ) => (w!($stream));

  ($stream: expr; $arg: expr) => (write!($stream, "{}", $arg).ok());
  ($stream: expr; $arg: expr, ) => (w!($stream; $arg));

  ($stream: expr; $arg0: expr, $($arg: expr),+) => (_writes!($stream; $arg0, $($arg),+));
  ($stream: expr; $arg0: expr, $($arg: expr),+, ) => (w!($stream; $arg0, $($arg),*));

  ($stream: expr, $($arg: tt)*) => (write!($stream, $($arg)*).ok());
}

/// write_line
#[allow(unused_macros)]
macro_rules! wl {
  ($stream: expr) => (writeln!($stream).ok());
  ($stream: expr, ) => (wl!($stream));
  ($stream: expr; ) => (wl!($stream));

  ($stream: expr; $arg: expr) => (writeln!($stream, "{}", $arg).ok());
  ($stream: expr; $arg: expr, ) => (wl!($stream; $arg));

  ($stream: expr; $arg0: expr, $($arg: expr),+) => ({
    _writes!($stream; $arg0, $($arg),+);
    wl!($stream)
  });
  ($stream: expr; $arg0: expr, $($arg: expr),+, ) => (wl!($stream; $arg0, $($arg),*));

  ($stream: expr, $($arg: tt)*) => (writeln!($stream, $($arg)*).ok());
}

/// write Vec
#[allow(unused_macros)]
macro_rules! w_vec {
  ($stream: expr; $vec: expr) => ({
    let mut iter = $vec.iter();
    match iter.next() { Some(&i) => { w!($stream, "{}", i); }, None => {}, }
    for &i in iter { w!($stream, " {}", i); }
  });
}

/// write_line Vec
#[allow(unused_macros)]
macro_rules! wl_vec {
  ($stream: expr; $vec: expr) => ({
    w_vec!($stream; $vec);
    wl!($stream)
  });
}

trait VecAlias<T> {
  fn select<U>(&self, f: impl FnMut(&T) -> U)  -> Vec<U>;
}

impl<T> VecAlias<T> for Vec<T> {
  fn select<U>(&self, mut f: impl FnMut(&T) -> U)  -> Vec<U> {
    self.iter().map(|i| f(i)).collect::<Vec<_>>()
  }
}

trait VecOrdAlias<T> {
  fn asc(&mut self);
  fn desc(&mut self);
}

impl<T: Ord> VecOrdAlias<T> for Vec<T> {
  fn asc(&mut self) { self.sort_unstable(); }
  fn desc(&mut self) { self.sort_unstable_by(|i, j| j.cmp(i)); }
}

struct Point { i: i64, j: i64 }

fn pos(i: i64, j: i64) -> Point { Point { i, j }}

#[allow(unused_variables)]
fn run<R: Read, W: Write, E: Write>(r: &mut R, w: &mut W, err: &mut E) {
  let sw = w;
  let (h, w) = r!(r; i64, i64);
  // wl!(err; h, w);
  let (c_h, c_w) = r!(r; i64, i64);
  let (c_h, c_w) = (c_h - 1, c_w - 1);
  // wl!(err; c_h, c_w);
  let (d_h, d_w) = r!(r; i64, i64);
  let (d_h, d_w) = (d_h - 1, d_w - 1);
  // wl!(err; d_h, d_w);
  let maze = r!(r; String; h);
  let maze = maze.iter()
    .map(|s| s.chars().map(|c|  c == '.').collect::<Vec<_>>())
    .collect::<Vec<_>>();
  // for i in 0..h { wl_vec!(err; maze[i as usize]); }

  let mut visited = (0..h).map(|_| {
    (0..w).map(|_| false).collect::<Vec<_>>()
  }).collect::<Vec<_>>();
  let mut ans: i64 = 0;

  let mut q = VecDeque::new();
  q.push_front(pos(c_h, c_w));

  while !q.is_empty() {

    // wl!(err; "[move]");
    while !q.is_empty() {
      let p = q.pop_back().unwrap();
      if visited[p.i as usize][p.j as usize] { continue; }
      if p.i == d_h && p.j == d_w {
        w!(sw; ans);
        return;
      }
      visited[p.i as usize][p.j as usize] = true;
      // wl!(err; "visit", p.i, p.j);
      if p.i > 0 && maze[(p.i - 1) as usize][p.j as usize] && !visited[(p.i - 1) as usize][p.j as usize] {
        q.push_front(pos(p.i - 1, p.j));
        // wl!(err; "pop  ", p.i - 1, p.j);
      }
      if p.j > 0 && maze[p.i as usize][(p.j - 1) as usize] && !visited[p.i as usize][(p.j - 1) as usize] {
        q.push_front(pos(p.i, p.j - 1));
        // wl!(err; "pop  ", p.i, p.j - 1);
      }
      if p.i < h - 1 && maze[(p.i + 1) as usize][p.j as usize] && !visited[(p.i + 1) as usize][p.j as usize] {
        q.push_front(pos(p.i + 1, p.j));
        // wl!(err; "pop  ", p.i + 1, p.j);
      }
      if p.j < w - 1 && maze[p.i as usize][(p.j + 1) as usize] && !visited[p.i as usize][(p.j + 1) as usize] {
        q.push_front(pos(p.i, p.j + 1));
        // wl!(err; "pop  ", p.i, p.j + 1);
      }
    }

    // wl!(err; "[warp]");
    ans += 1;

    for i in 0..h {
      for j in 0..w {
        if !visited[i as usize][j as usize] { continue; }
        // wl!(err; "visit", i, j);
        for di in -2..3 {
          for dj in -2..3 {
            let ii = i + di;
            let jj = j + dj;
            if !(ii >= 0 && ii < h && jj >= 0 && jj < w) { continue; }
            // wl!(err; "check", ii, jj, maze[ii as usize][jj as usize], visited[ii as usize][jj as usize]);
            if maze[ii as usize][jj as usize] && !visited[ii as usize][jj as usize] {
              q.push_front(pos(ii, jj));
              // wl!(err; "pop  ", ii, jj);
            }
          }
        }
      }
    }
  }
  w!(sw; -1);
}

t!(td1 => r"4 4
1 1
4 4
..#.
..#.
.#..
.#..", r"1");
t!(td2 => r"4 4
1 4
4 1
.##.
####
####
.##.", r"-1");
t!(td3 => r"4 4
2 2
3 3
....
....
....
....", r"0");
t!(td4 => r"4 5
1 2
2 5
#.###
####.
#..##
#..##", r"2");


let nxt = readLine()!.split(separator:" ").map{Int($0)!}
let n = nxt[0], x = nxt[1], t = nxt[2]
print(n%x==0 ? t*n/x : t*(n/x+1))


let NXT = readLine()!.split(separator: " ").compactMap { Int($0) }

if NXT[0] % NXT[1] == 0 {
    print(NXT[0] / NXT[1] * NXT[2])
} else {
    print((NXT[0] / NXT[1] + 1) * NXT[2])
}


func readThreeInts(separator: String.Element = " ") -> (a: Int, b: Int, c: Int) {
    let ints = readLine()!.split(separator: separator).map { Int($0)! }
    return (a: ints[0], b: ints[1], c: ints[2])
}

func mainA() {
    let (N, X, T) = readThreeInts()

    let full = N / X
    let remain = N % X

    print(full * T + (remain == 0 ? 0 : T))
}
mainA()


let inp = readLine()!.split(separator: " ").map { Int($0)! }
let n = inp[0]
let x = inp[1]
let t = inp[2]
print(Int(ceil(Double(n) / Double(x))) * t)


let inp = readLine()!.split(separator: " ").map { Int($0)! } let n = inp[0]
let x = inp[1]
let t = inp[2]
print(Int(ceil(Double(n) / Double(x))) * t)


import Foundation
let inp = readLine()!.split(separator: " ").map { Int($0)! } let n = inp[0]
let x = inp[1]
let t = inp[2]
print(Int(ceil(Double(n) / Double(x))) * t)


import * as fs from "fs";

const input = fs
  .readFileSync("/dev/stdin", "utf8")
  .split(" ")
  .map(Number);

let ans = Math.ceil(input[0]/input[1])*input[2];

console.log(ans);


import * as fs from 'fs';

function main(input) {
  input = input.split("\n");
  const tmp = input[0].split(" ");
  const N = parseInt(tmp[0], 10);
  const X = parseInt(tmp[1], 10);
  const t = parseInt(tmp[2], 10);
  //出力
  console.log('%d', Math.ceil(N / X) * t);
  return 0;
}

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


function main(input) {
    const numberArray = input.split(' ');
   	const result = Math.ceil(numberArray[0] / numberArray[1]) * numberArray[2];
    console.log(result)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


import * as fs from 'fs';

function main(input) {
  // 1行目がinput[0], 2行目がinput[1], …に入る
  input = input.split("\n");
  const tmp = input[1].split(" ");
  const N = parseInt(tmp[0], 10);
  const X = parseInt(tmp[1], 10);
  const t = parseInt(tmp[2], 10);
  //出力
  console.log('%d', Math.ceil(N / X) * t);
}

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


import * as fs from 'fs';
function main(input: any[]) {
	const lines = input.split('\n');
  	const nxt = lines[1].split(' ');
	const n = nxt[0];
  	const x = nxt[1];
  	const t = nxt[2];
  	const answer = Math.ceil(n / x) * t;
  	console.log(answer);
}

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


def main():
    n, *v = map(int, open(0).read().split())
    be = [0] * int(1e5)
    bo = [0] * int(1e5)
    for e, o in zip(*[iter(v)] * 2):
        be[e - 1] += 1
        bo[o - 1] += 1
    ve = max(be)
    vo = max(bo)
    ke = be.index(ve)
    ko = bo.index(vo)
    if ke == ko:
        be[ke] = 0
        bo[ko] = 0
        print(min(n - ve - max(bo), n - vo - max(be)))
    else:
        print(n - ve - vo)
    return

main()


n = int(input())
nums = list(map(int, input().split()))

nums1 = nums[0::2]
nums2 = nums[1::2]

bug1 = [0] * 100001
bug2 = [0] * 100001

for num in nums1:
    bug1[num] += 1

for num in nums2:
    bug2[num] += 1

max_v_1 = max(bug1)
max_i_1 = bug1.index(max_v_1)
max_v_2 = max(bug2)
max_i_2 = bug2.index(max_v_2)

if max_i_1 == max_i_2:
    bug1[max_i_1] = 0
    bug2[max_i_2] = 0
    sec_max_v_1 = max(bug1)
    sec_max_v_2 = max(bug2)
    print(n - max(max_v_1, max_v_2) - max(sec_max_v_1, sec_max_v_2))
else:
    print(n - max_v_1 - max_v_2)


import itertools

n = int(input())
list_A = list(map(int, input().split()))
L, R = [], []
A, B = [[-1, 0], [-1, 0]]

for i in range(n):
    if i % 2 == 0:
        L.append(list_A[i])
    else:
        R.append(list_A[i])

L = itertools.groupby(L)
for key, group in L:
    A.append([key, len(list(group))])

A.sort(key=lambda x:x[1], reverse=True)

R = itertools.groupby(R)
for key, group in R:
    B.append([key, len(list(group))])

B.sort(key=lambda x:x[1], reverse=True)

if A[0][0] != B[0][0]:
    print(n - A[0][1] - B[0][1])
else:
    print(min(n - A[1][1] - B[0][1], n - A[0][1] - B[1][1]))


import itertools

n = int(input())
list_A = list(map(int, input().split()))
L, R = [], []
A, B = [[-1, 0]], [[-1, 0]]

for i in range(n):
    if i % 2 == 0:
        L.append(list_A[i])
    else:
        R.append(list_A[i])

L = itertools.groupby(L)
for key, group in L:
    A.append([key, len(list(group))])

A.sort(key=lambda x:(x[1], x[0]))

R = itertools.groupby(R)
for key, group in R:
    B.append([key, len(list(group))])

B.sort(key=lambda x:(x[1], x[1]), reverse=True)

if A[-1][0] != B[0][0]:
    print(n - A[-1][1] - B[0][1])
else:
    print(min(n - A[-2][1] - B[0][1], n - A[-1][1] - B[1][1]))


import itertools

n = int(input())
list_A = list(map(int, input().split()))
L, R = [], []
A, B = [[-1, 0]], [[-1, 0]]

for i in range(n):
    if i % 2 == 0:
        L.append(list_A[i])
    else:
        R.append(list_A[i])

L = itertools.groupby(L)
for key, group in L:
    A.append([key, len(list(group))])

A.sort(key=lambda x:(x[1], x[0]), reverse=True)

R = itertools.groupby(R)
for key, group in R:
    B.append([key, len(list(group))])

B.sort(key=lambda x:x[1], reverse=True)

if A[0][0] != B[0][0]:
    print(n - A[0][1] - B[0][1])
else:
    print(min(n - A[1][1] - B[0][1], n - A[0][1] - B[1][1]))


import java.util.*;
import static java.lang.System.*;
import java.io.*;
import java.math.*;

public class Main {

	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();
		int[] odd = new int[100000 + 10]; //奇数番目
		int[] even = new int[100000 + 10]; //偶数番目
		for(int i = 0; i < n; i++) {
			if (i % 2 == 0) {
				even[sc.nextInt()]++;
			} else {
				odd[sc.nextInt()]++;
			}
		}
		int oddFir = 0, oddSec = 0, evenFir = 0, evenSec = 0;
		for(int i = 1; i <= 100000; i++) {
			if ( odd[i] >= odd[oddFir]) {
				oddSec = oddFir;
				oddFir = i;
			} else if (odd[i] >= odd[oddSec]){
				oddSec = i;
			}
			if ( even[i] >= even[evenFir]) {
				evenSec = evenFir;
				evenFir = i;
			} else if (even[i] >= even[evenSec]){
				evenSec = i;
			}
		}
		int cnt = 0;
		if (oddFir != evenFir) {
			cnt =( n / 2 - odd[oddFir]) + (n / 2 - even[evenFir]);
		} else {
			int a =  (n / 2 - odd[oddSec]) + (n / 2 - even[evenFir]);
			int b = (n / 2 - odd[oddFir]) + (n / 2 - even[evenSec]);
			cnt = Math.min(a,  b);
		}

		out.println(cnt);

		out.close();
	}

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