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<bits/stdc++.h>
#define F first
#define S second
#define endl '\n'
#define lcm( a, b ) ((a)/__gcd(a,b)*(b))
#define MP make_pair
#define pb push_back
#define all(x) (x).begin(),(x).end()

using namespace std;

typedef long long LL;
typedef pair<int, int> P;
typedef pair<int, P> i_P;
typedef pair< LL, LL > L_P;

const int INF = INT_MAX;
const int MIN = INT_MIN;
const LL LINF = LLONG_MAX;
const int MOD = 1000000000 + 7;
const int SIZE = 100005;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n;
    while( true ) {
        cin >> n;
        if( n == -1 ) break;

        int sum = 1150;
        if( n > 10 ) {
            if( n <= 20 ) sum += ( n - 10 ) * 125;
            else sum += 125 * 10;

        }
        if( n > 20 ) {
            if( n <= 30 ) sum += ( n - 20 ) * 140;
            else sum += 140 * 10;

        }
        if( n > 30 )
            sum += ( n - 30 ) * 160;
        cout << 4280 - sum << endl;

    }

    return 0;
}

C++: #include<iostream>
using namespace std;
main(){
  int w,now=1150;
  while(1){
    now=1150;
    cin>>w;
    if(w==-1){
      break;
    }
    if(w<=10){
    }
    else if(w>10&&w<=20){
      now+=(w-10)*125;
    }
    else if(w>20&&w<=30){
      now+=1250+(w-20)*140;
    }
    else{
      now+=1250+1400+(w-30)*160;
    }
    cout<<4280-now<<endl;
  }
}

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

int main()
{
	int N;

	while ( cin >> N, N != -1 ) {
		cout << 3130 - min(10, max(0, N - 10)) * 125 - min(10, max(0, N - 20)) * 140 - max(0, N - 30) * 160 << endl;
	}

	return ( 0 );
}

C++: #include <iostream>
using namespace std;
int main()
{
	
	while(true){

		int w;
		int x = 0;
		cin >> w;

		if(w == -1)
			break;

		if(w >= 0 && w <= 10)
			x = 1150;
		
		else if(w > 10 && w <= 20)
			x = 1150 + (w - 10) * 125;

		else if(w > 20 && w <= 30)
			x = 1150 + (w - 20) * 140 + 10 * 125;

		else if(w > 30)
			x = 1150 + (w - 30) * 160 + 10 * 125 + 10 * 140;

		cout << 4280 - x << endl;

	}

	return 0;

}

C++: #include <iostream>
#include <cstdio>

int main(void){
	while(1){
		int w;
		scanf(" %d", &w);
		if(w==-1) break;
		
		int price = 1150;
		if(w<=10){}
		else if(w<=20){
			price += (w-10)*125;
		}
		else if(w<=30){
			price += 1250 + (w-20)*140;
		}
		else{	
			price += 1250 + 1400 + (w-30)*160;
		}
	
		printf("%d\n", 4280-price);
	
	}

	return 0;
}

C++: /*
	0216:Cutting Down Water Bills
*/
#include	<iostream>

using namespace std;

int main(void) {
	while(1) {
		int w;
		int price = 0;
		
		cin >> w;
		if(w == -1) { break; }
		
		price += 1150;
		if(w >= 10 && w < 20) {
			price += (w-10) * 125;
		} else if(w < 30) {
			price += (w-20) * 140 + 1250;
		} else {
			price += (w-30) * 160 + 2650;
		}
		
		cout << "[TEST]price = " << price << endl;
		cout << 4280 - price << endl;
	}
	
	return 0;
}

C++: main(n){for(;scanf("%d",&n)+n;printf("%d\n",(n<11?626:n<21?886-n*25:n<31?936-n*28:1056-n*32)*5));}

C++: // 2011/07/20 Tazoe

