#include<bits/stdc++.h> using namespace std; int main(){ long long n,x,y,total=0; cin>>x>>y>>n; x--; y--; while(n>=y-1){ total+=y; n-=10; } total+=n*x; cout<<total; return 0; }