#include <iostream>
using namespace std;
int main()
{
float n = 10001;
cout << "Origin price:" << n << endl;
cout << "Final price:";
if (n<1000) { n=n; }
else if (n<5000) { n=n*0.9; }
else if (n<10000) { n=n*0.8; }
else { n=n*0.7; }
cout << int(n+0.5) << endl;
return 0;
}