var n:longint;s,s1:int64;
begin
readln(n);
s:=7000;
s:=s*(n div 10);
s1:=7500;
s1:=s1*(n mod 10);
writeln(s1+s);
readln;
end.
var n:longint;s,s1:int64;
begin
readln(n);
s:=7000;
s:=s*(n div 10);
s1:=7500;
s1:=s1*(n mod 10);
writeln(s1+s);
readln;
end.
#include<iostream>
using namespace std;
int main()
{
int n,s=0;
cin>>n;
if(n%2==0)
{
s=n*7000;
}
else
{
s=n*7500;
}
cout<<s;
}