#include <iostream>
using namespace std;

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

		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;

		cout << 4280-bil << endl;	// ツづづ個つュツづァツつ「ツ静淞姪アツづつォツつスツつゥ
	}

	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,sum,x,m,i;
	while(1){
		sum=1150;
		scanf("%d",&n);
		if(n<0)break;
		m=n;
		if(m>10){
			for(i=0;i<10;i++){
				if(n-10==0)break;
				sum+=125;
				n-=1;
			}
		}
		if(m>20){
			for(i=0;i<10;i++){
				if(n-10==0)break;
				sum+=140;
				n-=1;
			}
		}
		if(m>30){
			m=n;
			for(i=0;i<m-10;i++){
				if(n-10==0)break;
				sum+=160;
				n-=1;
			}
		}
		x=sum-4280;
		printf("%d\n",x);
	}
	return 0;
}

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

C++: #include <iostream>
using namespace std;
int main(void){

	int w;
	while (cin >> w && w >= 0){

		int n = 1150;
		if (w > 30){

			n += 160 * (w - 30);
			w = 30;
		}
		if (w > 20){

			n += 140 * (w - 20);
			w = 20;
		}
		if (w > 10){

			n += 125 * (w - 10);
		}

		cout << 4280 - n << endl;
	}
}

C++: #include<iostream>
using namespace std;
int getCost(int w){
 int cost = 1150; // ?¬¬?????????
 for (int i = 11; i <= w; i++ ){
 if ( i <= 20 ) cost += 125; // ?¬¬?????????
 else if ( 30 < i ) cost += 160; // ?¬¬?????????
 else cost += 140; // ?¬¬?????????
 }
 return cost;}
int main(){
 for( int w; cin >> w && w >= 0; ) {
 cout << 4280 - getCost(w) << endl;
 }
 return 0;
}

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

int main() {
    int w, i;
    int b[] = {125, 140, 160};

    while (cin >> w) {
        if (w == -1) return 0;
        int diff = 4280 - 1150;
        w -= 10;
        for (i = 0; w > 10 && i < 2; w -= 10, i++) {
            diff -= 10 * b[i];
        }
        if (w > 0) diff -= w * b[i];
        cout << diff << endl;
    }
    return 0;
}

C++: #include<stdio.h>
int main()
{
	int w,s;
	while(scanf("%d",&w),w>=0)
	{
		s=1150;
		if((w-=10)>0)s+=(w<10?w:10)*125;
		if((w-=10)>0)s+=(w<10?w:10)*140;
		if((w-=10)>0)s+=w*160;
		printf("%d\n",4280-s);
	}
	return 0;
}

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

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

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <complex>
#include <algorithm>
#include <vector>
#include <stack>
#include <string>
#include <queue>
#include <cmath>
#include <math.h>
#include <numeric>
#include <list>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <climits>
#include <set>
#include <memory.h>
#include <memory>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cassert>
#include <map>
#include <cassert>
#include <time.h>
#include <ctime>

using namespace std;

typedef complex<double> xy_t;
typedef pair<xy_t, xy_t> line;
typedef vector<xy_t> polygon;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int , P> PP;
typedef pair<int, string> Ps;
typedef vector<int> vec;
typedef vector<vec> mat;
const int INF = 1 << 29;
const double EPS = 1e-10;
const double PI = 3.1415926535897932384626433832795;
const int CLK = CLOCKS_PER_SEC;

#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, m, n) for(int i = m; i < n; i++)
#define repD(i, n) for(int i = n; i >= 0; i--)

int calc(int w){
	int res = 1150;
	if(w <= 10) return res;
	if(w <= 20){
		res += (w - 10) * 125;
		return res;
	}
	if(w <= 30){
		res += 1250 + (w - 20) * 140;
		return res;
	}
	res += 2650 + (w - 30) * 160;
	return res;
}

int main(){
	int w;
	while(cin >> w && w != -1){
		cout << 4280 - calc(w) << endl;
	}
	return 0;
}