#include <stdio.h>

int main() {
  int num, result;

  // Input a 3-digit number
  printf("Enter old boring store number:\n ");
  scanf("%d", &num);

  // Apply transformations based on the given rules
  if (num < 10) {
    result = num + 50;
  } else if (num >= 10 && num <= 99) {
    result = num; // No change for numbers between 10 and 99
  } else if (num >= 300 && num <= 500) {
    result = num - 200; // For numbers between 300 and 500, subtract 200
  } else if (num > 500) {
    result = num - 300; // For numbers above 500, subtract 300
    // If result is greater than 255, subtract another 100
    if (result > 255) {
      result -= 100;
    }
  } else {
    result = num; // Default case (for numbers between 100 and 299)
  }

  // Print the final result
  printf("New super cool improved mega store number:\n %d\n", result);

  return 0;
}
