Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
	"math"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	sc.Split(bufio.ScanWords)
	n := nextInt()
	ans := calc(n)
	fmt.Println(ans)
}

func calc(n int) float64{
	tmp := 100000.0
	for i:=0; i<n; i++{
		tmp*=1.05
		// tmp = Ceil(tmp, -4) なぜかうまくいかない
		tmp = Ceil(tmp, -3)
		fmt.Printf("now tmp: %d\n", int(tmp))
	}
	return tmp
}

func Ceil(f float64, places int) float64{
	shift := math.Pow(10, float64(places))
	return math.Ceil(f * shift)/shift
}

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

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

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>


#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 CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;



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

int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;

string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;

int sum = 0;

vector<int> value;
vector<int> weight;

int dp[110][10010];

int data_[210][2] = { -2 };

void input(void) {
	CI n;
	return;
}


int main(void) {
	input();
	long double money = 100000;
	
	for (int i = 0; i < n; i++) {
		money *= 1.05;
		if ((int)money % 1000 > 0) {
			money = money - ((int)(money) % 1000) + 1000 - (money - (double)(int)money);
		}
		
	}
	
	CO money E
	

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void)
{
    int n,c,A=0,b,a1,b1,A1=100000;
    cin>>n;
    for(int i=0;i<n;i++){
        b1=A1*0.05;
        c=b1;
        b1/=1000;
        a1=b1*1000;
        if(c%1000!=0)a1+=1000;
        A1+=a1;
    }        cout<<A1<<"\n";
}

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

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

int floorUp(int num)
{
  if (num == 0) return 0;
  if (num < 1000) return 1000;

  int q, r;
  q = num / 1000;
  r = num - q * 1000;

  if (r == 0) return q * 1000;

  return (q + 1) * 1000;
}

int main()
{
  int n, i, ans;

  cin >> n;

  ans = 100000;

  for (i = 0; i < n; i++)
  {
    ans = floorUp(ans * 1.05);
  }

  cout << ans << endl;

  return 0;
}

C++: #include <stdio.h>
int main()
{
int n,i;
int ans=100000;
scanf("%d",&n);
for(i=0;i<n;i++){
ans *= 1.05;
ans = ((ans+999)/1000)*1000;
}
printf("%d\n",ans);
return 0;
}

C++: #include <iostream>
# include <stdio.h>
# include <math.h>
using namespace std; 
 
int main()
{   int n; cin>>n; float newamount=100000;  

	for(int i=0;i<n;i++){
    float copy=newamount*21/20;
     copy=ceil(copy/1000);
     copy=copy*1000;
     newamount=copy;
	}
	cout<<ceil(newamount);
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
 int n,m=1e5;
 for(cin>>n;n>0;n--)
  m = (m*105/100+999)/1000*1000;
 cout << m << endl;
 return 0;
}

C++: #include <iostream>
typedef unsigned long long ULL;
using namespace std;
inline ULL round(ULL t)
{
    return ((ULL)((double)t / 10000 + 0.5))*10000;
}
int main()
{
    int t;
    ULL res = 100000;
    cin >> t;
    while(t--)
    {
        res *= 1.05;
    }
    res = round(res);
    cout << res << endl;
    return 0;
}

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

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

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

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

C++: #pragma GCC optimize "O3"
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#define whole(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x)
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define REP_FROM(i,m,n) for (int i = (m); (i) < int(n); ++(i))
#define REP_REV(i,n) for (int i = (n)-1; (i) >= 0; --(i))
#define REP_FROMREV(i,m,n) for (int i = (n)-1; (i) >= int(m); --(i))
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#ifndef LOCAL
#define cerr if (false) cerr
#endif
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

template <class T> inline void setmax(T & a, T const & b) { a = max(a, b); }
template <class T> inline void setmin(T & a, T const & b) { a = min(a, b); }
template <class T> T sq(T x) { return x * x; }
template <class T> T clamp(T a, T l, T r) { return min(max(a, l), r); } // [l, r]
const double EPS = 1e-10;
const double PI  = acos(-1.0);

const int debt = 100000;

int solve(int n) {
	n++;
	int interest = debt * n;
	interest /= 20;
	return debt + interest;
}

int main(int argc, char *argv[]) {
	// Something to do
	int n;
	while(cin >> n) {
		cout << solve(n) << endl;
	}
	return 0;
}

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