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<iostream>
using namespace std;
 
 
int main(){
  int w;
  while(true){
    cin >> w;
    if(w == -1)break;
    int sum = 0,pre = 4280;
    sum += 1150;
    if(w >= 10 && w <= 20)sum += (w-10)*125;
    else if(w >= 20)sum += 10*125;
    if(w >= 20 && w <= 30)sum += (w-20)*140;
    else if(w >= 30)sum += 10*140;
    if(w >= 30)sum += (w-30)*160;
    cout << pre - sum << endl;
  }
  return 0;
}

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 <stdio.h>
int main(){
	int w=1,fee=1150;
	while(w>0){
		scanf("%d",&w);
		if(w>=30) fee += (w-30)*160;
		if(w>=20){
			if((w-20)>=10) fee += 10*140;
			else fee += w*140;
		}
		if(w>=10){
			if((w-10)>=10) fee += 10*125;
			else fee += w*125;
		}
		printf("%d\n",fee);
	}
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
    int a,x,y,v,k;
	scanf("%d",&a);
	while(1){
	    if (a<-1) 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<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 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 n;
    while(cin >> n && (n >=0))  {
        int sum = 1150;
        if(n > 10 && n <= 20)
            sum += (n - 10) * 125;
        if(n > 20 && n <= 30)
            sum += 10 * 125 + (n - 20) * 140;
        if(n > 30)
            sum += 10 * 125 + 10 * 140 + (n - 30) * 160;
        cout << 4280 - sum << endl; 
    }
}

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

C++: #include<stdio.h>
int main(void)
{
    int a,x,y,v;
	scanf("%d",&a);
	x=4280-(a-10)*125-1150;
	y=4280-(a-20)*140-2400;
	v=4280-(a-30)*160-3800;
	if(a<=10){
	    printf("%d\n",3130);
	}
	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 <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    auto f = [](int n){
        if(n <= 10) return 1150;
        else if(n <= 20) return n*125-100;
        else if(n <= 30) return n*140-400;
        else return n*160-1000;
    };
    int n;
    while(cin >> n, ~n) cout << 4280-f(n) << "\n";
    return 0;
}

C++: #include <bits/stdc++.h>
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();}

template<class T> inline T sqr(T x) {return x*x;}

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

#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);

#define CLR(a) memset((a), 0 ,sizeof(a))

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int dx[8] = {-1, 0, 1, 0, -1, -1, 1, 1};
int dy[8] = {0, -1, 0, 1, -1, 1, -1, 1};

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

    cout << last - money << endl;
  }
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
  int w[200],ans[200],i=1,count;
  int sa[200];
  ans[0]=4280;
  cin>>w[1];
  while(w[i]!=-1){
    count=0;
    ans[i]=1150;
    while(count<=w[i]){
      if(count>10&&count<=20){
	ans[i]+=125;
      }
      if(count>20&&count<=30){
	ans[i]+=140;
      }
      if(count>30){
	ans[i]+=160;
      }
      count++;
    }
    sa[i]=4280-ans[i];
    i++;
    cin>>w[i];
  }
  for(int j=1;j<i;j++){
    cout<<sa[j]<<"\n";
  }
  
  
  return 0;
}

C++: #define _USE_MATH_DEFINES
#define INF 10000000
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>

using namespace std;

typedef long long ll;
typedef pair <int,int> P;
typedef pair <int,P > PP;

static const double eps = 1e-8;

int main(){
	int w;
	while(~scanf("%d",&w)){
		if(w==-1) break;
		printf("%d\n",4280 - (1150 + (w > 30 ? 125 * 10 + 140 * 10 + 160 * (w-30)
			: w > 20 ? 125 * 10 + 140 * (w-20)
			: w > 10 ? 125 * (w-10)
			: 0)));
	}
}