#include <iostream>
using namespace std;
int main()
{
int year = 12,
value = 10,
total = 0;
do
{
year++;
value *= 2;
total += value;
}
while(value*2 < 1000);
cout << "Age: " << year << endl;
cout << "Last gift: " << value << endl;
cout << "Total: " << total << endl;
cin.get();
return 0;
}