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)*100))*1000)
}

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 <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>

#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


int main()
{
	int n;
	int ans=100000;
	cin >> n;
	rep(i,n){
		if((int)(ans*1.05+0.9)%1000==0){
			ans=ans*1.05;
		}else{
			ans = (int)(ans*1.05 / 1000 + 1)*1000;
		}
	}
	cout << ans << endl;
}

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

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

C++: #include <stdio.h>

int main(void) {

  int n;

  int debt;
  
  int i;

  scanf("%d",&n);

  debt=100000;

  for(i=0;i<n;i++) {

    debt*=1.05;
    if(debt%1000!=0) debt+=1000-(debt%1000);
    //printf("%d\n",debt);
  }

  printf("%d\n",debt/1000*1000);

  return 0;

}

C++: #include<iostream>
#include<cmath>

int main(){
	int n;
	double sum=100000;
	std::cin>>n;
	for(int i=0;i<n;i++){
		sum*=1.05;
		sum/=1000;
		sum=ceil(sum);
		sum*=1000;
	}
	std::cout<<sum<<std::endl;
	return 0;
}

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

int main()
{
    int n;
    cin >> n;
    int loan = 100000;
    for(int i=0; i<n; i++){
        loan = loan * 1.05;
    }

    loan = loan/1000;
    loan = loan * 1000;
    loan = loan + 1000;
    
    cout <<loan<<endl;
    
    return 0;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int main()
{
	int i,j,n;
	long long m=100000,k,p;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		m=m+(m*5/100);
		if(m%1000!=0)
		{
			m=m/1000;
			m=m*1000+1000;
		}
	}
	cout<<m<<endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int debt, n;

	cin >> n;

	debt = 100000;

	for (int i = 0; i < n; i++){
		debt *= 1.05;
		if (debt % 1000) {
			debt /= 1000;
			debt++;
			debt *= 1000;
		}
	}

	cout << debt << endl;
	return (0);
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
//ranker
using namespace std;

using ll = long long;
using lli = ll int;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using psi = pair<string, int>;
using D = double;


int main()
{
  int n, sum=100000;
  int i, j, k;
  int sum, tot, ans, num;
  
  cin >> n;
  for(i=0; i<n; i++){
    sum += sum*(i+1)*0.05;
    sum = (sum/1000+1)*1000;
  }
  cout << sum << endl
    return 0;
}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define X real()
#define Y imag()
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using comd = complex<double>;
using pii = pair<int,int> ;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

double CalcDist(comd p1, comd p2){
  return sqrt(pow(p1.X - p2.X,2.0) + pow(p1.Y -p2.Y,2.0));
}

template <typename T>
void out(deque < T > d)
{
  for(size_t i = 0; i < d.size(); i++)
  {
    debug(d[i]);
  }
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  int ans = 100000;
  rep(i,n){
    ans += ans*0.05;
    if(ans % 1000 > 0)
    ans += 1000 - ans%1000;
  }
  cout << ans << endl;
  return 0;
}

C++: #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <vector>
using namespace std;

const double interest = 0.05;

int weeklyAdd(int debt) {
  debt = debt * (1 + interest);
  if (debt % 1000 != 0)
    debt = (debt / 1000 + 1) * 1000;
  // std::cout << debt << '\n';
  return debt;
}

int main(int argc, char const *argv[]) {
  // int week = 5;
  int week;
  std::cin >> week;
  int debt = 100000;

  for (size_t i = 0; i < week; i++) {
    debt = weeklyAdd(debt);
  }
  std::cout << debt << '\n';

  return 0;
}

C++: #include<iostream>
using namespace std;
#define N 100000
int main(){
	int n,a;
	a=N;
	cin >> n;
	while(n--){
		a+=a/20;
		if(a%1000)a=a-a%1000+1000;
	}
	cout << a <<endl;
	return 0;
}

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

unsigned debt(int n) {
	if(n == 0) return 100;
	else if(n == 1) return 105;
	else return (debt(n - 1) * 1.05 + 1);
}

int main(void)
{
	int n;
	unsigned long d;
	cin >> n;
	d = debt(n) * 1000;
	cout << d << endl;
	return 0;
}

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

long int kane(int k){
	long int shakkin = 100000;
	for(int i=0;i<k;i++){
		shakkin = shakkin*1.05;
	if(shakkin%1000!=0)
		shakkin += 1000-(shakkin%1000);
	}
	return shakkin;
}

int main() {
	int n;
	cin >> n;
	cout << kane(n);
	return 0;
}