#include <iostream>
using namespace std;

int main() {
	int bulan = 3;
	int tabungan;
	int total = 0;
	int bonus = 0;
	
	for (int i = 1; i <= bulan; i++) {
		if (i == 1)
		   tabungan = 400000;
	    else if (i == 2)
	       tabungan = 300000;
	    else
	        tabungan = 500000;
	         
	          cout << "Tabungan bulan ke-" << i << " = Rp" << tabungan << endl;
	          total += tabungan;
	         
	}
	if (total >= 1000000) {
		bonus = total * 5 / 100;
	}
	cout << "\nTotal tabungan = Rp" << total << endl;
	cout << " Bouns = Rp" << bonus << endl;
	cout << "Total akhir = Rp" << total + bonus << endl;
	
	return 0;
}