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>
const int first = 100000;

int get_dept(int n) // n週間後(切り上げ前)
{
    int dept = first;
    for (int i=0; i<n; i++) {
        dept *= 1.05;
    }
    return dept;
}
int round_up(int price) // 1000円未満を切り上げ
{
    if (price <= 1000) {
        return price;
    }
    int complement  = 1000 - price%1000; // 補数
    return (price + complement);
}
int main()
{
    int n;
    std::cin  >> n;
    std::cout << (round_up(get_dept(n))) << std::endl;
}

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

int main() {
    int N;
    cin >> N;
    int now = 100000;
    for (int i = 0; i < N; i++) {
        now *= 1.05;
        now = (now + 999) / 1000 * 1000;
    }
    cout << now << endl;
    return 0;
}

C++: #include <stdio.h>

int main(int argc, char *argv[]){
    
    int debt=100000;
    int n, m=0;
    
    scanf("%d", &n);
    
    for(int i=0; i<n; i++){
        debt += debt*0.05;
        m = debt % 1000;
        if(m != 0){
            debt -= m;
            debt += 1000;
        }
    }
    
    printf("%d\n", debt);
    
    return 0;
}

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

int main(void){
    int i,n;
    double ans;
    cin >> n;
    ans=100.000;
    for(i=0;i<n;i++){
        ans*=1.05;
        cout << i+1 << ":::" << ans << "->";
        ans=(int)(ans+0.999);
        cout << ans << "->";
        ans=(double)ans;
        cout << ans << endl;
    }
    ans*=1000;
    printf("%d\n",(int)ans);
    return 0;
}

C++: #include<cstdio>

int main(){
	int n,k=100000;
	scanf("%d",&n);
	for(;n>=0;n--){
		k*=1.05;
		if(k%10000){
			k+=10000;
		}
		k=k-k%10000;
	}
	printf("%d",k);
	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>
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>
using namespace std;

int main() {
	// your code goes here
	int n,ans;
	ans = 100000
	cin >> n;
	for (int i=0;i<n;i++) {
		ans = ans * 1.05;
		if (ans%1000!=0)ans=ans + ans%1000
	}
	cout << ans;
	return 0;
}

C++: #include<cstdio>

int main() {
	int n;
	double debt=100000;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		debt = debt + debt*0.05;
		if ((int)debt % 1000 > 0) {
			debt = debt - (int)debt % 1000;
			debt += 1000;
		}
	}
	printf("%d\n", (int)debt);

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <cstring>
#include <climits>
#include <cmath>
#include <cfloat>

#define FOR(i,b,n) for(int i=b;i<n;i++)
#define CLR(mat) memset(mat, 0, sizeof(mat))
#define INF 1<<25

using namespace std;

int n;
int dept = 100000;

int main()
{
	while( cin >> n, !cin.eof())
	{
		
		FOR(i, 0, n)
		{
			dept += dept*0.05;
			
			if(dept%1000 != 0)
				dept += 1000 - dept%1000;
		}
		
		cout << (int)(dept) << endl;
		
	}

	return 0;
}

C++: #include<cstdio>

int main(){
	int n;
	int a = 100;
	scanf("%d", &n);
	for(int i = 0; i < n; i++){
		if(a % 20){
			a = a * 1.05 + 1;
		}else{
			a *= 1.05;
		}
	}
	printf("%d000\n", a);
	return 0;
}

C++: #include <iostream>
using namespace std;
//1000未満切り上げ
int main(){
  int weeks;
  int debt = 100000;
  cin >> weeks;
  for(int i=0;i<weeks;i++){
    debt *= 1.05;
    if(debt%1000)
      debt += (1000 - debt%1000);
  }
  cout << debt <<endl;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, k = 100000;

	cin >> n;

	for (int i = 1; i <= n; i++)
	{
		k = static_cast<int>(k * 1.05 + 999) / 1000 * 1000;
	}

	cout << k << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(int argc, char const* argv[])
{
	int n;

	cin >> n;

	double money = 100000;
	for( int i = 0;i < n;i++ ){
		money *= 1.05;
		money /= 1000;
		money = int( money + 0.9 );
		money *= 1000;
	}
	cout << money << endl;
	return 0;
}

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

int main(void){
    int n, money=100000;
    cin >> n;
    while(n--){
        money*=1.05;
        money+=(money%1000==0? 0:1000-money%1000) ;
    }
    cout << money << "\n";
}

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

int main(){
    double money = 100;
    int n;
    cin >> n;
    for(int i=0;i<n;++i){
        money *= 1.05;
        money = ceil(money);
    }
    cout << (int)(money*1000) << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
int main(){
    int s;
    cin >> s;
    ll n = 1e5;
    for(int i = 0; i < s; i++){
        n = n + n / 20;
        if(n % 1000 != 0) n = (n / 1000 + 1) * 1000;
    }
    cout << n << "\n";
}

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

int main(){
	double n;
	int money = 100000;
	cin >> n;
	while (n--){
		money *= 1.05;
		if (money % 1000 != 0){
			money += 1000 - (money % 1000);
		}
		

	}
	cout << money << '\n';

	return 0;
}

C++: #include <iostream>

int main(void)
{
  const int kLoan = 100000;
  const double kInterestRate = 0.05;

  int n;
  std::cin >> n;

  int total = kLoan;
  for (int i = 0; i < n; i++) {
    total += kInterestRate * total;
    int mod = total % 1000;
    if (mod != 0) {
      total += 1000 - mod;
    }
  }

  std::cout << total << '\n';
  return 0;
}

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

C++: //#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <math.h>
#include<algorithm>
#include <utility>
using namespace std;
int main() {
	double n, add, money = 100000;
	while (cin >> n) {
		add = 0;
		money = 100000;
		for (int i = 0; i < n; i++) {
			add = money*0.05;
			money += add;
		}
		int ans = money;
		cout << ans << endl;
		if (ans % 1000 < 1000 ) {
			ans /= 10000;
			ans *= 10000;
			ans += 10000;
		}
		cout << ans << endl;
	}
	return 0;
}

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

C++: // Problem A

#include <iostream>
#include <iomanip>
#include <cmath>

using namespace std;

int main(void) {
	int n;
	double sum;

	sum = 100000;

	cin >> n;

	for (int i; i < n; i++){
		sum = ceil((sum * 1.05)/1000) * 1000;
	}

	cout << (int)sum << endl;

	return 0;
}

C++: #include <cstdio>

int main(int argc, char const *argv[]){
//	freopen("in.txt", "r", stdin);

	int n;
	scanf("%d", &n);
	double x = 10;
	for(int i = 0; i < n; i ++)
		x = x + x * 0.05;
	int ans = x + 0.5;
	printf("%d\n", ans * 10000);

	return 0;
}