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++: // #define _CRT_SECURE_NO_WARNINGS
// #define _USE_MATH_DEFINES
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <locale>
#include <cctype>
#include <sstream>
#include <iomanip>	// 10????????? cout << setprecision(10) << double;
using namespace std;

typedef long long LL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef map<int, int> MAPII;
typedef multimap<int, char, greater<int> > MuMAPIC;
typedef vector<pair<int, int> > VPII;
typedef multimap<int, string, greater<int> > MuMIS;

#define MP make_pair
#define FAST_IO  cin.tie(0); ios::sync_with_stdio(false);
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
//for gcc (???test)
// #define FOREACH_IT(it,c) for(typeof(c)::iterator it=(c).begin(); it!=(c).end(); ++it)
//for Visual Studio
#define foreach_it(type,it,c) for(type::iterator it=c.begin(),c_end=c.end();it!=c_end;++it)
// for Debug.
#define DUMP_VVI(b) FOR(i,0,b.size()){FOR(j,0,b[i].size())printf("%d ",b[i][j]);puts("");}
#define D_OUT(str,value) if(dbgF){cout<<str<<" : "<<value<<endl;}
// ??\??????push_back(d)???array[d]???????????????1?????§?????????
// int INPUT_INT() {int d;cin>>d;return d;}
template<class T>T IN(){T d;cin>>d;return d;}
// ?????§??¬?´???°???Greatest Common Divisor???
LL gcd(LL a, LL b){ return (b > 0) ? gcd(b, a%b) : a; }
// ????°???¬?????°???Least Common Multiple???
LL lcm(LL a, LL b){ return a / gcd(a, b) * b; }

// ------------------- include, typedef, define END. -------------------

int UsedWater(int w){
	int ret=1150;

	FOR(i,0,w){
		if(i<10)	ret += 0;
		else if(i<20)	ret += 125;
		else if(i<30)	ret += 140;
		else ret +=160;
	}

	return ret;
}

int main(){
	FAST_IO;
	// for D_OUT(str, value)  ... cout<< str <<" : "<< value <<endl;
	bool dbgF = false;
	
	//??????????????????????????????.
	int w=0;
	while(cin>>w,w!=-1){
		int kongetsu = UsedWater(w);
		D_OUT("?????????",kongetsu);
		cout << (4280 - kongetsu) << endl;
	}
	
	return 0;
}

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

int main(){
	int w,r;
	while(1){
	cin >> w;
	if(w==-1)break;
	else if(10<w<=20)r = 4280 - (1150 + (w-10) * 125);
	else if(20<w<=30)r = 4280 - (1150 + 1250 + (w-20) * 140);
	else if(30>w)r = 4280 - (1150 + 1250 + 1400 + (w-30) * 160);

	else if(w<=10)r = 4280 - 1150;

	cout << r << "\n";
	}

	return 0;
	}

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

int main(){
  
  while(1){
    
    int a;
    
    cin>>a;
    
    if(a == -1) break;
    
    if(a<=10){
      cout<<4280-1150<<endl;
    }else if(a<=20){
      cout<<4280-1150-(a-10)*125<<endl;
    }else if(a<=30){
      cout<<4280-1150-10*125-(a-20)*140<<endl;
    }else{
      cout<<4280-1150-10*125-10*140-(a-30)*160<<endl;
    }
    
  }
  return 0;
}

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

C++: #include<stdio.h>
int main(void)
{
    int a,x,y,v,k;
	scanf("%d",&a);
	k=3130;
	x=4280-(a-10)*125-1150;
	y=4280-(a-20)*140-2400;
	v=4280-(a-30)*160-3800;
	if(a<=10){
	    printf("%d\n",k);
	}
	else if(a<=20){
	    printf("%d\n",x);
	}
	else if(a<=30){
	    printf("%d\n",y);
	}
	else if(30<=a){
	    printf("%d\n",v);
	}
	
	return 0;
}

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

int main()
{
  int w;
  int ans;

  while(1){
    cin >> w;
    if(w == -1) break;

    ans = 0;
    if(w > 30){
      ans += (w - 30) * 160;
      w = 30;
    }
    if(w > 20){
      ans += (w - 20) * 140;
      w = 20;
    }
    if(w > 10){
      ans += (w - 10) * 125;
      w = 10;
    }
    ans += 1150;

    cout << 4280 - ans << 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 <iostream>
#include <string>
#include <vector>
#include <cstring>
#include <climits>
#include <algorithm>
#include <map>
using namespace std;

int main() {
    int last_month = 4280;
    int w;
    while (cin >> w, 0 <= w) {
        int rate = 1150;
        if (30 < w) rate += (w - 30) * 160;
        if (20 < w) rate += min(10, (w - 20)) * 140;
        if (10 < w) rate += min(10, (w - 10)) * 125;
        cout << last_month - rate << endl;
    }
    return 0;
}

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

C++: #include<bits/stdc++.h>
#define REP(i,n) for(long long i=0;i<n;++i)
#define FOR(i,a,b) for(long long i=a;i<b;++i)
using namespace std;
using point = pair< int,int >;
using ll = long long;

int main(){
    int w, sum;
    while (~scanf("%d", &w)) {
        if (!~w) break;
        sum = 1150;
        if (w > 30) sum += (w - 30) * 160 + 1400 + 1250;
        else if (w > 20) sum += (w - 20) * 140 + 1250;
        else if (w > 10) sum += (w - 10) * 125;

        printf("%d\n", 4280 - sum);
    }

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(void)
{
	int i,j,k;
	int n,sum;
	while(1) {
		cin>>n;
		if(n==-1) break;
		sum=4280-1150;
		for(i=0;i<n;i++) {
			if(i<10) {}
			else if(i<20) sum-=125;
			else if(i<30) sum-=140;
			else sum-=160;
		}
		cout<<sum<<endl;
	}
}

C++: #include<iostream>

using namespace std;

int main()
{
	int w,ans;
	
	for(;;)
	{
		cin >> w ;
		if(w==-1)
			break;
		ans=3130;
		
		if(w>30)
		{
			ans-=1250+1400;
			ans-=(w-30)*160;
		}
		else if(w>20)
		{
			ans-=1250;
			ans-=(w-20)*140;
		}
		else if(w>10)
			ans-=(w-10)*125;
		
		cout << ans << endl;
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    while(cin>>n&&n!=-1){
        int sum=3130,num[3]={125,140,160};
        for(int i=0,j=n-10;i<3;i++,j-=10){
            if(j>10&&i!=2)sum-=num[i]*10;
            else if(j>0)sum-=num[i]*j;
        }
        cout<<sum<<endl;
    }
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
    int w;
    int latte[]={
        125,140,160,
    };
    while(cin>>w,w!=-1){
        int ans=1150;
        for(int i=0;i<3;i++){
            w-=10;
            if(w>0)ans+=min(10,w)*latte[i];
        }
        w-=10;
        ans+=max(0,w)*latte[2];
        cout<<4280-ans<<endl;

    }
    return 0;
}