Go: package main

import (
        "fmt"
        "math"
)

var interests [101]float64

func main() {
        var m int
        fmt.Scanf("%d", &m)
        fmt.Printf("%d\n", int(math.Ceil(interest(m)*10))*10000)
}

func interest(m int) (i float64){
        if interests[m] > 0 {
                return interests[m]
        }

        if m == 0 {
                interests[0] = 1.0
                return interests[0]
        }

        if m == 1 {
                interests[1] = 1.05
                return interests[1]
        }
        interests[m] = interest(m/2) * interest(m/2) * interest(m%2)
        return interests[m]
}

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

using _i64 = int64_t;
using _u64 = uint64_t;
using _f64 = double;

#define _for(i, start, end) for(_i64 i = (_i64)start; i < (_i64)end; ++i)
#define _rep(i, number) _for(i, 0, number)
#define _foreach(e, data) for(auto& e : data)
#define _all(data) data.begin(), data.end()

template<typename type>
_i64 _size(const type& data) { return static_cast<_i64>(data.size()); }
template<typename type, size_t size>
_i64 _size(const type (&)[size]) { return static_cast<_i64>(size); }

enum _flag : bool { able = true, disable = false };

struct _time {
    _time(_flag flag) { check = flag; if(!check) { return; } gettime(start); }
    ~_time() {
        if(!check) { return; }; gettime(end);
        _i64 elapse = chrono::duration_cast<chrono::milliseconds>(end - start).count();
        cout << endl << "Time: " << elapse << " ms" << endl;
    }
    private:
    using _timer = chrono::time_point<chrono::system_clock>;
    _timer start, end; bool check;
    void gettime(_timer& time) { time = chrono::system_clock::now(); }
};

struct _ini { _ini() { ios::sync_with_stdio(false); cin.tie(nullptr); } } _ini;

int main() {
    {
        _time time(disable);
        _i64 n, debt = 100000; cin >> n;
        _rep(i, n) {
            debt *= 1.05;
            if(debt % 1000 != 0) { debt += 1000 - debt % 1000; }
        }
        cout << debt << endl;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
	int money = 100000;
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		money = (int)(money * 1.05);
		if(money % 1000 != 0){
			money = money - money % 1000 + 1000;
		}
	}
	cout << money << endl;
	return 0;
}

C++: #include <iostream>

double round_up(double n){
        int i=(int)n;
        if(i%1000>0){
                i-=i%1000;
                i+=1000;
        }
        return i;
}

int main(){
        int n;
        std::cin >> n;

        double result=100000;
        for(int i=n;i;i--){
                result*=1.05;
                result=round_up(result);
        }
        std::cout << result;
        return 0;
}

C++: #include<iostream>
using namespace std;

int main() {
	int money = 100;
	int n;
	cin >> n;

	while(n--) { money += money % 20 ? money / 20 + 1 : money / 20; }

	cout << money << "000" << endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int n,ans=100000;
  cin >> n;
  for(int i=0;i<n;i++){
    ans *= 1.05;
    if(ans%1000!=0) ans += (1000-ans%1000);
  }
  cout << ans << endl;
  return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

llong Round(llong x){
	double y = (double)x;

	y /= 1000;
	
	y = ceil(y);

	x= (llong)y*1000;

	return x;
}

int main(){
	ios::sync_with_stdio(false);

	int n;
	llong m = 100000;

	cin >> n;

	for (int i = 0; i < n; i++){
		m = m + (llong)m/20;
		m = Round(m);
	}

	cout << m << endl;
}

C++: #include <iostream>
using namespace std;

int n, m = 100000;

int main()
{
	cin >> n;

	for (int i = 0; i < n; i++)
		m += (m / 20 + 999) / 1000 * 1000;

	cout << m << endl;

	return 0;
}

C++: #include <iostream>
#include <math.h>

using namespace std;

int calcDebt(int debt){
	double tmp = debt * 1.05;
	int result = (int) ceil(tmp);
	if(result % 1000 == 0){
		return result;
	}else{
		return (result / 1000 + 1) * 1000;
	}
}

int main(int argc, char *argv[]) {
	int result = 100000;
	int n;
	scanf("%d", &n);
	for(int i=0; i<n; i++){
		result = calcDebt(result);
	}
	printf("%d", result);
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <stdio.h>

using namespace std;

int main()
{
	unsigned long m=100000,n;

	cin>>n;
	for(int i=0;i<n;i++){
		m*=1.05;
		if(m%1000!=0){
			m/=1000;m++;m*=1000;
		}
	}

	cout<<m<<endl;

	return 0;
}

C++: #include <iostream>
using namespace std;

int main()
{
  int n;
  int m = 100000;
  cin >> n;
  for(int i = 0; i < n; i++){
    m += m / 20;
    if(m % 1000){
      m += 1000 - m % 1000;
    }
  }
  cout << m << endl;
}

C++: 
#include <iostream>

using namespace std;

int main() {
    int n;
    cin >> n;

    int debt = 100; // *1000
    while(n--) {
        int r = debt % 20;
        debt += debt/20;
        if(r) ++debt;
    }
    cout << debt << "000" << endl;

    return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
	int money = 100000;
	int n;

	cin >> n;
	for(int i=0 ; i<n ; i++){
		money *= 1.05;
		if(money%1000 != 0){
			money += 1000 - (money%1000);
		}
	}
	cout << money << endl;
}

C++: #include <iostream>
#include <cmath>
#include <string>
using namespace std;

int main(){
    int n;
    cin >> n;
    int m = 100; // unit:k
    for(int i = 0; i < n; i++){
        m = (int)ceil(m * 1.05);
    }
    cout << m << "000" << endl;
    return 0;
}

C++: #include<iostream>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main(){
  int n, debt = 100000;
  cin >> n;
  REP(i,n) {
    debt *= 1.05;
    if (debt % 1000 != 0) debt = (debt / 1000 + 1) * 1000;
  }
  cout << debt << endl;
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <utility>
#include <string>
typedef unsigned long ul;

using namespace std;

int main(){
	ul x, r, n;
	cin >> n;
	x = 100000;
	while(n--){
		x = x * 1.05;
		if((r = x % 1000) != 0){
			x = x + 1000 - r;
		}
	}
	cout << x << endl;
}

C++: #include<iostream>
using namespace std;

int main() {
    int d = 100000;
    int n;
    cin >> n;
    while(n--) {
        d *= 1.05;
        if(d % 1000) {
            d = (d / 1000 + 1) * 1000;
        }
    }
        cout << d << endl;
    return 0;
}

C++: #include<iostream>
using namespace std;

int main()
{
	int n;
	cin >> n;
	int a=100000;
	int b=0;
	for (int i=0;i<n;i++){
		b = a*1.05;
		if(b/1000.0-b/1000){
			a = (b/1000+1)*1000;}
		else 
			a = a*1.05;
	}
	cout << a << endl;

    return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;

int main(void) {
    int n; cin >> n;
    double r = 1.05, q = 100000;
    for(int i = 0; i < n; i++) {
        q *= r;
        q = ceil(q / 1000) * 1000;
    }

    cout << (int)q << endl;
}