Go: package main

import (
	"bufio"
			"os"
	"strconv"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

const (
	LAST_MONTH = 4280
	BASE = 1150
)

func main() {
	for scanner.Scan() {
		w, _ := strconv.Atoi(scanner.Text())
		if w < 0 {
			break
		}
		s := BASE
		if  10 < w {
			if w <= 20 {
				s+= (w-10)*125
			} else {
				s+= 1250
			}
		}
		if 20 < w {
			if w <= 30 {
				s += (w-20)*140
			} else {
				s += 1400
			}
		}
		if 30 < w {
			s += (w-30)*160
		}
		fmt.Println(LAST_MONTH-s)
	}
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <cassert>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int main() {
	int w;

	while(cin >> w, w!=-1) {
		int cost = 0;
		
		if(w > 30) {
			cost += (w-30)*160;
			w = 30;
		}
		if(w > 20) {
			cost += (w-20)*140;
			w = 20;
		}
		if(w > 10) {
			cost += (w-10)*125;
			w = 10;
		}
		cost += 1150;

		cout << 4280-cost << endl;
	}
}

C++: #include <iostream>
using namespace std;

int main(void)
{
  int water;
  int fee;
  while (true)
  {
    cin >> water;
    if ( water == -1 ) break;

    if (water <= 10)
    {
      fee = 1150;
    }
    else if (water <= 20)
    {
      fee = 1150 + (water - 10) * 125;
    }
    else if (water <= 30)
    {
      fee = 1150 + 10 * 125 + (water - 20) * 140;
    }
    else 
    {
      fee = 1150 + 10 * 125 + 10 * 140 + (water - 30) * 160;
    }

    cout << 4280 - fee << endl;
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int W;
int main()
{
	while(true){
		scanf("%d",&W);
		if(W==-1)break;
		int cost=1150;
		if(W>=10){
			cost+=125*min(10,W-10);
		}
		if(W>=20){
			cost+=140*min(10,W-20);
		}
		if(W>=30){
			cost+=160*(W-30);
		}
		printf("%d\n",4280-cost);
	}
	return 0;
}

C++: #include<stdio.h>
int main()
{
	int n,r;
	while(1){
		scanf("%d",&n);
		if(n==-1){
			break;
		}else if(n<10){
			r=1150;
		}else if(n<20){
			r=1150+125*(n-10);
		}else if(n<30){
			r=2400+140*(n-20);
		}else{
			r=3800+160*(n-30);
		}
		printf("%d\n",4280-r);
	}
	return 0;
}

C++: 
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
#include<limits>
#include<iterator>

#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define rep(i,n) for(int i=0; i<n; i++)
#define INF (1<<20)

using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ll, char> plc;

int main()
{
	int W;
	while (cin >> W, W != -1) {

		int cost = 0;
		if (W > 30) {
			cost += (W - 30) * 160;
			W = 30;
		}
		if (W > 20) {
			cost += (W - 20) * 140;
			W = 20;
		}
		if (W > 10) {
			cost += (W - 10) * 125;
			W = 10;
		}
		cout << 4280 - (cost + 1150) << endl;
	}
	return	0;
}

C++: #include<iostream>
using namespace std;
int main()
{
  int n=0,ans;
  cin >>n;
  while(n!=-1){
    ans=0;
    if(n>30){
      ans+=(n-30)*160;
      n=30;
    }
    if(n>20){
      ans+=(n-20)*140;
      n=20;
    }
    if(n>10)
      ans+=(n-10)*125;
    cout <<4280-(ans+1150)<<endl;
    cin>> n;
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    while(1){
	int w;
	int ans=0;
	cin>>w;
	if(w==-1) break;
	if(w<=10) cout<<4280-1150<<endl;
	else if(w<=20) cout<<4280-(1150+(w-10)*125)<<endl;
	else if(w<=30) cout<<4280-(1150+1250+(w-20)*140)<<endl;
	else cout<<4280-(1150+1400+1250+(w-30)*160)<<endl;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
 
int main(){
int n, bill;
 
while(cin>>n,~n){
bill = 1150;
n-=10;
if(n<0)n=0;
if(n>10){bill += 125*10; n -= 10;}
else{bill += 125*n; n = 0;}
if(n>10){bill += 140*10; n -= 10;}
else{bill += 140*n; n = 0;}
bill += 160*n;
 
cout<<4280-bill<<endl;
}
 
return 0;
}

C++: // 2011/01/27 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		// üÍ
		int w;						// ¡ÌgpÊ
		cin >> w;
		if(w==-1)
			break;

		// Z
		int bil;					// ¡Ì¹¿à
		if(w<=10)
			bil = 1150;
		else if(w<=20)
			bil = 1150+(w-10)*125;
		else if(w<=30)
			bil = 1150+10*125+(w-20)*140;
		else
			bil = 1150+10*125+10*140+(w-30)*160;

		// oÍ
		cout << 4280-bil << endl;	// ÇÌ­ç¢ßñÅ«½©
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
	while(true){
		int w;
		cin >> w;
		if(w==-1)
			break;

		int x=0,y=0;
		
		if(w>=0 && w<10)
			y = 1150;
		else if(w>=10 && w<20){
			x = w-10;
			y = 1150 + 125*x;
		}
		else if(w>=20 && w<30){
			x = w-20;
			y = 1150 + 125*10 + 140*x;
		}
		else if(w>=30){
			x = w-30;
			y = 1150 + 125*10 + 140*x + 160*x;
		}

		cout << (4280 - y) << endl;
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <iomanip>
#include <string> 
#include <vector> 
using namespace std;
  
int main(){
    /*??£???????????????????????????
            int a[2];
            cin >> a[1] >> a[2];
            cout << "[+] " << a[1] + a[2] << endl;
            cout << "[-] " << a[1] - a[2] << endl;
            cout << "[*] " << a[1] * a[2] << endl;
            cout << "[/] " << a[1] / a[2] << endl;
    */
    int a,ans,c = 0;
    while(cin >> a){
        if(a == -1){break;}
        ans = 1150;
        for(int i = 1;a >= i;i++){
            if(i > 10 and i <= 20){
                ans += 125;
            }
            if(i > 20 and i <= 30){
                ans += 140;
            }
            if(i > 30){
                ans += 160;
            }
        }
    ans = -ans + 4280;
    cout << ans << endl;
    }
}

C++: #include <iostream>
using namespace std;

int main() {
  int w, last = 4280;

  while(cin >> w, w != -1) {
    int ans = 1150;
    while(w) {
      if(w > 30) {
	ans += 160 * (w-30);
	w = 30;
      }
      else if(20 < w) {
	ans += 140 * (w-20);
	w = 20;
      }
      else if(10 < w) {
	ans += 125 * (w-10);
	w = 0;
      }
    }
    cout << last - ans << endl;
  }
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
  int w;
  while (cin >> w, w != -1) {
    int c = 1150;
    if (w > 30) {
      c += (w - 30) * 160 + 2650;
    } else if (w > 20) {
      c += (w - 20) * 140 + 1250;
    } else if (w > 10) {
      c += (w - 10) * 125;
    }
    cout << 4280 - c << "\n";
  }
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int f(int i){
	int out;
	if(i>30)out=160;
	else if(i>20)out=140;
	else if(i>10)out=125;
	return out;	
}
int main(){
	int n;
	while(cin>>n,n+1){
		int sum=1150;
		int out=4280;
		loop(i,11,n+1)sum+=f(i);
		cout<<out-sum<<endl;
	}
}